:root {
  --bg: #0b1220;
  --card: rgba(33, 49, 72, 0.86);
  --card2: rgba(70, 84, 105, 0.72);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f7fb;
  --muted: #b7c4d8;
  --accent: #6ee7f9;
  --good: #79f7a5;
  --danger: #ff7b93;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.33);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 8%, rgba(110, 231, 249, 0.18), transparent 35%), linear-gradient(135deg, #07111f, #132034 55%, #07151d);
}

.app-shell {
  width: min(1440px, calc(100% - 28px));
  margin: 0 auto;
  padding: 10px 0 28px;
}

.card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 9px;
  padding-block: 12px;
}

.hero h1 {
  font-size: clamp(27px, 3.4vw, 40px);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.05em;
}

.app-version {
  font-size: 0.34em;
  vertical-align: super;
  opacity: 0.9;
  letter-spacing: 0;
  margin-left: 4px;
  white-space: nowrap;
}

.version-v {
  font-size: 0.68em;
  font-weight: 800;
  margin: 0 1px;
}

.hero-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status-box {
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 8px 12px;
}

.status-box small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.status-box.status-warning {
  border-color: rgba(255, 123, 147, 0.55);
  background: rgba(255, 123, 147, 0.08);
}

.pulse {
  width: 14px;
  height: 14px;
  border-radius: 99px;
  background: var(--good);
  box-shadow: 0 0 0 0 rgba(121, 247, 165, 0.55);
  animation: pulse 1.8s infinite;
}

.status-warning .pulse {
  background: var(--danger);
  box-shadow: 0 0 0 7px rgba(255, 123, 147, 0.12);
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 14px rgba(121, 247, 165, 0); }
}

.demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(560px, 0.98fr);
  gap: 14px;
  align-items: start;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.candle-title-row {
  flex-wrap: nowrap;
  margin-bottom: 6px;
}

.candle-title-row .eyebrow {
  margin: 0;
  white-space: nowrap;
}

.candle-toolbar,
.horizon-inline {
  display: flex;
  align-items: center;
}

.candle-toolbar {
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.horizon-inline {
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.compact-select {
  width: 112px;
  padding: 7px 8px;
}

#candleCountdown {
  color: var(--good);
  font-size: 12px;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 900;
}

.field-label {
  display: block;
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.select-input,
.text-input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(5, 9, 20, 0.76);
  color: var(--text);
  border-radius: 13px;
  padding: 8px 10px;
  outline: none;
  font-weight: 800;
}

.market-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 10px;
  align-items: end;
}

.symbol-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(135px, 0.6fr);
  gap: 8px;
  align-items: end;
}

.mini-price-panel {
  min-height: 51px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(110, 231, 249, 0.15), rgba(156, 255, 201, 0.08));
  border: 1px solid var(--line);
}

.mini-price-panel span,
.mini-price-panel small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mini-price-panel strong {
  display: block;
  font-size: 25px;
  letter-spacing: -0.05em;
  margin: 0;
}

.mini-price-panel [hidden] {
  display: none;
}

.trade-market-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 8px;
  align-items: end;
  margin-bottom: 3px;
}

.market-price-panel {
  min-height: 49px;
  flex-direction: column;
  align-items: flex-end;
  padding: 5px 10px;
  text-align: right;
}

.market-price-panel .market-price-label {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.market-price-panel strong {
  font-size: 23px;
  line-height: 1.15;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 2px;
}

.chart-header strong {
  display: block;
  color: var(--good);
  margin-top: 2px;
}

.mini-label,
.chart-header small {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
}

#tvChart,
#sparkline {
  width: 100%;
  height: 250px;
  background: #121a2b;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(110, 231, 249, 0.08);
  cursor: crosshair;
  touch-action: none;
  overflow: hidden;
}

.canvas-fallback {
  display: none;
}

.chart-hover-info {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  min-height: 14px;
}

.trade-card {
  min-height: 100%;
}

.trade-heading {
  align-items: flex-start;
}

.balance-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: baseline;
  white-space: nowrap;
}

.prediction-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 2px 0 3px;
}

.prediction-chip {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card2);
  color: var(--text);
  padding: 7px 8px;
  min-height: 76px;
}

.prediction-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.prediction-confidence {
  color: #fff;
  font-size: 12px;
}

.prediction-chip strong {
  display: block;
  font-size: 20px;
  line-height: 1;
  margin: 2px 0;
}

.prediction-chip.call strong { color: var(--good); }
.prediction-chip.put strong { color: var(--danger); }
.prediction-chip.wait strong { color: var(--accent); }
.prediction-chip.call { border-color: rgba(121, 247, 165, 0.35); }
.prediction-chip.put { border-color: rgba(255, 123, 147, 0.35); }
.prediction-chip.selected { outline: 2px solid rgba(110, 231, 249, 0.65); }
.prediction-chip small,
.prediction-chip em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.hint-line {
  display: block;
  margin: 2px 0 8px;
  color: var(--muted);
  font-size: 11px;
}

.quick-stake-row {
  display: grid;
  grid-template-columns: 120px minmax(280px, 1fr) 100px;
  gap: 7px;
  align-items: end;
}

.preset-inline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

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

.entry-override-marker {
  display: inline;
  min-height: 0;
  margin: 0 0 0 2px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  vertical-align: middle;
}

.entry-override-marker[hidden] {
  display: none;
}

.text-input[readonly] {
  color: var(--accent);
  cursor: default;
}

button {
  border: 0;
  border-radius: 13px;
  padding: 11px 13px;
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  transition: 0.15s;
}

button:hover { transform: translateY(-1px); }
button:disabled { opacity: 0.62; cursor: wait; transform: none; }

.ghost-btn,
.preset-btn {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--line);
}

.small-btn {
  padding: 9px 12px;
}

.preset-btn {
  min-height: 35px;
  padding: 7px 6px;
}

.preset-btn.active {
  background: rgba(110, 231, 249, 0.28);
  border-color: rgba(110, 231, 249, 0.7);
}

.all-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 8px;
}

.action-btn,
.action-secondary {
  min-height: 42px;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.call { background: linear-gradient(135deg, #0ca45d, #16c980); }
.put { background: linear-gradient(135deg, #c23858, #ff6f87); }
.danger { color: var(--danger); }

.logic-note {
  margin-top: 7px;
  padding: 7px 9px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
  background: rgba(255, 255, 255, 0.05);
}

.logic-note summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
}

.logic-note p {
  margin: 8px 0 0;
}

.ledger-card,
.logs-card {
  margin-top: 10px;
}

.ledger-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.daily-pnl-totals {
  font-weight: 900;
}

.pnl-green { color: var(--good); }
.pnl-red { color: var(--danger); }
.toolbar { display: flex; gap: 10px; }
.table-wrap {
  max-height: 88px;
  overflow: auto;
  margin-top: 6px;
  scrollbar-gutter: stable;
}

.table-wrap thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #20324a;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
  font-size: 11px;
}

th,
td {
  padding: 4px 5px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td.positive { color: var(--good); font-weight: 900; }
td.negative { color: var(--danger); font-weight: 900; }

.logs-list {
  max-height: 260px;
  overflow: auto;
}

.log-row {
  display: grid;
  grid-template-columns: 170px 80px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  color: var(--muted);
}

.log-row b.success,
.log-row b.info { color: var(--accent); }
.log-row b.error { color: var(--danger); }

@media (max-width: 1040px) {
  .demo-layout {
    grid-template-columns: 1fr;
  }

  .trade-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(760px, calc(100% - 14px));
    padding: 8px 0 24px;
  }

  .hero,
  .market-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .status-box {
    min-width: 0;
  }

  .card {
    padding: 14px;
    border-radius: 18px;
  }

  .mini-price-panel strong {
    font-size: 24px;
  }

  .trade-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-stake-row {
    grid-template-columns: minmax(0, 1fr) 88px;
    grid-template-areas:
      "stake fee"
      "preset preset";
  }

  .stake-field { grid-area: stake; }
  .preset-field { grid-area: preset; }
  .fee-field { grid-area: fee; }

  .all-actions {
    grid-template-columns: repeat(4, 1fr);
  }

  #tvChart,
  #sparkline {
    height: 255px;
  }
}

@media (max-width: 520px) {
  body {
    overflow-x: hidden;
  }

  .app-shell {
    width: 100%;
    padding: 4px 5px 18px;
  }

  .hero {
    display: flex;
    gap: 7px;
    padding-block: 8px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero-note {
    font-size: 12px;
  }

  .status-box {
    width: auto;
    min-width: 0;
    padding: 6px 8px;
    font-size: 11px;
  }

  .status-box small {
    display: none;
  }

  .card {
    padding: 9px;
    border-radius: 15px;
  }

  .demo-layout {
    gap: 8px;
  }

  .candle-title-row {
    gap: 4px;
    margin-bottom: 4px;
  }

  .candle-title-row .eyebrow {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .candle-toolbar {
    gap: 3px;
  }

  .horizon-inline span {
    display: none;
  }

  .compact-select {
    width: 108px;
    min-width: 108px;
    max-width: 108px;
    min-height: 30px;
    padding: 4px 7px;
    font-size: 11px;
  }

  #candleCountdown {
    font-size: 9px;
    min-width: 64px;
    text-align: center;
  }

  .candle-toolbar .small-btn {
    padding: 6px 7px;
    font-size: 10px;
  }

  .mini-price-panel {
    min-height: 40px;
    margin-top: 4px;
    padding: 5px 8px;
  }

  .mini-price-panel strong {
    font-size: 24px;
  }

  .trade-market-row {
    grid-template-columns: minmax(0, 1fr) 105px;
    gap: 6px;
    margin-bottom: 2px;
  }

  .market-price-panel {
    min-height: 38px;
    margin-top: 0;
    padding: 4px 6px;
  }

  .market-price-panel strong {
    font-size: 17px;
  }

  .market-price-panel .market-price-label {
    font-size: 8px;
  }

  .chart-header {
    gap: 5px;
    align-items: flex-start;
    padding: 4px 2px;
  }

  .chart-header small {
    font-size: 10px;
    text-align: right;
  }

  #tvChart,
  #sparkline {
    height: 195px;
  }

  .chart-hover-info {
    display: none;
  }

  .trade-heading {
    align-items: center;
  }

  .balance-row {
    flex-direction: row;
    gap: 4px;
    align-items: baseline;
    text-align: right;
    font-size: 11px;
  }

  .prediction-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin-block: 1px 2px;
  }

  .prediction-chip {
    min-height: 68px;
    padding: 5px;
    border-radius: 12px;
  }

  .prediction-chip strong {
    font-size: 15px;
    margin: 1px 0;
  }

  .prediction-chip small,
  .prediction-chip em {
    font-size: 8px;
    line-height: 1.1;
  }

  .prediction-confidence {
    font-size: 9px;
  }

  .quick-stake-row {
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 3px 6px;
  }

  .trade-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px 6px;
    margin-top: 1px;
  }

  .trade-form-grid > div:nth-child(-n + 2) {
    grid-column: span 2;
  }

  .trade-form-grid > div:nth-child(n + 3) .text-input {
    padding-inline: 5px;
    font-size: 12px;
  }

  .field-label {
    margin: 2px 0;
    font-size: 10px;
  }

  .select-input,
  .text-input {
    min-height: 32px;
    padding: 5px 7px;
    border-radius: 10px;
    font-size: 13px;
  }

  .preset-inline {
    gap: 3px;
  }

  .preset-btn {
    min-height: 32px;
    padding: 5px 3px;
    border-radius: 10px;
    font-size: 12px;
  }

  .all-actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    margin-top: 5px;
  }

  .action-btn,
  .action-secondary {
    min-height: 35px;
    padding: 6px;
    font-size: 13px;
  }

  .logic-note {
    margin-top: 5px;
    padding: 5px 7px;
    font-size: 10px;
  }

  .ledger-card {
    padding: 8px;
  }

  .ledger-header {
    align-items: flex-start;
  }

  .ledger-title-line {
    display: block;
  }

  .daily-pnl-totals {
    font-size: 12px;
    margin-top: 4px;
  }

  .toolbar {
    width: 100%;
    margin-top: 4px;
  }

  .toolbar button {
    flex: 1;
    padding: 6px 8px;
    font-size: 11px;
  }

  .table-wrap {
    max-height: 84px;
    -webkit-overflow-scrolling: touch;
  }

  .log-row {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 430px) {
  .candle-title-row {
    gap: 3px;
  }

  .candle-title-row .eyebrow {
    font-size: 8px;
    letter-spacing: 0.08em;
  }

  .compact-select {
    width: 104px;
    min-width: 104px;
    max-width: 104px;
    font-size: 10.5px;
  }

  #candleCountdown {
    min-width: 54px;
    font-size: 8.5px;
  }

  .candle-toolbar .small-btn {
    padding: 6px;
  }
}

/* v0.2.4 phone layout refinement: preset stake first, then stake/fee/entry/exit on one compact line. */
.preset-row-compact {
  margin-top: 4px;
}

.primary-trade-row {
  display: grid;
  grid-template-columns: minmax(90px, 1.15fr) minmax(64px, 0.7fr) minmax(92px, 1fr) minmax(92px, 1fr);
  gap: 6px 8px;
  align-items: end;
  margin-top: 4px;
}

.risk-grid.trade-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 4px;
}

@media (max-width: 820px) {
  .primary-trade-row {
    grid-template-columns: minmax(90px, 1.15fr) minmax(64px, 0.72fr) minmax(86px, 1fr) minmax(86px, 1fr);
  }

  .risk-grid.trade-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .preset-row-compact {
    margin-top: 2px;
  }

  .preset-row-compact .field-label {
    margin-bottom: 3px;
  }

  .primary-trade-row {
    grid-template-columns: minmax(78px, 1.05fr) minmax(50px, 0.68fr) minmax(76px, 1fr) minmax(76px, 1fr);
    gap: 3px 5px;
    margin-top: 3px;
  }

  .primary-trade-row .field-label,
  .risk-grid .field-label {
    font-size: 9px;
    line-height: 1.05;
    white-space: nowrap;
  }

  .primary-trade-row .text-input,
  .risk-grid .text-input {
    min-height: 31px;
    padding: 5px 6px;
    font-size: 12px;
    border-radius: 9px;
  }

  .risk-grid.trade-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px 5px;
    margin-top: 3px;
  }

  .risk-grid.trade-form-grid > div,
  .risk-grid.trade-form-grid > div:nth-child(-n + 2),
  .risk-grid.trade-form-grid > div:nth-child(n + 3) {
    grid-column: auto;
  }

  .preset-inline {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .preset-btn {
    min-height: 30px;
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  .primary-trade-row {
    grid-template-columns: minmax(70px, 1fr) minmax(44px, 0.65fr) minmax(70px, 1fr) minmax(70px, 1fr);
    gap: 3px;
  }

  .primary-trade-row .text-input,
  .risk-grid .text-input {
    font-size: 11px;
    padding-inline: 4px;
  }
}

/* Hotfix: phone primary trade row. Earlier mobile grid-area rules for the old quick-stake layout
   were leaking into the new Stake/Fee/Entry/Exit row and causing the fields to break position. */
.primary-trade-row .stake-field,
.primary-trade-row .fee-field,
.primary-trade-row .entry-field,
.primary-trade-row .exit-field {
  grid-area: auto !important;
  min-width: 0;
}

@media (max-width: 520px) {
  .primary-trade-row {
    display: grid;
    grid-template-columns: 1.05fr 0.62fr 1.02fr 1.02fr;
    gap: 4px;
    align-items: end;
    width: 100%;
  }

  .primary-trade-row .field-label {
    display: block;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
    font-size: 8.5px;
    letter-spacing: 0.02em;
    line-height: 1;
    min-height: 10px;
  }

  .primary-trade-row .stake-field .field-label { font-size: 0; }
  .primary-trade-row .stake-field .field-label::after { content: "Stake"; font-size: 8.5px; }

  .primary-trade-row .fee-field .field-label { font-size: 0; }
  .primary-trade-row .fee-field .field-label::after { content: "Fee"; font-size: 8.5px; }

  .primary-trade-row .text-input {
    width: 100%;
    min-width: 0;
    min-height: 33px;
    padding: 5px 5px;
    font-size: 12px;
    letter-spacing: 0;
    box-sizing: border-box;
  }

  .primary-trade-row .fee-field .text-input {
    padding-inline: 4px;
    font-size: 11.5px;
  }
}

@media (max-width: 380px) {
  .primary-trade-row {
    grid-template-columns: 1fr 0.56fr 0.95fr 0.95fr;
    gap: 3px;
  }
  .primary-trade-row .field-label,
  .primary-trade-row .stake-field .field-label::after,
  .primary-trade-row .fee-field .field-label::after {
    font-size: 8px;
  }
  .primary-trade-row .text-input {
    font-size: 11px;
    padding-inline: 3px;
  }
}

/* v0.3.7 refinements */
.two-risk-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ledger-card {
  min-height: clamp(280px, 36vh, 480px);
}
.ledger-card .table-wrap {
  max-height: clamp(220px, 31vh, 420px);
  overflow: auto;
}
th[data-sort] {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th[data-sort]::after {
  content: ' ↕';
  opacity: .35;
  font-size: .8em;
}
th[data-sort].sorted::after {
  content: attr(data-dir);
  text-transform: uppercase;
  opacity: .85;
  margin-left: 4px;
  font-size: .72em;
}
@media (max-width: 760px) {
  .two-risk-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ledger-card {
    min-height: 360px;
  }
  .ledger-card .table-wrap {
    max-height: 290px;
  }
}

/* v0.3.7 desktop chart height refinement: match Candle Trend card to Trading Area height on PC only. */
@media (min-width: 1041px) {
  .demo-layout {
    align-items: stretch;
  }

  .chart-zone,
  .trade-card {
    height: 100%;
  }

  .chart-zone {
    display: flex;
    flex-direction: column;
  }

  .chart-zone #tvChart,
  .chart-zone #sparkline {
    flex: 1 1 auto;
    height: auto;
    min-height: 315px;
  }
}


/* v0.3.7 refinements */
.prediction-chip,
.prediction-chip * {
  color: #ffffff !important;
}
.prediction-chip {
  min-height: 84px;
  font-variant-numeric: tabular-nums;
}
.prediction-chip strong {
  color: #ffffff !important;
  letter-spacing: .03em;
}
.prediction-line {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 4px;
  align-items: baseline;
  font-size: 10.8px;
  font-weight: 900;
  line-height: 1.22;
  color: #ffffff;
}
.prediction-line b {
  display: block;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
td.open-pnl {
  color: var(--text);
  font-weight: 900;
}
table {
  font-size: 12.5px;
}
th {
  font-size: 10.5px;
}
td {
  font-size: 12.5px;
  padding-top: 5px;
  padding-bottom: 5px;
}
.ledger-card {
  min-height: clamp(230px, 30vh, 390px);
}
.ledger-card .table-wrap {
  max-height: clamp(170px, 24vh, 330px);
}
.auto-placeholder-card {
  margin-top: 10px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.auto-placeholder-card small {
  color: var(--muted);
  font-weight: 800;
}
.auto-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.auto-placeholder-grid span {
  border: 1px dashed rgba(110, 231, 249, .28);
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 900;
}
@media (max-width: 760px) {
  .prediction-chip { min-height: 96px; }
  .prediction-line { grid-template-columns: 52px minmax(0, 1fr); font-size: 10px; }
  table, td { font-size: 11.5px; }
  th { font-size: 9.5px; }
  .ledger-card { min-height: 360px; }
  .ledger-card .table-wrap { max-height: 290px; }
  .auto-placeholder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* DPX v0.3.7 automatic trading setup */
.auto-trading-card {
  padding: 18px;
}
.auto-heading {
  align-items: flex-start;
  gap: 14px;
}
.auto-heading small {
  color: var(--muted);
  font-weight: 700;
  display: block;
  margin-top: 4px;
}
.auto-status-pill {
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(7, 16, 31, .68);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 900;
  letter-spacing: .08em;
  white-space: nowrap;
}
.auto-status-pill.running {
  color: #7dffac;
  border-color: rgba(125,255,172,.35);
  box-shadow: 0 0 0 3px rgba(19,184,102,.10);
}
.auto-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 240px;
  gap: 12px;
  align-items: stretch;
}
.auto-field,
.auto-trades-day {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.auto-field span,
.auto-trades-day span,
.auto-output-grid strong {
  color: var(--text-soft);
  font-weight: 900;
  letter-spacing: .02em;
}
.condition-input {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  border: 0;
  border-radius: 14px;
  background: #07101c;
  color: #f5f8ff;
  padding: 12px 13px;
  font: 800 12px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  outline: 1px solid rgba(255,255,255,.08);
}
.condition-input:focus {
  outline-color: rgba(111,232,255,.45);
  box-shadow: 0 0 0 3px rgba(111,232,255,.10);
}
.auto-side-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auto-action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}
.auto-action-row .action-btn,
.auto-action-row .ghost-btn {
  min-height: 42px;
  font-size: 13px;
  padding: 10px;
}
.auto-summary {
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 54px;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  line-height: 1.35;
}
.auto-help {
  margin-top: 12px;
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}
.auto-help summary {
  cursor: pointer;
  color: #f5f8ff;
  font-weight: 900;
}
.auto-help code {
  color: #7ff0ff;
}
.auto-output-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.auto-output-box {
  margin-top: 7px;
  min-height: 64px;
  max-height: 130px;
  overflow: auto;
  border-radius: 14px;
  background: rgba(7,16,31,.55);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  padding: 10px 12px;
  font: 700 12px/1.38 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}
@media (max-width: 1040px) {
  .auto-grid { grid-template-columns: 1fr 1fr; }
  .auto-side-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 180px 1fr 1fr; align-items: end; }
  .auto-action-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .auto-trading-card { padding: 14px; }
  .auto-heading { flex-direction: column; }
  .auto-grid,
  .auto-output-grid,
  .auto-side-panel { grid-template-columns: 1fr; }
  .auto-side-panel { display: flex; }
  .auto-action-row { grid-template-columns: 1fr 1fr; }
  .condition-input { min-height: 92px; font-size: 11px; }
}

/* v0.3.7 friendly M3 auto-trading setup */
.auto-easy-card {
  margin-top: 14px;
}
.auto-builder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.auto-rule-card {
  background: rgba(11, 22, 40, 0.46);
  border: 1px solid rgba(142, 163, 188, 0.18);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.auto-card-title {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
  font-size: 0.76rem;
  margin-bottom: 2px;
}
.auto-rule-card label {
  display: grid;
  gap: 4px;
}
.auto-rule-card label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}
.auto-rule-card .text-input,
.auto-rule-card .select-input {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 0.92rem;
}
.auto-action-strip {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.auto-action-strip .action-btn,
.auto-action-strip .ghost-btn {
  min-height: 46px;
}
.auto-advanced-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.auto-advanced-grid textarea[readonly] {
  opacity: 0.86;
}
@media (max-width: 1100px) {
  .auto-builder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-advanced-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .auto-builder-grid { grid-template-columns: 1fr; }
  .auto-rule-card { padding: 10px; }
  .auto-rule-card {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
  .auto-card-title { grid-column: 1 / -1; }
  .auto-action-strip { grid-template-columns: 1fr 1fr; }
  .auto-summary { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .auto-rule-card { grid-template-columns: 1fr; }
}

/* v0.3.7 patch: collapsible mobile-friendly M3 setup */
.compact-auto-strip {
  grid-template-columns: minmax(150px, 220px) minmax(150px, 220px) 1fr;
  margin-top: 12px;
}
.auto-collapsible-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.auto-rule-details {
  display: block;
  padding: 0;
  overflow: hidden;
}
.auto-rule-details summary {
  list-style: none;
  cursor: pointer;
  padding: 12px;
  display: grid;
  gap: 4px;
}
.auto-rule-details summary::-webkit-details-marker {
  display: none;
}
.auto-rule-details summary span {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 900;
  font-size: 0.78rem;
}
.auto-rule-details summary small,
.auto-rule-help {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.35;
}
.auto-rule-details summary::after {
  content: "Tap to expand";
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}
.auto-rule-details[open] summary::after {
  content: "Tap to collapse";
}
.auto-rule-help,
.auto-rule-details .auto-field,
.auto-rule-details .auto-field-grid {
  margin: 0 12px 12px;
}
.auto-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.auto-rule-details textarea.condition-input {
  min-height: 72px;
}
@media (max-width: 1100px) {
  .auto-collapsible-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .compact-auto-strip { grid-template-columns: 1fr 1fr; }
  .compact-auto-strip .auto-summary { grid-column: 1 / -1; }
  .auto-collapsible-grid { grid-template-columns: 1fr; }
  .auto-rule-details summary { padding: 10px; }
  .auto-field-grid { grid-template-columns: 1fr 1fr; }
  .auto-output-grid { grid-template-columns: 1fr; }
  .auto-output-box { max-height: 105px; }
}
@media (max-width: 430px) {
  .auto-field-grid { grid-template-columns: 1fr; }
}

/* DPX v0.3.7 client comments patch */
.manual-trade-line {
  display: grid;
  gap: 6px 8px;
  align-items: end;
  margin-top: 4px;
}
.stake-compact-row {
  grid-template-columns: minmax(104px, .85fr) minmax(110px, 1.2fr) minmax(76px, .7fr);
}
.trade-params-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.preset-select-field,
.trade-params-row > div,
.stake-compact-row > div {
  min-width: 0;
}
#presetPercentSelect {
  min-height: 36px;
}
@media (max-width: 520px) {
  .stake-compact-row {
    grid-template-columns: minmax(72px, .75fr) minmax(82px, 1fr) minmax(54px, .62fr);
    gap: 3px 5px;
  }
  .trade-params-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px 5px;
  }
  .manual-trade-line .field-label {
    font-size: 8.5px;
    line-height: 1;
    white-space: nowrap;
    min-height: 10px;
    overflow: hidden;
  }
  .manual-trade-line .text-input,
  .manual-trade-line .select-input {
    min-height: 32px;
    padding: 5px 5px;
    font-size: 11.5px;
    border-radius: 9px;
  }
}
@media (max-width: 380px) {
  .stake-compact-row { grid-template-columns: .72fr 1fr .56fr; }
  .trade-params-row { gap: 3px; }
  .manual-trade-line .text-input,
  .manual-trade-line .select-input { font-size: 10.8px; padding-inline: 4px; }
}

.ledger-card .table-wrap {
  max-height: 180px;
  overflow: auto;
  position: relative;
}
.ledger-card table {
  min-width: 1780px;
  table-layout: auto;
}
.ledger-card th,
.ledger-card td {
  padding: 6px 7px;
}
.ledger-type,
.ledger-symbol,
.ledger-side {
  white-space: nowrap;
  padding-left: 5px !important;
  padding-right: 5px !important;
}
.ledger-card th[draggable="true"] {
  cursor: grab;
}
.ledger-card th[draggable="true"]:active {
  cursor: grabbing;
}
.sticky-col {
  position: sticky;
  z-index: 2;
  background: #20324a;
  box-shadow: 1px 0 0 rgba(255,255,255,.09);
}
td.sticky-col {
  background: #1d2d43;
  z-index: 1;
}
thead .sticky-col {
  z-index: 4;
}
.ledger-type { min-width: 66px; max-width: 78px; }
.ledger-symbol { min-width: 92px; max-width: 104px; }
.ledger-side { min-width: 46px; max-width: 52px; }
.reason-cell {
  min-width: 260px;
  max-width: 420px;
  white-space: normal;
  line-height: 1.25;
}
.adjusted-up {
  color: #ffd83d !important;
  font-weight: 950;
}
@media (max-width: 760px) {
  .ledger-card .table-wrap { max-height: 300px; }
  .ledger-card table { min-width: 1720px; }
  .reason-cell { min-width: 230px; }
}

.auto-heading {
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.auto-title-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.auto-heading .eyebrow {
  margin: 0;
}
.auto-heading-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(145px, auto));
  gap: 8px;
  align-items: center;
}
.auto-heading-actions button {
  min-height: 39px;
  padding: 9px 11px;
  font-size: 12px;
}
.auto-collapsible-grid {
  margin-top: 12px;
}
@media (max-width: 780px) {
  .auto-heading {
    align-items: stretch;
  }
  .auto-title-block {
    width: 100%;
    justify-content: space-between;
  }
  .auto-heading-actions {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }
  .auto-heading-actions #autoToggleConditions {
    grid-column: 1 / -1;
  }
}
@media (max-width: 430px) {
  .auto-heading-actions {
    grid-template-columns: 1fr;
  }
  .auto-heading-actions #autoToggleConditions {
    grid-column: auto;
  }
}


/* v0.3.7 conservative ledger patch: return to auto table layout, keep only Type | Symbol | Side frozen */
.ledger-card table {
  table-layout: auto;
  min-width: 1780px;
}
.ledger-card th,
.ledger-card td {
  overflow: visible;
  text-overflow: clip;
}
.ledger-type { min-width: 66px; max-width: 78px; width: auto; }
.ledger-symbol { min-width: 92px; max-width: 104px; width: auto; }
.ledger-side {
  min-width: 44px;
  max-width: 50px;
  width: auto;
  text-align: left;
}
.reason-cell {
  min-width: 300px;
  max-width: 520px;
  white-space: normal;
  line-height: 1.25;
}
/* Let JS calculate the exact frozen offsets so columns never overlap. */
.sticky-1, .sticky-2, .sticky-3 { left: auto; }
@media (max-width: 760px) {
  .ledger-card table { min-width: 1720px; }
  .ledger-side { min-width: 42px; max-width: 48px; }
  .reason-cell { min-width: 260px; }
}
/* Keep the long auto dropdown text readable without changing the ledger layout. */
@media (min-width: 721px) {
  .auto-rule-details .auto-wide-control { grid-column: 1 / -1; }
  .auto-rule-details .auto-wide-control .select-input {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    text-overflow: clip;
  }
}

/* ========================================================================== 
   DPX v0.6.1 post-test patches — final targeted responsive corrections.
   ========================================================================== */
.dpx-message-board,
.dpx-message-artboard { cursor: pointer; }

/* PC/laptop: keep Fee, SL and daily limit in one compact information strip
   immediately above the prediction headings. */
@media (min-width: 761px) and (min-height: 601px) {
  html body.desktop-tab-layout .demo-layout > .trade-card .prediction-workbench > .prediction-order-row {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    margin: 0 !important;
    padding: 2px 0 !important;
    overflow: visible !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card .prediction-workbench > .prediction-order-row > .preset-field {
    flex: 0 0 116px !important;
    width: 116px !important;
    min-width: 116px !important;
    max-width: 116px !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card .prediction-workbench > .prediction-order-row > #effectiveTradeSettings {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(3, max-content) !important;
    justify-content: start !important;
    align-items: center !important;
    gap: 6px !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    margin: 0 !important;
    padding: 2px 4px !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card .prediction-workbench > .prediction-order-row > #effectiveTradeSettings .effective-trade-item {
    box-sizing: border-box !important;
    min-width: 0 !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    line-height: 16px !important;
    white-space: nowrap !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card .prediction-workbench > .prediction-panel {
    min-height: 0 !important;
    margin-top: 0 !important;
  }
}

/* Phone portrait: give the complete instrument/Auto/Preset/Fee/SL/log area the
   space it needs instead of forcing every control into a clipped 66px stage. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card > .trade-market-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-rows: 46px 58px !important;
    gap: 5px !important;
    height: 109px !important;
    min-height: 109px !important;
    max-height: none !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .trade-symbol-control {
    grid-template-rows: 14px 32px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-symbol-control .field-label {
    height: 14px !important;
    min-height: 14px !important;
    font-size: 9px !important;
    line-height: 14px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-symbol-control #symbolSelect {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 4px 18px 4px 5px !important;
    font-size: 9px !important;
    line-height: normal !important;
    text-overflow: clip !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row {
    grid-template-columns: 68px minmax(0, 1fr) !important;
    gap: 4px !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > .preset-field {
    grid-template-rows: 18px 36px !important;
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > .preset-field > .field-label {
    height: 18px !important;
    min-height: 18px !important;
    font-size: 8px !important;
    line-height: 18px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > .preset-field > #presetPercentSelect {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 4px 20px 4px 6px !important;
    font-size: 11px !important;
    line-height: normal !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > #effectiveTradeSettings {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 3px !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #effectiveTradeSettings .effective-trade-item {
    display: grid !important;
    place-items: center !important;
    min-width: 0 !important;
    padding: 3px 2px !important;
    font-size: 8.5px !important;
    line-height: 11px !important;
    white-space: normal !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #effectiveTradeSettings .effective-trade-limit {
    grid-column: 1 / -1 !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > #phoneAutoExecutionSlot {
    grid-template-rows: 38px 66px !important;
    gap: 5px !important;
    height: 109px !important;
    min-height: 109px !important;
    max-height: 109px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls {
    grid-template-columns: minmax(0, 1fr) 62px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls .trading-auto-status,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls .title-auto-run-toggle {
    box-sizing: border-box !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    font-size: 10px !important;
    line-height: 20px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls .trading-auto-status {
    padding-inline: 3px !important;
    font-size: 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls .title-auto-run-toggle {
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #phoneAutoExecutionSlot > .chart-auto-execution-panel {
    height: 66px !important;
    min-height: 66px !important;
    max-height: 66px !important;
    padding: 3px 4px !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #phoneAutoExecutionSlot .auto-output-box {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    padding: 4px !important;
    font-size: 8px !important;
    line-height: 10px !important;
    overflow-y: auto !important;
  }

  /* Auto Trade Settings: exactly two editable fields per portrait row. */
  html body.phone-tab-layout #phoneSettingPanel .auto-setting-inputs {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    gap: 8px !important;
    width: 100% !important;
  }
  html body.phone-tab-layout #phoneSettingPanel .auto-setting-inputs > label {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-rows: minmax(28px, auto) 34px !important;
    align-content: start !important;
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout #phoneSettingPanel .auto-setting-inputs > label > span {
    min-width: 0 !important;
    font-size: 10px !important;
    line-height: 13px !important;
    overflow-wrap: anywhere !important;
  }
  html body.phone-tab-layout #phoneSettingPanel .auto-setting-inputs :is(input, .mini-pair) {
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }
}

/* Rotated phones: retain editable settings and give the native select enough
   height/line box to show the full symbol and instrument name. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html body #symbolSelect,
  html body.phone-landscape-redesign #symbolSelect,
  html body.phone-landscape-tab-stage #symbolSelect {
    box-sizing: border-box !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 4px 28px 4px 8px !important;
    font-size: 11px !important;
    line-height: normal !important;
    overflow: visible !important;
    text-overflow: ellipsis !important;
  }
  html body #phoneSettingPanel .auto-setting-inputs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    overflow: visible !important;
  }
  html body #phoneSettingPanel .auto-setting-inputs > label,
  html body #phoneSettingPanel .auto-setting-inputs input,
  html body #phoneSettingPanel .auto-setting-inputs .mini-pair {
    box-sizing: border-box !important;
    min-width: 0 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .landscape-trade-topbar .trade-symbol-control #symbolSelect,
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .trade-market-row .trade-symbol-control #symbolSelect,
  html body.desktop-tab-layout.phone-landscape-redesign .trade-card .trade-symbol-control #symbolSelect {
    box-sizing: border-box !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 4px 28px 4px 8px !important;
    font-size: 11px !important;
    line-height: normal !important;
    overflow: visible !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card .trade-market-row > .trade-symbol-control > #symbolSelect,
  html body.desktop-tab-layout.desktop-tab-history .demo-layout > .trade-card .trade-market-row .trade-symbol-control #symbolSelect,
  html body.desktop-tab-layout.desktop-tab-setup .demo-layout > .trade-card .trade-market-row .trade-symbol-control #symbolSelect {
    box-sizing: border-box !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 4px 28px 4px 8px !important;
    font-size: 11px !important;
    line-height: normal !important;
    overflow: visible !important;
  }
}

/* DPX v0.6.1 phone-control overlap correction.
   The effective values are informational text, not input controls, so they do
   not need bordered boxes. Keep each text run inside its own grid cell and
   reserve a separate column for the editable Preset stake selector. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card .trade-market-row > .prediction-order-row {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    column-gap: 5px !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card .trade-market-row > .prediction-order-row > .preset-field,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card .trade-market-row > .prediction-order-row > .preset-field > #presetPercentSelect {
    box-sizing: border-box !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .demo-layout > .trade-card > .trade-market-row > .prediction-order-row > .preset-field {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    position: static !important;
    transform: none !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card .trade-market-row > .prediction-order-row > .preset-field > .field-label {
    box-sizing: border-box !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding: 0 !important;
    font-size: 8px !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card .trade-market-row > .prediction-order-row > #effectiveTradeSettings {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, 1fr) !important;
    column-gap: 5px !important;
    row-gap: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .demo-layout > .trade-card > .trade-market-row > .prediction-order-row > #effectiveTradeSettings {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
    margin: 0 !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  #effectiveTradeSettings .effective-trade-item {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 8px !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  #effectiveTradeSettings .effective-trade-limit {
    grid-column: 1 / -1 !important;
  }
}

/* DPX v0.6.1 display-correction cascade lock. This copy intentionally remains
   last so inherited phone header widths cannot restore truncation. */
@media (max-width: 600px) {
  html body.phone-tab-layout .session-bar {
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr) !important;
    gap: 5px !important;
  }
  html body.phone-tab-layout .session-account-slot,
  html body.phone-tab-layout .session-account-slot .account-bar,
  html body.phone-tab-layout .session-account-slot .account-menu-wrap,
  html body.phone-tab-layout #accountMenuBtn {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  html body.phone-tab-layout #accountMenuBtn {
    grid-template-columns: 22px max-content 10px !important;
    padding-inline: 4px !important;
    gap: 2px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout #accountMenuBtn > span:nth-child(2) {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    font-size: 9px !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
  html body.phone-tab-layout .session-balance-slot .balance-row {
    justify-content: flex-end !important;
    gap: 3px !important;
    min-width: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html body.phone-tab-layout #accountMenuBtn {
    font-size: 10px !important;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html body.phone-tab-layout .session-bar {
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr) !important;
    gap: 7px !important;
  }
  html body.phone-tab-layout .session-account-slot,
  html body.phone-tab-layout .session-account-slot .account-bar,
  html body.phone-tab-layout .session-account-slot .account-menu-wrap,
  html body.phone-tab-layout #accountMenuBtn {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  html body.phone-tab-layout #accountMenuBtn {
    grid-template-columns: 22px max-content 10px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout #accountMenuBtn > span:nth-child(2) {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
  html body.phone-tab-layout .session-balance-slot .balance-row {
    justify-content: flex-end !important;
    min-width: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }
}

/* DPX v0.6.1 display-correction patch: keep the complete administrator ID and
   paper balance visible together on narrow phone headers. */
@media (max-width: 600px) {
  html body.phone-tab-layout .session-bar {
    display: grid !important;
    grid-template-columns: minmax(0, max-content) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 5px !important;
  }
  html body.phone-tab-layout .session-account-slot,
  html body.phone-tab-layout .session-account-slot .account-bar,
  html body.phone-tab-layout .session-account-slot .account-menu-wrap {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  html body.phone-tab-layout #accountMenuBtn {
    box-sizing: border-box !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding-inline: 4px !important;
    gap: 2px !important;
  }
  html body.phone-tab-layout #accountMenuBtn .avatar-dot {
    flex: 0 0 22px !important;
    width: 22px !important;
    min-width: 22px !important;
    font-size: 14px !important;
  }
  html body.phone-tab-layout #accountMenuBtn > span:nth-child(2) {
    min-width: 0 !important;
    width: auto !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
  html body.phone-tab-layout .session-balance-slot {
    min-width: 0 !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout .session-balance-slot .balance-row {
    justify-content: flex-end !important;
    gap: 3px !important;
    min-width: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html body.phone-tab-layout .session-bar {
    display: grid !important;
    grid-template-columns: minmax(0, max-content) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 7px !important;
  }
  html body.phone-tab-layout .session-account-slot,
  html body.phone-tab-layout .session-account-slot .account-bar,
  html body.phone-tab-layout .session-account-slot .account-menu-wrap,
  html body.phone-tab-layout #accountMenuBtn {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  html body.phone-tab-layout #accountMenuBtn {
    grid-template-columns: 22px max-content 10px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout #accountMenuBtn > span:nth-child(2) {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
  html body.phone-tab-layout .session-balance-slot .balance-row {
    justify-content: flex-end !important;
    min-width: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card .trade-market-row > .trade-symbol-control > #symbolSelect {
    padding: 4px 18px 4px 5px !important;
    font-size: 9px !important;
    line-height: normal !important;
    text-overflow: clip !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card #v053PhoneAutoControls > .trading-auto-status {
    padding-inline: 3px !important;
    font-size: 8px !important;
    line-height: 20px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
}


/* v0.3.7 layout patch: keep PC auto controls on two rows and phone controls in two columns */
@media (min-width: 721px) {
  .auto-rule-details .auto-field-grid {
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    align-items: end;
  }
  .auto-rule-details .auto-full-wide-control {
    grid-column: 1 / -1;
  }
  .auto-rule-details .auto-inline-wide-control {
    grid-column: auto;
  }
  .auto-rule-details .auto-inline-wide-control .select-input,
  .auto-rule-details .auto-full-wide-control .select-input {
    font-size: 0.84rem;
    padding-left: 8px;
    padding-right: 8px;
    letter-spacing: -0.01em;
  }
  #autoBacktestGate,
  #autoStakeSource {
    font-size: 0.82rem;
  }
}
@media (max-width: 720px) {
  .auto-rule-details .auto-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }
  .auto-rule-details .auto-wide-control,
  .auto-rule-details .auto-full-wide-control,
  .auto-rule-details .auto-inline-wide-control {
    grid-column: auto !important;
  }
  .auto-rule-card label span {
    font-size: 0.72rem;
    line-height: 1.1;
  }
  .auto-rule-card .text-input,
  .auto-rule-card .select-input {
    min-height: 46px;
    padding: 7px 8px;
    font-size: 13.5px;
  }
  .auto-rule-card .select-input {
    padding-right: 22px;
  }
  #autoAdjustTarget,
  #autoBacktestGate,
  #autoStakeSource,
  #autoAgreement {
    font-size: 12.5px;
    letter-spacing: -0.01em;
  }
}
@media (max-width: 380px) {
  .auto-rule-card label span { font-size: 0.66rem; }
  .auto-rule-card .text-input,
  .auto-rule-card .select-input { font-size: 12px; padding-left: 6px; padding-right: 18px; }
  #autoAdjustTarget,
  #autoBacktestGate,
  #autoStakeSource,
  #autoAgreement { font-size: 11px; }
}


/* v0.3.7 select readability patch: keep PC row layout and phone two-column layout while showing full text */
#autoAdjustTarget,
#autoStakeSource {
  letter-spacing: -0.02em;
}
@media (min-width: 721px) {
  #autoStakeSource {
    font-size: 0.74rem;
    padding-left: 7px;
    padding-right: 22px;
  }
  #autoAdjustTarget {
    font-size: 0.82rem;
    padding-right: 22px;
  }
}
@media (max-width: 720px) {
  .auto-rule-details .auto-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .auto-rule-details .auto-field-grid > label {
    min-width: 0;
  }
  #autoAdjustTarget,
  #autoStakeSource {
    font-size: 11.4px;
    padding-left: 6px;
    padding-right: 18px;
  }
}
@media (max-width: 380px) {
  #autoAdjustTarget,
  #autoStakeSource {
    font-size: 10.4px;
    padding-left: 5px;
    padding-right: 16px;
  }
}

/* DPX v0.3.7 updates */
.table-wrap.no-h-scroll::-webkit-scrollbar:horizontal {
  height: 0 !important;
  display: none !important;
}
.table-wrap.no-h-scroll {
  -ms-overflow-style: auto;
}
.conditions-hidden {
  display: none !important;
}
.auto-rule-details summary::after,
.auto-rule-details[open] summary::after {
  content: "" !important;
  display: none !important;
}
.horizon-param-grid {
  display: grid;
  grid-template-columns: minmax(110px, 1.25fr) repeat(3, minmax(70px, 0.86fr));
  gap: 7px;
  align-items: center;
  margin: 0 12px 12px;
}
.horizon-grid-head,
.horizon-row-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}
.horizon-grid-head {
  text-align: center;
}
.horizon-param-grid .text-input {
  text-align: right;
  min-height: 36px;
  padding: 7px 8px;
  font-variant-numeric: tabular-nums;
}
.single-line-grid {
  margin: 0 12px 12px;
  grid-template-columns: minmax(160px, 1fr);
}
.help-dot {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(127,240,255,.16);
  color: var(--accent);
  font-size: 10px;
  margin-left: 4px;
}
.logic-field > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.logic-toggle {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: var(--muted);
  border-radius: 9px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.condition-input.logic-editable {
  border-color: rgba(127, 240, 255, .45);
  background: rgba(8, 16, 30, .92);
  color: #fff;
}
.settlement-risk-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.combined-settlement-risk {
  grid-column: span 2;
}
.sl-adj-cell.sl-adjust-loss {
  color: #ff7993 !important;
  font-weight: 950;
}
.sl-adj-cell.sl-adjust-gain {
  color: #6dff9f !important;
  font-weight: 950;
}
.sl-orig-cell,
.tp-cell {
  color: inherit !important;
}
.reason-cell {
  min-width: 340px !important;
  max-width: 580px !important;
}
@media (min-width: 721px) {
  .auto-collapsible-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .combined-settlement-risk {
    grid-column: span 2;
  }
}
@media (max-width: 720px) {
  .horizon-param-grid {
    grid-template-columns: minmax(92px, 1.12fr) repeat(3, minmax(48px, .8fr));
    gap: 6px;
  }
  .horizon-grid-head,
  .horizon-row-label {
    font-size: 0.68rem;
  }
  .horizon-param-grid .text-input {
    min-height: 42px;
    font-size: 12.2px;
    padding: 6px 5px;
  }
  .settlement-risk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .combined-settlement-risk {
    grid-column: auto;
  }
  .logic-toggle {
    font-size: 10px;
    padding: 3px 6px;
  }
}
@media (max-width: 380px) {
  .horizon-param-grid {
    grid-template-columns: minmax(82px, 1fr) repeat(3, minmax(42px, .72fr));
  }
  .horizon-grid-head,
  .horizon-row-label {
    font-size: 0.62rem;
  }
  .horizon-param-grid .text-input {
    font-size: 11px;
  }
}


/* v0.3.7 same-version patch: restore market boot + compact auto entries */
.auto-rule-details summary {
  padding: 8px 10px;
}
.auto-rule-details summary span {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}
.auto-rule-help,
.auto-rule-details .auto-field,
.auto-rule-details .auto-field-grid {
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 8px;
}
.horizon-param-grid {
  grid-template-columns: minmax(82px, 1fr) repeat(3, minmax(48px, .74fr)) !important;
  gap: 5px !important;
  margin: 0 10px 8px !important;
}
.horizon-grid-head,
.horizon-row-label {
  font-size: 0.62rem !important;
  line-height: 1.05;
}
.horizon-param-grid .text-input,
.auto-rule-card .text-input,
.auto-rule-card .select-input {
  min-height: 30px !important;
  padding: 4px 6px !important;
  font-size: 0.76rem !important;
  border-radius: 9px !important;
}
.auto-rule-card label span {
  font-size: 0.64rem !important;
  line-height: 1.08;
}
.condition-input {
  min-height: 56px !important;
  font-size: 10.5px !important;
  line-height: 1.25 !important;
}
.logic-toggle {
  padding: 3px 6px !important;
  font-size: 9.5px !important;
}
.auto-rule-details .settlement-risk-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}
.auto-rule-details .settlement-risk-grid > label,
.auto-rule-details .settlement-risk-grid > label.auto-wide-control {
  grid-column: auto !important;
  min-width: 0;
}
.auto-rule-details .settlement-risk-grid .select-input,
.auto-rule-details .settlement-risk-grid .text-input {
  width: 100%;
  min-width: 0;
}
@media (min-width: 721px) {
  .auto-rule-details .settlement-risk-grid > label span {
    white-space: nowrap;
  }
  #autoStakeSource,
  #autoBacktestGate {
    font-size: 0.68rem !important;
    letter-spacing: -0.02em;
  }
}
@media (max-width: 720px) {
  .horizon-param-grid {
    grid-template-columns: minmax(76px, .95fr) repeat(3, minmax(44px, .7fr)) !important;
  }
  .horizon-param-grid .text-input,
  .auto-rule-card .text-input,
  .auto-rule-card .select-input {
    min-height: 28px !important;
    font-size: 12px !important;
    padding: 4px 5px !important;
  }
  .auto-rule-details .settlement-risk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* DPX v0.3.7 same-version patch: working controls + better PC layout */
.table-wrap.no-h-scroll {
  scrollbar-width: none;
}
.table-wrap.no-h-scroll::-webkit-scrollbar:horizontal {
  height: 0 !important;
  display: none !important;
}
.table-wrap:not(.no-h-scroll) {
  scrollbar-width: auto;
}
@media (min-width: 980px) {
  .auto-collapsible-grid {
    grid-template-columns: minmax(390px, 1.2fr) minmax(390px, 1.2fr) minmax(300px, .82fr) !important;
    align-items: start;
  }
  .combined-settlement-risk {
    grid-column: auto !important;
  }
  .auto-rule-details .settlement-risk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  .auto-rule-details .settlement-risk-grid > label,
  .auto-rule-details .settlement-risk-grid > label.auto-wide-control {
    grid-column: auto !important;
  }
  .auto-rule-details .settlement-risk-grid .select-input,
  .auto-rule-details .settlement-risk-grid .text-input {
    font-size: 0.68rem !important;
    min-height: 30px !important;
    padding: 4px 5px !important;
  }
  .auto-rule-details .settlement-risk-grid > label span {
    font-size: 0.58rem !important;
    white-space: nowrap;
    letter-spacing: -0.01em;
  }
  .horizon-param-grid {
    grid-template-columns: minmax(88px, .78fr) repeat(3, minmax(58px, .62fr)) !important;
  }
  .horizon-param-grid .text-input {
    font-size: 0.70rem !important;
    min-height: 29px !important;
  }
  .horizon-row-label,
  .horizon-grid-head {
    font-size: 0.58rem !important;
  }
  .logic-field > span {
    font-size: 0.60rem !important;
  }
  .condition-input {
    min-height: 50px !important;
    font-size: 9.2px !important;
  }
}
@media (min-width: 980px) and (max-width: 1320px) {
  .auto-collapsible-grid {
    grid-template-columns: minmax(330px, 1fr) minmax(330px, 1fr) !important;
  }
  .combined-settlement-risk {
    grid-column: 1 / -1 !important;
  }
  .auto-rule-details .settlement-risk-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* DPX v0.3.7 client comments 1-10 */
.ledger-card .table-wrap thead,
.ledger-card .table-wrap thead tr,
.ledger-card .table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #20324a;
}
.ledger-card .table-wrap thead th.sticky-col {
  z-index: 8;
}
.auto-rule-details summary {
  cursor: default !important;
  user-select: none;
}
.auto-rule-details summary::after,
.auto-rule-details[open] summary::after {
  content: "" !important;
  display: none !important;
}
@media (min-width: 980px) {
  .auto-collapsible-grid {
    grid-template-columns: minmax(420px, 1.1fr) minmax(420px, 1.1fr) minmax(310px, .74fr) !important;
    gap: 12px !important;
  }
  .auto-rule-details summary span,
  .auto-rule-details .settlement-risk-grid > label span,
  .horizon-row-label,
  .horizon-grid-head,
  .logic-field > span,
  .auto-rule-card label span {
    font-size: 12px !important;
    letter-spacing: 0.06em !important;
  }
  .horizon-param-grid .text-input,
  .auto-rule-card .text-input,
  .auto-rule-card .select-input,
  .auto-rule-details .settlement-risk-grid .select-input,
  .auto-rule-details .settlement-risk-grid .text-input {
    font-size: 13px !important;
    min-height: 34px !important;
    padding: 5px 8px !important;
  }
  .condition-input {
    font-size: 11.5px !important;
    min-height: 72px !important;
  }
  .settlement-risk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1321px) {
  .combined-settlement-risk .settlement-risk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 720px) {
  .auto-rule-details summary { cursor: default !important; }
  .auto-rule-details summary span,
  .auto-rule-card label span,
  .horizon-row-label,
  .horizon-grid-head,
  .logic-field > span {
    font-size: 12px !important;
    letter-spacing: 0.04em !important;
  }
}

/* DPX v0.3.7 readability and client-maintenance patch */
.auto-heading-actions {
  gap: 10px;
  flex-wrap: wrap;
}
.auto-collapsible-grid.logic-expanded-view {
  grid-template-columns: 1fr !important;
}
.auto-collapsible-grid.logic-expanded-view .auto-rule-card {
  width: 100%;
}
.auto-collapsible-grid.logic-expanded-view .horizon-param-grid {
  max-width: 860px;
}
.auto-collapsible-grid.logic-expanded-view .settlement-risk-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.auto-collapsible-grid.logic-expanded-view .condition-input {
  min-height: 150px !important;
  line-height: 1.55 !important;
  white-space: pre !important;
  overflow: auto !important;
}
.condition-input {
  line-height: 1.45 !important;
  white-space: pre !important;
  overflow: auto !important;
}
.help-dot[title] {
  cursor: help;
}
@media (max-width: 920px) {
  .auto-collapsible-grid.logic-expanded-view .settlement-risk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 560px) {
  .auto-heading-actions > button {
    min-width: 0;
    flex: 1 1 150px;
  }
  .auto-collapsible-grid.logic-expanded-view .condition-input {
    min-height: 120px !important;
  }
}

/* DPX v0.3.7 phone manual trading area hotfix: keep manual inputs readable on narrow phones. */
@media (max-width: 620px) {
  .trade-card .manual-trade-line {
    width: 100%;
    min-width: 0;
  }

  .trade-card .stake-compact-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    align-items: end;
  }

  .trade-card .trade-params-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    align-items: end;
  }

  .trade-card .manual-trade-line > div,
  .trade-card .manual-trade-line .text-input,
  .trade-card .manual-trade-line .select-input {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  .trade-card .manual-trade-line .field-label {
    display: block;
    min-height: 10px;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
    font-size: 0 !important;
    line-height: 1;
    letter-spacing: 0.02em;
  }

  .trade-card .stake-compact-row .preset-field .field-label::after { content: "Preset"; }
  .trade-card .stake-compact-row .stake-field .field-label::after { content: "Stake"; }
  .trade-card .stake-compact-row .fee-field .field-label::after { content: "Fee"; }
  .trade-card .trade-params-row .entry-field .field-label::after { content: "Entry"; }
  .trade-card .trade-params-row .exit-field .field-label::after { content: "Exit"; }
  .trade-card .trade-params-row .risk-field:nth-of-type(3) .field-label::after { content: "SL %"; }
  .trade-card .trade-params-row .risk-field:nth-of-type(4) .field-label::after { content: "TP %"; }

  .trade-card .manual-trade-line .field-label::after {
    font-size: 9px;
    line-height: 1;
  }

  .trade-card .manual-trade-line .text-input,
  .trade-card .manual-trade-line .select-input,
  #presetPercentSelect {
    min-height: 35px !important;
    padding: 6px 7px !important;
    font-size: 12.5px !important;
    line-height: 1.05;
    border-radius: 10px;
  }
}

@media (max-width: 380px) {
  .trade-card .stake-compact-row,
  .trade-card .trade-params-row {
    gap: 4px !important;
  }
  .trade-card .manual-trade-line .text-input,
  .trade-card .manual-trade-line .select-input,
  #presetPercentSelect {
    font-size: 11.5px !important;
    padding-inline: 5px !important;
  }
}

/* DPX v0.3.7 phone manual trade layout correction: keep only two compact rows and prevent label/input overlap. */
@media (max-width: 620px) {
  .trade-card .stake-compact-row,
  .trade-card .trade-params-row {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    align-items: end !important;
    gap: 3px !important;
    margin-top: 4px !important;
  }

  /* Row 1: Preset | Stake | Fee */
  .trade-card .stake-compact-row {
    grid-template-columns: minmax(58px, 0.82fr) minmax(84px, 1.14fr) minmax(50px, 0.62fr) !important;
  }

  /* Row 2: Entry | Exit | SL % | TP % */
  .trade-card .trade-params-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .trade-card .manual-trade-line > div,
  .trade-card .manual-trade-line .text-input,
  .trade-card .manual-trade-line .select-input,
  #presetPercentSelect {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .trade-card .manual-trade-line .field-label {
    display: block !important;
    min-height: 9px !important;
    margin: 0 0 2px 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-size: 0 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
  }

  .trade-card .stake-compact-row .preset-field .field-label::after { content: "Preset" !important; }
  .trade-card .stake-compact-row .stake-field .field-label::after { content: "Stake" !important; }
  .trade-card .stake-compact-row .fee-field .field-label::after { content: "Fee" !important; }
  .trade-card .trade-params-row .entry-field .field-label::after { content: "Entry" !important; }
  .trade-card .trade-params-row .exit-field .field-label::after { content: "Exit" !important; }
  .trade-card .trade-params-row .risk-field:nth-of-type(3) .field-label::after { content: "SL %" !important; }
  .trade-card .trade-params-row .risk-field:nth-of-type(4) .field-label::after { content: "TP %" !important; }

  .trade-card .manual-trade-line .field-label::after {
    display: block !important;
    font-size: 7.6px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
  }

  .trade-card .manual-trade-line .text-input,
  .trade-card .manual-trade-line .select-input,
  #presetPercentSelect {
    min-height: 30px !important;
    height: 30px !important;
    padding: 3px 4px !important;
    font-size: 10.5px !important;
    line-height: 1 !important;
    border-radius: 8px !important;
    letter-spacing: 0 !important;
  }

  .trade-card .trade-params-row .text-input {
    font-size: 10px !important;
    padding-inline: 3px !important;
  }
}

@media (max-width: 380px) {
  .trade-card .stake-compact-row,
  .trade-card .trade-params-row {
    gap: 2px !important;
  }
  .trade-card .stake-compact-row {
    grid-template-columns: minmax(52px, 0.78fr) minmax(76px, 1.12fr) minmax(44px, 0.6fr) !important;
  }
  .trade-card .manual-trade-line .field-label::after {
    font-size: 7px !important;
  }
  .trade-card .manual-trade-line .text-input,
  .trade-card .manual-trade-line .select-input,
  #presetPercentSelect {
    min-height: 28px !important;
    height: 28px !important;
    font-size: 9.8px !important;
    padding-inline: 3px !important;
  }
}

/* DPX v0.3.7 phone manual trade final fix: reset old quick-stake grid areas and keep 2 clean rows. */
@media (max-width: 620px) {
  .trade-card .manual-trade-line .preset-field,
  .trade-card .manual-trade-line .stake-field,
  .trade-card .manual-trade-line .fee-field,
  .trade-card .manual-trade-line .entry-field,
  .trade-card .manual-trade-line .exit-field,
  .trade-card .manual-trade-line .risk-field {
    grid-area: auto !important;
    position: static !important;
    min-width: 0 !important;
  }

  .trade-card .stake-compact-row {
    grid-template-columns: minmax(70px, .9fr) minmax(105px, 1.25fr) minmax(68px, .8fr) !important;
    gap: 6px !important;
  }

  .trade-card .trade-params-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .trade-card .manual-trade-line .field-label {
    display: block !important;
    width: 100% !important;
    height: 12px !important;
    min-height: 12px !important;
    margin: 0 0 3px 0 !important;
    padding: 0 !important;
    text-align: left !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    font-size: 0 !important;
    line-height: 12px !important;
  }

  .trade-card .manual-trade-line .field-label::after {
    display: block !important;
    position: static !important;
    width: 100% !important;
    font-size: 8.5px !important;
    line-height: 12px !important;
    font-weight: 850 !important;
    letter-spacing: 0.01em !important;
    color: var(--muted) !important;
  }

  .trade-card .manual-trade-line .text-input,
  .trade-card .manual-trade-line .select-input,
  #presetPercentSelect {
    display: block !important;
    width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 5px 6px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    border-radius: 9px !important;
  }

  .trade-card .trade-params-row .text-input {
    font-size: 11.5px !important;
    padding-inline: 5px !important;
  }
}

@media (max-width: 380px) {
  .trade-card .stake-compact-row {
    grid-template-columns: minmax(62px, .85fr) minmax(92px, 1.2fr) minmax(56px, .75fr) !important;
    gap: 4px !important;
  }
  .trade-card .trade-params-row {
    gap: 4px !important;
  }
  .trade-card .manual-trade-line .field-label::after {
    font-size: 7.8px !important;
  }
  .trade-card .manual-trade-line .text-input,
  .trade-card .manual-trade-line .select-input,
  #presetPercentSelect {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    font-size: 10.8px !important;
    padding-inline: 4px !important;
  }
}

/* DPX v0.3.7 phone manual trade label restoration: show compact labels without changing other components. */
@media (max-width: 620px) {
  .trade-card .manual-trade-line {
    overflow: visible !important;
  }

  .trade-card .manual-trade-line > div {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .trade-card .stake-compact-row {
    display: grid !important;
    grid-template-columns: minmax(70px, 0.88fr) minmax(112px, 1.28fr) minmax(68px, 0.78fr) !important;
    gap: 6px !important;
    align-items: start !important;
    margin-top: 6px !important;
  }

  .trade-card .trade-params-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    align-items: start !important;
    margin-top: 7px !important;
  }

  .trade-card .manual-trade-line label.field-label {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 13px !important;
    min-height: 13px !important;
    max-height: 13px !important;
    margin: 0 0 3px 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-align: left !important;
    font-size: 0 !important;
    line-height: 13px !important;
  }

  .trade-card .manual-trade-line label.field-label::after {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    color: var(--muted) !important;
    font-size: 8.4px !important;
    line-height: 13px !important;
    font-weight: 850 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
  }

  .trade-card .manual-trade-line label[for="presetPercentSelect"]::after { content: "Preset" !important; }
  .trade-card .manual-trade-line label[for="manualAmount"]::after { content: "Stake" !important; }
  .trade-card .manual-trade-line label[for="feeInput"]::after { content: "Fee" !important; }
  .trade-card .manual-trade-line label[for="entryPresetInput"]::after { content: "Entry" !important; }
  .trade-card .manual-trade-line label[for="exitTargetInput"]::after { content: "Exit" !important; }
  .trade-card .manual-trade-line label[for="stopLossPctInput"]::after { content: "SL %" !important; }
  .trade-card .manual-trade-line label[for="takeProfitPctInput"]::after { content: "TP %" !important; }

  .trade-card .manual-trade-line .text-input,
  .trade-card .manual-trade-line .select-input,
  .trade-card .manual-trade-line #presetPercentSelect {
    display: block !important;
    width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    box-sizing: border-box !important;
    padding: 5px 6px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    border-radius: 9px !important;
  }

  .trade-card .trade-params-row .text-input {
    font-size: 11.5px !important;
    padding-inline: 5px !important;
  }
}

@media (max-width: 380px) {
  .trade-card .stake-compact-row {
    grid-template-columns: minmax(62px, 0.82fr) minmax(98px, 1.22fr) minmax(56px, 0.72fr) !important;
    gap: 4px !important;
  }
  .trade-card .trade-params-row {
    gap: 4px !important;
  }
  .trade-card .manual-trade-line label.field-label::after {
    font-size: 7.7px !important;
  }
  .trade-card .manual-trade-line .text-input,
  .trade-card .manual-trade-line .select-input,
  .trade-card .manual-trade-line #presetPercentSelect {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    font-size: 10.8px !important;
    padding-inline: 4px !important;
  }
}


/* DPX v0.3.7 final phone manual trade area restore: visible labels, exactly 2 rows, no overlap. */
@media (max-width: 620px) {
  .trade-card .manual-trade-line {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    align-items: start !important;
    box-sizing: border-box !important;
  }

  .trade-card .stake-compact-row {
    grid-template-columns: minmax(78px, .9fr) minmax(126px, 1.45fr) minmax(72px, .8fr) !important;
    column-gap: 8px !important;
    row-gap: 0 !important;
    margin: 12px 0 0 0 !important;
  }

  .trade-card .trade-params-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    column-gap: 8px !important;
    row-gap: 0 !important;
    margin: 11px 0 0 0 !important;
  }

  .trade-card .manual-trade-line > div,
  .trade-card .manual-trade-line .preset-field,
  .trade-card .manual-trade-line .stake-field,
  .trade-card .manual-trade-line .fee-field,
  .trade-card .manual-trade-line .entry-field,
  .trade-card .manual-trade-line .exit-field,
  .trade-card .manual-trade-line .risk-field {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    grid-area: auto !important;
    position: static !important;
    min-width: 0 !important;
    width: auto !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .trade-card .manual-trade-line label.field-label,
  .trade-card .manual-trade-line .field-label {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 100% !important;
    height: 14px !important;
    min-height: 14px !important;
    max-height: 14px !important;
    margin: 0 0 5px 0 !important;
    padding: 0 !important;
    color: var(--muted) !important;
    font-size: 10px !important;
    line-height: 14px !important;
    font-weight: 850 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-align: left !important;
  }

  .trade-card .manual-trade-line label.field-label::after,
  .trade-card .manual-trade-line .field-label::after {
    content: none !important;
    display: none !important;
  }

  .trade-card .manual-trade-line .text-input,
  .trade-card .manual-trade-line .select-input,
  .trade-card .manual-trade-line #presetPercentSelect {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 39px !important;
    min-height: 39px !important;
    max-height: 39px !important;
    padding: 7px 8px !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
    line-height: 1.1 !important;
    border-radius: 10px !important;
    letter-spacing: 0 !important;
  }

  .trade-card .trade-params-row .text-input {
    font-size: 15px !important;
    padding-inline: 7px !important;
  }
}

@media (max-width: 380px) {
  .trade-card .stake-compact-row {
    grid-template-columns: minmax(66px, .86fr) minmax(108px, 1.34fr) minmax(58px, .74fr) !important;
    column-gap: 6px !important;
  }

  .trade-card .trade-params-row {
    column-gap: 6px !important;
  }

  .trade-card .manual-trade-line label.field-label,
  .trade-card .manual-trade-line .field-label {
    font-size: 9.4px !important;
  }

  .trade-card .manual-trade-line .text-input,
  .trade-card .manual-trade-line .select-input,
  .trade-card .manual-trade-line #presetPercentSelect {
    height: 37px !important;
    min-height: 37px !important;
    max-height: 37px !important;
    font-size: 15px !important;
    padding-inline: 6px !important;
  }

  .trade-card .trade-params-row .text-input {
    font-size: 14px !important;
    padding-inline: 5px !important;
  }
}

/* DPX v0.3.7 phone manual row width tune: wider Entry/Exit, narrower SL/TP only. */
@media (max-width: 620px) {
  .trade-card .trade-params-row {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, .95fr) minmax(0, .95fr) !important;
    column-gap: 7px !important;
  }

  .trade-card .trade-params-row .entry-field .text-input,
  .trade-card .trade-params-row .exit-field .text-input {
    font-size: 15.5px !important;
    padding-inline: 6px !important;
  }

  .trade-card .trade-params-row .risk-field .text-input {
    font-size: 14px !important;
    padding-inline: 5px !important;
  }
}

@media (max-width: 380px) {
  .trade-card .trade-params-row {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.55fr) minmax(0, .85fr) minmax(0, .85fr) !important;
    column-gap: 5px !important;
  }

  .trade-card .trade-params-row .entry-field .text-input,
  .trade-card .trade-params-row .exit-field .text-input {
    font-size: 14.2px !important;
    padding-inline: 5px !important;
  }

  .trade-card .trade-params-row .risk-field .text-input {
    font-size: 12.5px !important;
    padding-inline: 4px !important;
  }
}

/* v0.3.7 client comments patch */
.auto-rule-details > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  cursor: default !important;
}
.section-default-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
}
.mini-section-btn,
.logic-expand-toggle,
.mini-clear-btn {
  min-height: 24px !important;
  padding: 4px 8px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(225,234,255,.18) !important;
  background: rgba(255,255,255,.07) !important;
  color: #e9f1ff !important;
  font-size: .66rem !important;
  font-weight: 800 !important;
  letter-spacing: .01em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.logic-expand-toggle {
  width: 26px !important;
  padding-inline: 0 !important;
  font-size: .9rem !important;
}
.logic-field > span {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}
.logic-field .logic-expand-toggle { margin-left: 2px !important; }
.log-panel-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 6px !important;
}
.log-panel-header strong { margin: 0 !important; }
.mini-clear-btn { min-width: 58px !important; }
.daily-win-rate {
  color: rgba(225,234,255,.78) !important;
  font-size: .84em !important;
  white-space: nowrap !important;
}
.open-pnl {
  color: rgba(225,234,255,.72) !important;
  font-weight: 900 !important;
}
#tvChart a[href*="tradingview"],
#tvChart [aria-label*="TradingView"],
#tvChart [class*="logo"] {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
@media (max-width: 720px) {
  .section-default-actions { gap: 4px !important; }
  .mini-section-btn,
  .logic-expand-toggle,
  .mini-clear-btn {
    min-height: 22px !important;
    padding: 2px 5px !important;
    border-radius: 8px !important;
    font-size: .58rem !important;
  }
  .logic-expand-toggle { width: 22px !important; font-size: .75rem !important; }
  .auto-rule-details > summary { gap: 5px !important; }
}
@media (max-width: 520px) {
  .trade-card .trade-params-row #exitTargetInput::placeholder,
  .trade-card .trade-params-row #stopLossPctInput::placeholder,
  .trade-card .trade-params-row #takeProfitPctInput::placeholder {
    font-size: .62em !important;
    letter-spacing: 0 !important;
  }
  .trade-card .trade-params-row #exitTargetInput::-webkit-input-placeholder,
  .trade-card .trade-params-row #stopLossPctInput::-webkit-input-placeholder,
  .trade-card .trade-params-row #takeProfitPctInput::-webkit-input-placeholder {
    font-size: .62em !important;
    letter-spacing: 0 !important;
  }
}


/* DPX v0.3.7 same-name client layout fix: closed by default, compact header, no condition scrollbars. */
#autoExpandConditions {
  display: none !important;
}
.auto-trading-card.auto-easy-card {
  padding: 10px 14px !important;
  margin-top: 10px !important;
}
.auto-heading {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  margin: 0 !important;
}
.auto-title-block {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}
.auto-heading .eyebrow {
  margin: 0 !important;
  font-size: 0.72rem !important;
  line-height: 1 !important;
  letter-spacing: 0.17em !important;
  white-space: nowrap !important;
}
.auto-status-pill {
  padding: 6px 12px !important;
  min-height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  font-size: 0.78rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.auto-heading-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
  flex-wrap: nowrap !important;
  width: auto !important;
  margin-left: auto !important;
}
.auto-heading-actions button {
  min-height: 32px !important;
  padding: 7px 12px !important;
  font-size: 0.72rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.auto-collapsible-grid {
  margin-top: 8px !important;
  gap: 8px !important;
}
.auto-rule-details {
  overflow: visible !important;
}
.auto-rule-details > summary {
  min-height: 28px !important;
  padding: 6px 8px !important;
  gap: 6px !important;
}
.auto-rule-details > summary > span:first-child,
.auto-rule-details summary span,
.auto-rule-details .settlement-risk-grid > label span,
.horizon-row-label,
.horizon-grid-head,
.logic-field > span,
.auto-rule-card label span {
  font-size: 0.62rem !important;
  line-height: 1.04 !important;
  letter-spacing: 0.05em !important;
}
.section-default-actions {
  gap: 4px !important;
}
.mini-section-btn,
.logic-expand-toggle,
.mini-clear-btn {
  min-height: 20px !important;
  padding: 3px 6px !important;
  border-radius: 7px !important;
  font-size: 0.56rem !important;
}
.logic-expand-toggle {
  width: 22px !important;
}
.auto-rule-help,
.auto-rule-details .auto-field,
.auto-rule-details .auto-field-grid {
  margin-left: 8px !important;
  margin-right: 8px !important;
  margin-bottom: 6px !important;
}
.horizon-param-grid {
  grid-template-columns: minmax(76px, .9fr) repeat(3, minmax(52px, .65fr)) !important;
  gap: 4px !important;
  margin: 0 8px 6px !important;
}
.horizon-param-grid .text-input,
.auto-rule-card .text-input,
.auto-rule-card .select-input,
.auto-rule-details .settlement-risk-grid .select-input,
.auto-rule-details .settlement-risk-grid .text-input {
  min-height: 28px !important;
  padding: 4px 6px !important;
  font-size: 0.72rem !important;
  border-radius: 8px !important;
}
.auto-rule-details .settlement-risk-grid {
  gap: 5px !important;
}
.logic-field > span {
  margin-bottom: 4px !important;
}
.logic-toggle {
  min-height: 20px !important;
  padding: 3px 6px !important;
  font-size: 0.56rem !important;
  border-radius: 7px !important;
}
.condition-input,
.auto-collapsible-grid.logic-expanded-view .condition-input,
.auto-rule-details textarea.condition-input {
  min-height: 78px !important;
  height: auto;
  max-height: none !important;
  resize: none !important;
  overflow: hidden !important;
  white-space: pre-wrap !important;
  padding: 8px 10px !important;
  font-size: 10.4px !important;
  line-height: 1.34 !important;
  border-radius: 10px !important;
}
.auto-collapsible-grid.logic-expanded-view {
  grid-template-columns: minmax(390px, 1.05fr) minmax(390px, 1.05fr) minmax(285px, .75fr) !important;
  align-items: start !important;
}
.auto-collapsible-grid.logic-expanded-view .settlement-risk-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.auto-output-grid {
  margin-top: 8px !important;
  gap: 8px !important;
}
.log-panel-header {
  margin-bottom: 4px !important;
}
.auto-output-box {
  margin-top: 4px !important;
  min-height: 54px !important;
  max-height: 118px !important;
  padding: 8px 10px !important;
  font-size: 10.8px !important;
  line-height: 1.32 !important;
}
@media (max-width: 1120px) {
  .auto-heading {
    flex-wrap: wrap !important;
  }
  .auto-heading-actions {
    flex: 1 1 100% !important;
    justify-content: flex-start !important;
  }
  .auto-collapsible-grid.logic-expanded-view {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 620px) {
  .auto-trading-card.auto-easy-card {
    padding: 8px 10px !important;
  }
  .auto-title-block {
    gap: 6px !important;
    flex-wrap: wrap !important;
  }
  .auto-heading .eyebrow {
    font-size: 0.62rem !important;
  }
  .auto-status-pill {
    min-height: 26px !important;
    padding: 5px 9px !important;
    font-size: 0.66rem !important;
  }
  .auto-heading-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }
  .auto-heading-actions button {
    min-height: 30px !important;
    padding: 6px 5px !important;
    font-size: 0.62rem !important;
  }
  .horizon-param-grid {
    grid-template-columns: minmax(66px, .88fr) repeat(3, minmax(42px, .62fr)) !important;
    gap: 3px !important;
    margin: 0 6px 5px !important;
  }
  .horizon-param-grid .text-input,
  .auto-rule-card .text-input,
  .auto-rule-card .select-input,
  .auto-rule-details .settlement-risk-grid .select-input,
  .auto-rule-details .settlement-risk-grid .text-input {
    min-height: 31px !important;
    padding: 4px 5px !important;
    font-size: 0.68rem !important;
  }
  .condition-input,
  .auto-collapsible-grid.logic-expanded-view .condition-input,
  .auto-rule-details textarea.condition-input {
    min-height: 92px !important;
    font-size: 9.8px !important;
    line-height: 1.32 !important;
  }
  .auto-output-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 380px) {
  .auto-heading-actions button {
    font-size: 0.56rem !important;
    padding-inline: 3px !important;
  }
  .condition-input,
  .auto-collapsible-grid.logic-expanded-view .condition-input,
  .auto-rule-details textarea.condition-input {
    font-size: 9.2px !important;
  }
}

/* DPX v0.3.10 comments #14-#15: prediction-button manual order flow. */
.trade-card .prediction-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 3px 0 5px !important;
}

.prediction-wide-chip {
  min-height: 86px !important;
  padding: 7px 8px !important;
  display: grid !important;
  grid-template-rows: auto auto 1fr auto !important;
  align-items: center !important;
  gap: 2px !important;
  border-radius: 13px !important;
}

.prediction-wide-top {
  display: grid !important;
  grid-template-columns: 24px minmax(38px, 1fr) 34px !important;
  align-items: center !important;
  gap: 3px !important;
  line-height: 1 !important;
}

.prediction-wide-chip .prediction-minute,
.prediction-wide-chip .prediction-confidence,
.prediction-wide-chip .prediction-wide-label,
.prediction-wide-chip .prediction-wide-tp {
  color: rgba(235, 242, 255, .96) !important;
  font-size: 10px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  letter-spacing: .01em !important;
}

.prediction-wide-chip .prediction-side {
  display: block !important;
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  text-align: center !important;
  letter-spacing: .03em !important;
}

.prediction-wide-chip .prediction-wide-label {
  opacity: .88 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
}

.prediction-wide-chip .prediction-wide-target {
  display: block !important;
  width: 100% !important;
  text-align: right !important;
  white-space: nowrap !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace !important;
  font-variant-numeric: tabular-nums !important;
  font-size: 13px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  letter-spacing: -.02em !important;
}

.prediction-wide-chip .prediction-wide-tp {
  text-align: right !important;
  white-space: nowrap !important;
}

.prediction-order-row {
  display: grid !important;
  grid-template-columns: minmax(120px, .9fr) minmax(105px, .7fr) minmax(105px, .7fr) !important;
  gap: 7px !important;
  align-items: end !important;
  margin-top: 4px !important;
}

.prediction-action-row {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin-top: 7px !important;
}

@media (max-width: 920px) {
  .trade-card .prediction-strip {
    grid-template-columns: repeat(6, minmax(112px, 1fr)) !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
    -webkit-overflow-scrolling: touch;
  }
  .prediction-wide-chip { min-height: 78px !important; }
  .prediction-wide-chip .prediction-side { font-size: 13px !important; }
  .prediction-wide-chip .prediction-wide-target { font-size: 12px !important; }
}

@media (max-width: 520px) {
  .prediction-order-row {
    grid-template-columns: .8fr .55fr .65fr !important;
    gap: 5px !important;
  }
  .prediction-order-row .field-label {
    font-size: 9px !important;
    min-height: 14px !important;
  }
  .prediction-order-row .text-input,
  .prediction-order-row .select-input {
    min-height: 37px !important;
    font-size: 12px !important;
    padding: 6px 7px !important;
  }
  .prediction-action-row .action-secondary {
    min-height: 39px !important;
    font-size: 12px !important;
  }
}

/* DPX v0.3.10 prediction layout patch: PC keeps 6 wide buttons; phone uses 2 rows of 3 with clean text placement. */
.trade-card .prediction-strip {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 7px !important;
  overflow: visible !important;
  padding-bottom: 0 !important;
  align-items: stretch !important;
}

.prediction-wide-chip {
  min-width: 0 !important;
  min-height: 84px !important;
  padding: 7px 6px !important;
  text-align: center !important;
  justify-items: stretch !important;
  align-items: center !important;
  grid-template-rows: 18px 13px 22px 15px !important;
  row-gap: 1px !important;
  overflow: hidden !important;
}

.prediction-wide-top {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) 32px !important;
  align-items: center !important;
  column-gap: 2px !important;
  width: 100% !important;
}

.prediction-wide-chip .prediction-minute {
  text-align: left !important;
}

.prediction-wide-chip .prediction-side {
  text-align: center !important;
  font-size: 15px !important;
  letter-spacing: .04em !important;
  white-space: nowrap !important;
}

.prediction-wide-chip .prediction-confidence {
  text-align: right !important;
}

.prediction-wide-chip .prediction-wide-label {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  font-size: 9px !important;
  letter-spacing: .045em !important;
  white-space: nowrap !important;
}

.prediction-wide-chip .prediction-wide-target,
.prediction-wide-chip .prediction-wide-tp {
  display: block !important;
  width: 100% !important;
  text-align: right !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: -.055em !important;
}

.prediction-wide-chip .prediction-wide-target {
  font-size: 12.8px !important;
  line-height: 1.05 !important;
}

.prediction-wide-chip .prediction-wide-tp {
  font-size: 10px !important;
  line-height: 1.05 !important;
}

@media (max-width: 920px) {
  .trade-card .prediction-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(86px, auto) !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    gap: 6px !important;
    padding-bottom: 0 !important;
  }

  .prediction-wide-chip {
    min-height: 86px !important;
    padding: 7px 6px !important;
    grid-template-rows: 18px 13px 22px 15px !important;
  }

  .prediction-wide-top {
    grid-template-columns: 24px minmax(0, 1fr) 31px !important;
  }

  .prediction-wide-chip .prediction-side {
    font-size: 14px !important;
  }

  .prediction-wide-chip .prediction-wide-target {
    font-size: 12px !important;
    letter-spacing: -.06em !important;
  }

  .prediction-wide-chip .prediction-wide-tp {
    font-size: 9.5px !important;
    letter-spacing: -.035em !important;
  }
}

@media (max-width: 430px) {
  .trade-card .prediction-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .prediction-wide-chip {
    min-height: 88px !important;
    padding: 7px 5px !important;
    border-radius: 12px !important;
  }

  .prediction-wide-top {
    grid-template-columns: 21px minmax(0, 1fr) 28px !important;
  }

  .prediction-wide-chip .prediction-minute,
  .prediction-wide-chip .prediction-confidence {
    font-size: 9px !important;
  }

  .prediction-wide-chip .prediction-side {
    font-size: 13px !important;
  }

  .prediction-wide-chip .prediction-wide-label {
    font-size: 8px !important;
    letter-spacing: .035em !important;
  }

  .prediction-wide-chip .prediction-wide-target {
    font-size: 11px !important;
    letter-spacing: -.075em !important;
  }

  .prediction-wide-chip .prediction-wide-tp {
    font-size: 8.5px !important;
    letter-spacing: -.045em !important;
  }
}

/* DPX v0.3.10 comments: prediction action buttons stacked vertically with table-like info. */
.trade-card .prediction-table-layout {
  display: grid !important;
  grid-template-columns: minmax(180px, .98fr) minmax(120px, .72fr) minmax(72px, .42fr) minmax(64px, .34fr) !important;
  gap: 6px 10px !important;
  align-items: center !important;
  overflow: visible !important;
  padding: 2px 0 4px !important;
}
.prediction-table-head {
  color: #f3f7ff !important;
  font-weight: 900 !important;
  font-size: 13px !important;
  line-height: 1 !important;
  text-align: right !important;
  letter-spacing: .015em !important;
  white-space: nowrap !important;
}
.prediction-button-head { visibility: hidden !important; }
.prediction-action-cell {
  min-height: 30px !important;
  border-radius: 8px !important;
  padding: 4px 9px !important;
  display: grid !important;
  grid-template-columns: minmax(52px, 1fr) 42px 44px !important;
  gap: 4px !important;
  align-items: center !important;
  justify-items: center !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 3px rgba(0,0,0,.35) !important;
  font-weight: 900 !important;
  color: #fff !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
}
.prediction-action-cell.call { background: linear-gradient(180deg,#22d46f,#0a8f41) !important; }
.prediction-action-cell.put { background: linear-gradient(180deg,#fb668a,#c53258) !important; }
.prediction-action-cell.wait,
.prediction-action-cell:disabled {
  background: linear-gradient(180deg,#5a6674,#3a4552) !important;
  cursor: not-allowed !important;
  opacity: .75 !important;
}
.prediction-action-cell.selected {
  outline: 2px solid rgba(139,247,161,.7) !important;
  outline-offset: 1px !important;
}
.pred-side { font-size: 15px !important; letter-spacing: .04em !important; justify-self: start !important; }
.pred-minute,
.pred-conf { font-size: 12px !important; letter-spacing: .03em !important; white-space: nowrap !important; }
.prediction-info-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace !important;
  font-size: 13px !important;
  line-height: 1 !important;
  text-align: right !important;
  color: #f8fbff !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}
.tp-pct-cell { font-weight: 800 !important; }
.auto-logic-help {
  grid-column: 1 / -1 !important;
  border: 1px solid rgba(113, 203, 218, .28) !important;
  border-radius: 12px !important;
  background: rgba(5, 13, 24, .42) !important;
  padding: 9px 12px !important;
  color: #d8e4f5 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}
.auto-logic-help strong {
  display: block !important;
  margin-bottom: 4px !important;
  color: #83f2ff !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
}
.auto-logic-help div { margin-top: 3px !important; }
#ledgerPriceDetailsToggle { min-width: 104px !important; }

@media (max-width: 920px) {
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(132px, 1.08fr) minmax(84px, .86fr) minmax(54px, .52fr) minmax(48px, .46fr) !important;
    gap: 5px 6px !important;
  }
  .prediction-table-head { font-size: 11px !important; }
  .prediction-action-cell {
    min-height: 32px !important;
    padding: 4px 7px !important;
    grid-template-columns: minmax(44px, 1fr) 33px 36px !important;
    gap: 3px !important;
  }
  .pred-side { font-size: 13px !important; }
  .pred-minute,
  .pred-conf { font-size: 10px !important; }
  .prediction-info-cell { font-size: 11px !important; letter-spacing: -.04em !important; }
  .prediction-order-row { grid-template-columns: 1fr 1fr 1fr !important; }
}

@media (max-width: 430px) {
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(124px, 1.12fr) minmax(78px, .82fr) minmax(45px, .46fr) minmax(43px, .42fr) !important;
    gap: 5px 4px !important;
  }
  .prediction-table-head { font-size: 10px !important; letter-spacing: -.02em !important; }
  .prediction-action-cell {
    min-height: 31px !important;
    padding: 3px 6px !important;
    border-radius: 7px !important;
    grid-template-columns: minmax(40px, 1fr) 31px 32px !important;
  }
  .pred-side { font-size: 12px !important; }
  .pred-minute,
  .pred-conf { font-size: 9px !important; }
  .prediction-info-cell { font-size: 10px !important; letter-spacing: -.065em !important; }
  .auto-logic-help { font-size: 11px !important; padding: 8px !important; }
  #ledgerPriceDetailsToggle { min-width: 86px !important; }
}

/* DPX v0.3.10 same-name layout patch: PC matches client table illustration; phone keeps inputs below compact prediction rows. */
.trade-card .prediction-workbench {
  display: grid !important;
  grid-template-columns: minmax(220px, .82fr) minmax(420px, 1.18fr) !important;
  gap: 10px 22px !important;
  align-items: end !important;
  margin-top: 8px !important;
}
.trade-card .prediction-workbench .prediction-order-row {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 9px !important;
  align-items: stretch !important;
  align-content: end !important;
  margin: 0 !important;
  min-width: 0 !important;
}
.trade-card .prediction-workbench .prediction-order-row > div {
  min-width: 0 !important;
  width: 100% !important;
}
.trade-card .prediction-workbench .prediction-order-row .field-label {
  min-height: 17px !important;
  margin-bottom: 4px !important;
}
.trade-card .prediction-workbench .prediction-order-row .text-input,
.trade-card .prediction-workbench .prediction-order-row .select-input {
  min-height: 46px !important;
  height: 46px !important;
  font-size: 16px !important;
  padding: 8px 12px !important;
  width: 100% !important;
}
.trade-card .prediction-table-layout {
  display: grid !important;
  grid-template-columns: minmax(220px, .98fr) minmax(130px, .58fr) minmax(72px, .32fr) minmax(62px, .28fr) !important;
  grid-auto-rows: auto !important;
  gap: 5px 12px !important;
  align-items: center !important;
  align-content: start !important;
  margin: 0 !important;
  padding: 0 0 2px !important;
  width: 100% !important;
  overflow: visible !important;
}
.trade-card .prediction-table-layout > * {
  align-self: center !important;
}
.trade-card .prediction-table-head {
  font-size: 13px !important;
  line-height: 1.1 !important;
  padding: 0 0 2px !important;
  margin: 0 !important;
  text-align: right !important;
}
.trade-card .prediction-action-cell {
  min-height: 32px !important;
  height: 32px !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  grid-template-columns: minmax(74px, 1fr) 44px 48px !important;
  gap: 5px !important;
}
.trade-card .pred-side { font-size: 15px !important; }
.trade-card .pred-minute,
.trade-card .pred-conf { font-size: 12px !important; }
.trade-card .prediction-info-cell {
  font-size: 13px !important;
  line-height: 1.05 !important;
  padding: 0 !important;
  margin: 0 !important;
  letter-spacing: -.035em !important;
}
.trade-card .prediction-action-row {
  width: 58% !important;
  min-width: 420px !important;
  margin-left: auto !important;
  margin-top: 7px !important;
  gap: 8px !important;
}

@media (max-width: 920px) {
  .trade-card .prediction-workbench {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    margin-top: 7px !important;
  }
  .trade-card .prediction-table-layout {
    order: 1 !important;
    grid-template-columns: minmax(132px, 1.08fr) minmax(86px, .82fr) minmax(55px, .48fr) minmax(47px, .42fr) !important;
    grid-auto-rows: auto !important;
    grid-template-rows: none !important;
    row-gap: 3px !important;
    column-gap: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: center !important;
    align-content: start !important;
  }
  .trade-card .prediction-workbench .prediction-order-row {
    order: 2 !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 6px !important;
    margin-top: 5px !important;
  }
  .trade-card .prediction-table-head {
    font-size: 10.5px !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .trade-card .prediction-action-cell {
    min-height: 30px !important;
    height: 30px !important;
    padding: 3px 6px !important;
    grid-template-columns: minmax(48px, 1fr) 34px 36px !important;
    gap: 3px !important;
    border-radius: 7px !important;
  }
  .trade-card .pred-side { font-size: 13px !important; letter-spacing: .06em !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 10px !important; }
  .trade-card .prediction-info-cell {
    font-size: 10.7px !important;
    line-height: 1 !important;
    letter-spacing: -.055em !important;
  }
  .trade-card .prediction-workbench .prediction-order-row .field-label {
    font-size: 10px !important;
    min-height: 14px !important;
    margin-bottom: 3px !important;
  }
  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input {
    min-height: 38px !important;
    height: 38px !important;
    font-size: 13px !important;
    padding: 5px 7px !important;
  }
  .trade-card .prediction-action-row {
    width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-top: 7px !important;
  }
}

@media (max-width: 430px) {
  .trade-card .prediction-workbench { gap: 5px !important; }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(134px, 1.14fr) minmax(76px, .74fr) minmax(45px, .42fr) minmax(41px, .38fr) !important;
    row-gap: 2px !important;
    column-gap: 4px !important;
  }
  .trade-card .prediction-action-cell {
    min-height: 29px !important;
    height: 29px !important;
    padding: 3px 6px !important;
    grid-template-columns: minmax(43px, 1fr) 31px 33px !important;
    gap: 2px !important;
  }
  .trade-card .pred-side { font-size: 12px !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 9px !important; }
  .trade-card .prediction-info-cell { font-size: 10px !important; letter-spacing: -.07em !important; }
  .trade-card .prediction-table-head { font-size: 10px !important; }
  .trade-card .prediction-workbench .prediction-order-row {
    gap: 5px !important;
    margin-top: 4px !important;
  }
}

/* DPX v0.3.10 same-name final layout patch: match client reference table format and prevent PC text overflow. */
.trade-card {
  overflow: hidden !important;
}

.trade-card .prediction-workbench {
  display: grid !important;
  grid-template-columns: minmax(185px, .43fr) minmax(0, .57fr) !important;
  gap: 10px 14px !important;
  align-items: end !important;
  margin-top: 8px !important;
  min-width: 0 !important;
  width: 100% !important;
}

.trade-card .prediction-workbench .prediction-order-row {
  order: 1 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 9px !important;
  align-items: stretch !important;
  align-content: end !important;
  margin: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
}

.trade-card .prediction-table-layout {
  order: 2 !important;
  display: grid !important;
  grid-template-columns: minmax(128px, .95fr) minmax(82px, .67fr) minmax(44px, .36fr) minmax(42px, .34fr) !important;
  grid-auto-rows: auto !important;
  gap: 6px 7px !important;
  align-items: center !important;
  align-content: start !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 8px 8px 9px !important;
  background: #ffffff !important;
  color: #000000 !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.trade-card .prediction-table-head {
  color: #000000 !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  text-align: right !important;
  white-space: nowrap !important;
  letter-spacing: 0 !important;
  padding: 0 0 4px !important;
  margin: 0 !important;
}

.trade-card .prediction-button-head {
  visibility: hidden !important;
}

.trade-card .prediction-action-cell {
  display: grid !important;
  grid-template-columns: minmax(48px, 1fr) 34px 38px !important;
  gap: 4px !important;
  align-items: center !important;
  justify-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(0, 0, 0, .55) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 1px 3px rgba(0,0,0,.45) !important;
  color: #ffffff !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
  overflow: hidden !important;
}

.trade-card .prediction-action-cell.call {
  background: linear-gradient(180deg, #2ce879 0%, #0ca846 50%, #087a33 100%) !important;
}

.trade-card .prediction-action-cell.put {
  background: linear-gradient(180deg, #ff6f92 0%, #df3f66 50%, #b42f51 100%) !important;
}

.trade-card .prediction-action-cell.wait,
.trade-card .prediction-action-cell:disabled {
  background: linear-gradient(180deg, #6a747f 0%, #4d5863 100%) !important;
  opacity: .9 !important;
}

.trade-card .prediction-action-cell.selected {
  outline: 2px solid rgba(0, 108, 52, .9) !important;
  outline-offset: 1px !important;
}

.trade-card .pred-side {
  justify-self: start !important;
  min-width: 0 !important;
  color: #ffffff !important;
  font-size: 15px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: .035em !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.trade-card .pred-minute,
.trade-card .pred-conf {
  color: #ffffff !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: .02em !important;
  white-space: nowrap !important;
}

.trade-card .prediction-info-cell {
  color: #000000 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace !important;
  font-variant-numeric: tabular-nums !important;
  font-size: 12.8px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  text-align: right !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  letter-spacing: -.035em !important;
}

.trade-card .tp-pct-cell {
  font-weight: 800 !important;
}

.trade-card .prediction-workbench .prediction-order-row .field-label {
  min-height: 16px !important;
  margin-bottom: 4px !important;
}

.trade-card .prediction-workbench .prediction-order-row .text-input,
.trade-card .prediction-workbench .prediction-order-row .select-input,
.trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
  height: 43px !important;
  min-height: 43px !important;
  max-height: 43px !important;
  font-size: 15px !important;
  padding: 7px 10px !important;
  width: 100% !important;
}

.trade-card .prediction-action-row {
  width: calc(57% - 7px) !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-top: 8px !important;
  gap: 8px !important;
}

@media (min-width: 1041px) and (max-width: 1260px) {
  .trade-card .prediction-workbench {
    grid-template-columns: minmax(165px, .40fr) minmax(0, .60fr) !important;
    gap: 8px 10px !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(118px, .92fr) minmax(78px, .64fr) minmax(40px, .34fr) minmax(39px, .32fr) !important;
    gap: 5px 5px !important;
    padding: 7px 6px 8px !important;
  }
  .trade-card .prediction-action-cell {
    grid-template-columns: minmax(42px, 1fr) 30px 34px !important;
    gap: 3px !important;
    padding-inline: 6px !important;
  }
  .trade-card .pred-side { font-size: 13px !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 10.5px !important; }
  .trade-card .prediction-info-cell { font-size: 11.5px !important; letter-spacing: -.045em !important; }
}

@media (max-width: 1040px) {
  .trade-card .prediction-workbench {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 8px !important;
    width: 100% !important;
  }

  .trade-card .prediction-table-layout {
    order: 1 !important;
    grid-template-columns: minmax(150px, 1.04fr) minmax(88px, .64fr) minmax(50px, .38fr) minmax(48px, .36fr) !important;
    gap: 7px 6px !important;
    padding: 8px 7px 9px !important;
    width: 100% !important;
  }

  .trade-card .prediction-workbench .prediction-order-row {
    order: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-top: 4px !important;
    width: 100% !important;
  }

  .trade-card .prediction-action-cell {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    grid-template-columns: minmax(62px, 1fr) 34px 38px !important;
    gap: 4px !important;
    padding: 5px 8px !important;
  }

  .trade-card .pred-side { font-size: 14px !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 11px !important; }
  .trade-card .prediction-info-cell { font-size: 12px !important; letter-spacing: -.035em !important; }

  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input,
  .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    height: 39px !important;
    min-height: 39px !important;
    max-height: 39px !important;
    font-size: 14px !important;
    padding: 6px 8px !important;
  }

  .trade-card .prediction-action-row {
    width: 100% !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 430px) {
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(132px, 1.06fr) minmax(76px, .62fr) minmax(44px, .36fr) minmax(41px, .34fr) !important;
    row-gap: 6px !important;
    column-gap: 4px !important;
    padding: 7px 5px 8px !important;
  }

  .trade-card .prediction-table-head {
    font-size: 10.5px !important;
    padding-bottom: 3px !important;
  }

  .trade-card .prediction-action-cell {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    grid-template-columns: minmax(52px, 1fr) 31px 34px !important;
    gap: 3px !important;
    padding: 4px 7px !important;
  }

  .trade-card .pred-side { font-size: 13px !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 10px !important; }
  .trade-card .prediction-info-cell { font-size: 10.8px !important; letter-spacing: -.052em !important; }

  .trade-card .prediction-workbench .prediction-order-row {
    gap: 7px !important;
    margin-top: 5px !important;
  }

  .trade-card .prediction-workbench .prediction-order-row .field-label {
    font-size: 10px !important;
    min-height: 14px !important;
    margin-bottom: 3px !important;
  }

  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input,
  .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    font-size: 13px !important;
    padding: 6px 7px !important;
  }
}

@media (max-width: 370px) {
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(122px, 1.05fr) minmax(70px, .60fr) minmax(40px, .34fr) minmax(38px, .32fr) !important;
    column-gap: 3px !important;
  }
  .trade-card .prediction-action-cell {
    grid-template-columns: minmax(46px, 1fr) 28px 31px !important;
    padding-inline: 5px !important;
  }
  .trade-card .prediction-info-cell { font-size: 10px !important; }
}

/* DPX v0.3.10 same-name client trading-area format fix: sample-style white panel, wider table, compact inputs. */
.trade-card .entry-override-marker,
.trade-card #entryOverrideReset {
  display: none !important;
  visibility: hidden !important;
}

.trade-card .prediction-workbench {
  display: grid !important;
  grid-template-columns: minmax(190px, .28fr) minmax(0, .72fr) !important;
  gap: 12px !important;
  align-items: stretch !important;
  width: 100% !important;
  margin-top: 8px !important;
}

.trade-card .prediction-workbench .prediction-order-row {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  align-self: start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.trade-card .prediction-panel {
  display: grid !important;
  grid-template-rows: auto auto !important;
  gap: 8px !important;
  align-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 9px 11px 10px !important;
  background: #ffffff !important;
  color: #000000 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: Arial, Helvetica, sans-serif !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.trade-card .prediction-table-layout {
  display: grid !important;
  grid-template-columns: minmax(150px, .90fr) minmax(100px, .58fr) minmax(56px, .30fr) minmax(52px, .30fr) !important;
  gap: 6px 8px !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

.trade-card .prediction-table-head {
  color: #000000 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  text-align: right !important;
  letter-spacing: 0 !important;
  padding: 0 0 6px !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

.trade-card .prediction-action-cell {
  display: grid !important;
  grid-template-columns: minmax(56px, 1fr) 38px 40px !important;
  align-items: center !important;
  justify-items: center !important;
  gap: 5px !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 33px !important;
  min-height: 33px !important;
  max-height: 33px !important;
  padding: 4px 9px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(0,0,0,.62) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 1px 4px rgba(0,0,0,.45) !important;
  color: #ffffff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  text-transform: uppercase !important;
  overflow: hidden !important;
}

.trade-card .pred-side {
  justify-self: start !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  color: #ffffff !important;
  white-space: nowrap !important;
}
.trade-card .pred-minute,
.trade-card .pred-conf {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
}

.trade-card .prediction-info-cell {
  color: #000000 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-variant-numeric: tabular-nums !important;
  font-size: 12.6px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  text-align: right !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  letter-spacing: 0 !important;
}
.trade-card .tp-pct-cell { font-weight: 800 !important; }

.trade-card .prediction-workbench .prediction-order-row .field-label {
  min-height: 14px !important;
  margin: 0 0 3px !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 11px !important;
}
.trade-card .prediction-workbench .prediction-order-row .text-input,
.trade-card .prediction-workbench .prediction-order-row .select-input,
.trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
  width: 100% !important;
  height: 39px !important;
  min-height: 39px !important;
  max-height: 39px !important;
  padding: 6px 10px !important;
  border-radius: 11px !important;
  font-size: 15px !important;
  box-sizing: border-box !important;
}

.trade-card .prediction-panel .prediction-action-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}
.trade-card .prediction-panel .prediction-action-row .action-secondary {
  min-height: 39px !important;
  height: 39px !important;
  padding: 7px 10px !important;
  border-radius: 5px !important;
  background: #555f66 !important;
  border: 2px solid #151a1e !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 18px !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
}

@media (min-width: 1041px) and (max-width: 1260px) {
  .trade-card .prediction-workbench {
    grid-template-columns: minmax(170px, .26fr) minmax(0, .74fr) !important;
    gap: 10px !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(135px, .88fr) minmax(92px, .58fr) minmax(52px, .31fr) minmax(48px, .29fr) !important;
    gap: 6px 6px !important;
  }
  .trade-card .prediction-action-cell {
    grid-template-columns: minmax(48px, 1fr) 32px 35px !important;
    padding-inline: 7px !important;
  }
  .trade-card .pred-side { font-size: 14px !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 11px !important; }
  .trade-card .prediction-info-cell { font-size: 11.7px !important; }
}

@media (max-width: 1040px) {
  .trade-card .prediction-workbench {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 8px !important;
  }
  .trade-card .prediction-panel {
    order: 1 !important;
    padding: 8px 8px 9px !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .trade-card .prediction-workbench .prediction-order-row {
    order: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: 0 !important;
    width: 100% !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(150px, 1.02fr) minmax(88px, .60fr) minmax(48px, .34fr) minmax(45px, .32fr) !important;
    row-gap: 7px !important;
    column-gap: 6px !important;
  }
  .trade-card .prediction-action-cell {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    grid-template-columns: minmax(60px, 1fr) 34px 38px !important;
    padding: 5px 8px !important;
  }
  .trade-card .pred-side { font-size: 14px !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 11px !important; }
  .trade-card .prediction-info-cell { font-size: 12px !important; }
  .trade-card .prediction-panel .prediction-action-row .action-secondary {
    height: 37px !important;
    min-height: 37px !important;
    font-size: 15px !important;
  }
}

@media (max-width: 430px) {
  .trade-card .prediction-panel {
    padding: 7px 6px 8px !important;
    gap: 8px !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(132px, 1.02fr) minmax(76px, .58fr) minmax(42px, .32fr) minmax(39px, .30fr) !important;
    row-gap: 8px !important;
    column-gap: 4px !important;
  }
  .trade-card .prediction-table-head {
    font-size: 10.4px !important;
    padding-bottom: 4px !important;
  }
  .trade-card .prediction-action-cell {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    grid-template-columns: minmax(50px, 1fr) 31px 34px !important;
    gap: 3px !important;
    padding: 4px 7px !important;
  }
  .trade-card .pred-side { font-size: 13px !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 10px !important; }
  .trade-card .prediction-info-cell { font-size: 10.8px !important; }
  .trade-card .prediction-workbench .prediction-order-row {
    gap: 7px !important;
    margin-top: 0 !important;
  }
  .trade-card .prediction-workbench .prediction-order-row .field-label {
    font-size: 10px !important;
    min-height: 14px !important;
    margin-bottom: 3px !important;
  }
  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input,
  .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    font-size: 13px !important;
    padding: 6px 7px !important;
  }
}

@media (max-width: 370px) {
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(118px, 1.0fr) minmax(68px, .58fr) minmax(38px, .32fr) minmax(36px, .30fr) !important;
    column-gap: 3px !important;
  }
  .trade-card .prediction-action-cell {
    grid-template-columns: minmax(44px, 1fr) 28px 31px !important;
    padding-inline: 5px !important;
  }
  .trade-card .prediction-info-cell { font-size: 10px !important; }
}

/* DPX v0.3.10 same-name final trading-area correction: sample table format on PC/phone. */
.trade-card .entry-override-marker,
.trade-card #entryOverrideReset {
  display: none !important;
  visibility: hidden !important;
}

.trade-card .prediction-workbench {
  display: grid !important;
  grid-template-columns: minmax(145px, 0.25fr) minmax(0, 0.75fr) !important;
  column-gap: 12px !important;
  row-gap: 8px !important;
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-top: 8px !important;
}

.trade-card .prediction-workbench .prediction-order-row {
  order: 1 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  align-self: stretch !important;
  align-content: start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.trade-card .prediction-panel {
  order: 2 !important;
  display: grid !important;
  grid-template-rows: auto auto !important;
  gap: 8px !important;
  align-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 8px 10px 9px !important;
  background: #ffffff !important;
  color: #000000 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

.trade-card .prediction-table-layout {
  order: 1 !important;
  display: grid !important;
  grid-template-columns: minmax(150px, 0.88fr) minmax(105px, 0.58fr) minmax(58px, 0.30fr) minmax(56px, 0.28fr) !important;
  grid-auto-rows: auto !important;
  align-items: center !important;
  column-gap: 10px !important;
  row-gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: #000000 !important;
  overflow: visible !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

.trade-card .prediction-table-head {
  font-family: Arial, Helvetica, sans-serif !important;
  color: #000000 !important;
  font-size: 14px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  text-align: right !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  padding: 0 0 5px !important;
  margin: 0 !important;
  overflow: visible !important;
}
.trade-card .prediction-button-head { visibility: hidden !important; }

.trade-card .prediction-action-cell {
  display: grid !important;
  grid-template-columns: minmax(58px, 1fr) 36px 40px !important;
  align-items: center !important;
  justify-items: center !important;
  gap: 5px !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 5px 9px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(0,0,0,.58) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.40), 0 1px 4px rgba(0,0,0,.45) !important;
  color: #ffffff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  text-transform: uppercase !important;
  overflow: hidden !important;
}
.trade-card .prediction-action-cell.call { background: linear-gradient(180deg, #2fe87a 0%, #0aa947 55%, #087733 100%) !important; }
.trade-card .prediction-action-cell.put { background: linear-gradient(180deg, #ff7396 0%, #df4068 55%, #b52d51 100%) !important; }
.trade-card .prediction-action-cell.wait,
.trade-card .prediction-action-cell:disabled { background: linear-gradient(180deg, #6a747f 0%, #4d5863 100%) !important; opacity: .92 !important; }
.trade-card .prediction-action-cell.selected { outline: 2px solid rgba(0, 111, 53, .9) !important; outline-offset: 1px !important; }

.trade-card .pred-side {
  justify-self: start !important;
  min-width: 0 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  color: #ffffff !important;
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: .035em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}
.trade-card .pred-minute,
.trade-card .pred-conf {
  font-family: Arial, Helvetica, sans-serif !important;
  color: #ffffff !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: .01em !important;
  white-space: nowrap !important;
}

.trade-card .prediction-info-cell {
  color: #000000 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-variant-numeric: tabular-nums !important;
  font-size: 13.6px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  text-align: right !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  letter-spacing: 0 !important;
}
.trade-card .tp-pct-cell { font-weight: 800 !important; }

.trade-card .prediction-panel .prediction-action-row {
  order: 2 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}
.trade-card .prediction-panel .prediction-action-row .action-secondary {
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 7px 10px !important;
  border-radius: 5px !important;
  background: #565f66 !important;
  border: 2px solid #151a1e !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
}

.trade-card .prediction-workbench .prediction-order-row .field-label {
  min-height: 14px !important;
  margin: 0 0 3px !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 10.5px !important;
  line-height: 1.1 !important;
}
.trade-card .prediction-workbench .prediction-order-row .text-input,
.trade-card .prediction-workbench .prediction-order-row .select-input,
.trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 6px 9px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  line-height: 1.1 !important;
  box-sizing: border-box !important;
}

@media (min-width: 1041px) and (max-width: 1260px) {
  .trade-card .prediction-workbench {
    grid-template-columns: minmax(135px, 0.23fr) minmax(0, 0.77fr) !important;
    column-gap: 10px !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(135px, .86fr) minmax(92px, .58fr) minmax(52px, .30fr) minmax(50px, .28fr) !important;
    column-gap: 7px !important;
    row-gap: 5px !important;
  }
  .trade-card .prediction-table-head { font-size: 13px !important; }
  .trade-card .prediction-action-cell { grid-template-columns: minmax(50px, 1fr) 32px 36px !important; padding-inline: 7px !important; }
  .trade-card .pred-side { font-size: 14px !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 11px !important; }
  .trade-card .prediction-info-cell { font-size: 12.2px !important; }
}

@media (max-width: 1040px) {
  .trade-card .prediction-workbench {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 8px !important;
  }
  .trade-card .prediction-panel {
    order: 1 !important;
    padding: 8px 8px 9px !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .trade-card .prediction-workbench .prediction-order-row {
    order: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(148px, 1fr) minmax(82px, .58fr) minmax(46px, .32fr) minmax(44px, .30fr) !important;
    row-gap: 7px !important;
    column-gap: 6px !important;
  }
  .trade-card .prediction-action-cell {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    grid-template-columns: minmax(58px, 1fr) 34px 38px !important;
    padding: 5px 8px !important;
  }
  .trade-card .pred-side { font-size: 14px !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 11px !important; }
  .trade-card .prediction-info-cell { font-size: 12px !important; }
  .trade-card .prediction-panel .prediction-action-row .action-secondary {
    height: 38px !important;
    min-height: 38px !important;
    font-size: 15px !important;
  }
}

@media (max-width: 430px) {
  .trade-card .prediction-panel {
    padding: 7px 6px 8px !important;
    gap: 8px !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(132px, 1fr) minmax(74px, .56fr) minmax(41px, .31fr) minmax(39px, .30fr) !important;
    row-gap: 7px !important;
    column-gap: 4px !important;
  }
  .trade-card .prediction-table-head {
    font-size: 10.8px !important;
    padding-bottom: 4px !important;
  }
  .trade-card .prediction-action-cell {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    grid-template-columns: minmax(50px, 1fr) 31px 34px !important;
    gap: 3px !important;
    padding: 4px 7px !important;
  }
  .trade-card .pred-side { font-size: 13px !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 10px !important; }
  .trade-card .prediction-info-cell { font-size: 10.8px !important; }
  .trade-card .prediction-workbench .prediction-order-row {
    gap: 7px !important;
  }
  .trade-card .prediction-workbench .prediction-order-row .field-label {
    font-size: 10px !important;
    min-height: 14px !important;
    margin-bottom: 3px !important;
  }
  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input,
  .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    font-size: 13px !important;
    padding: 6px 7px !important;
  }
}

@media (max-width: 370px) {
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(120px, 1fr) minmax(67px, .56fr) minmax(37px, .31fr) minmax(36px, .30fr) !important;
    column-gap: 3px !important;
  }
  .trade-card .prediction-action-cell {
    grid-template-columns: minmax(44px, 1fr) 28px 31px !important;
    padding-inline: 5px !important;
  }
  .trade-card .prediction-info-cell { font-size: 9.9px !important; }
}

/* DPX v0.3.10 same-name PC table readability tune: slightly larger prediction table text only on desktop. */
@media (min-width: 1041px) {
  .trade-card .prediction-table-head {
    font-size: 15px !important;
    line-height: 1.08 !important;
  }
  .trade-card .prediction-info-cell {
    font-size: 14.8px !important;
    line-height: 1.08 !important;
  }
  .trade-card .tp-pct-cell {
    font-size: 14.8px !important;
    font-weight: 850 !important;
  }
}

/* DPX v0.3.10 same-name PC readability tune: increase only first two prediction-table columns. */
@media (min-width: 1041px) {
  .trade-card .prediction-action-cell {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    grid-template-columns: minmax(66px, 1fr) 40px 44px !important;
    padding: 5px 10px !important;
  }
  .trade-card .pred-side {
    font-size: 17px !important;
    line-height: 1.05 !important;
  }
  .trade-card .pred-minute,
  .trade-card .pred-conf {
    font-size: 13px !important;
    line-height: 1.05 !important;
  }
  .trade-card .target-exit-cell {
    font-size: 15.8px !important;
    line-height: 1.08 !important;
    font-weight: 550 !important;
  }
}

/* DPX v0.3.10 client comments 8-13: trading area status/toggles and sample-style buttons. */
.trade-title-status {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  min-width: 0 !important;
}
.trading-auto-status {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 32px !important;
  padding: 6px 18px !important;
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
#autoTradingCard.auto-setup-hidden {
  display: none !important;
}
.trade-card #adjustBtn[hidden] {
  display: none !important;
}
.trade-card .prediction-button-head {
  visibility: visible !important;
  text-align: center !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  padding-bottom: 7px !important;
}
.trade-card .prediction-panel .prediction-action-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.trade-card .prediction-panel .prediction-action-row .action-secondary {
  min-width: 0 !important;
  white-space: normal !important;
  line-height: 1.05 !important;
}
.trade-card .prediction-panel .prediction-action-row #autoRunToggleBtn.running {
  background: #8b3f4b !important;
}
.trade-card .prediction-panel .prediction-action-row #autoSetupVisibilityBtn[aria-pressed="true"] {
  background: #3e6170 !important;
}
.auto-heading-actions #startAutoBtn[hidden],
.auto-heading-actions #stopAutoBtn[hidden] {
  display: none !important;
}
@media (max-width: 1040px) {
  .trade-title-status {
    gap: 8px !important;
    align-items: flex-start !important;
  }
  .trading-auto-status {
    min-height: 27px !important;
    padding: 5px 12px !important;
    font-size: 12px !important;
  }
  .trade-card .prediction-button-head {
    font-size: 12px !important;
    padding-bottom: 4px !important;
  }
  .trade-card .prediction-panel .prediction-action-row {
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }
  .trade-card .prediction-panel .prediction-action-row .action-secondary {
    height: 38px !important;
    min-height: 38px !important;
    font-size: 14px !important;
  }
}
@media (max-width: 430px) {
  .trade-heading {
    align-items: flex-start !important;
  }
  .trading-auto-status {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* DPX v0.3.10 same-name client layout polish: wider white prediction table, smaller input column, visible action buttons. */
@media (min-width: 1041px) {
  .trade-card .prediction-workbench {
    grid-template-columns: minmax(118px, 0.18fr) minmax(0, 0.82fr) !important;
    column-gap: 10px !important;
    align-items: stretch !important;
  }

  .trade-card .prediction-workbench .prediction-order-row {
    gap: 7px !important;
    max-width: 145px !important;
    align-self: start !important;
  }

  .trade-card .prediction-workbench .prediction-order-row .field-label {
    font-size: 10px !important;
    min-height: 12px !important;
    margin-bottom: 2px !important;
  }

  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input,
  .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    padding: 5px 8px !important;
  }

  .trade-card .prediction-panel {
    padding: 10px 12px 11px !important;
    gap: 9px !important;
    overflow: visible !important;
  }

  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(178px, 1.00fr) minmax(132px, .64fr) minmax(70px, .33fr) minmax(68px, .32fr) !important;
    column-gap: 14px !important;
    row-gap: 7px !important;
    align-items: center !important;
  }

  .trade-card .prediction-table-head {
    font-size: 17px !important;
    line-height: 1.1 !important;
    padding-bottom: 5px !important;
  }

  .trade-card .prediction-button-head {
    font-size: 18px !important;
    text-align: center !important;
  }

  .trade-card .prediction-action-cell {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    grid-template-columns: minmax(72px, 1fr) 42px 46px !important;
    gap: 6px !important;
    padding: 6px 11px !important;
    border-radius: 7px !important;
  }

  .trade-card .pred-side {
    font-size: 18px !important;
    line-height: 1.04 !important;
    letter-spacing: .045em !important;
  }

  .trade-card .pred-minute,
  .trade-card .pred-conf {
    font-size: 13.5px !important;
    line-height: 1.04 !important;
  }

  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 16.3px !important;
    line-height: 1.08 !important;
    font-weight: 520 !important;
    letter-spacing: 0 !important;
  }

  .trade-card .tp-pct-cell {
    font-weight: 850 !important;
  }

  .trade-card .prediction-panel .prediction-action-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .trade-card .prediction-panel .prediction-action-row .action-secondary {
    height: 48px !important;
    min-height: 48px !important;
    padding: 5px 8px !important;
    font-size: 15px !important;
    line-height: 1.02 !important;
    white-space: normal !important;
    overflow: visible !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 5px !important;
  }

  .trade-card .prediction-panel .prediction-action-row #settleOpenBtn {
    background: linear-gradient(180deg, #6d7881, #4d575f) !important;
    border-color: #14191d !important;
  }

  .trade-card .prediction-panel .prediction-action-row #autoRunToggleBtn {
    background: linear-gradient(180deg, #2ed06e, #098c3e) !important;
    border-color: #075c2a !important;
  }

  .trade-card .prediction-panel .prediction-action-row #autoRunToggleBtn.running {
    background: linear-gradient(180deg, #ff6b78, #b92e40) !important;
    border-color: #791923 !important;
  }

  .trade-card .prediction-panel .prediction-action-row #autoSetupVisibilityBtn {
    background: linear-gradient(180deg, #45b7e8, #1b6f99) !important;
    border-color: #104862 !important;
  }

  .trade-card .prediction-panel .prediction-action-row #autoSetupVisibilityBtn[aria-pressed="true"] {
    background: linear-gradient(180deg, #ffc857, #c78309) !important;
    border-color: #7c5105 !important;
    color: #101418 !important;
  }
}

@media (min-width: 1041px) and (max-width: 1260px) {
  .trade-card .prediction-workbench {
    grid-template-columns: minmax(110px, 0.17fr) minmax(0, 0.83fr) !important;
    column-gap: 8px !important;
  }

  .trade-card .prediction-workbench .prediction-order-row {
    max-width: 132px !important;
  }

  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(152px, .98fr) minmax(112px, .62fr) minmax(58px, .32fr) minmax(56px, .30fr) !important;
    column-gap: 9px !important;
    row-gap: 6px !important;
  }

  .trade-card .prediction-table-head { font-size: 15px !important; }
  .trade-card .prediction-button-head { font-size: 16px !important; }
  .trade-card .prediction-action-cell {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    grid-template-columns: minmax(60px, 1fr) 36px 40px !important;
    padding-inline: 8px !important;
  }
  .trade-card .pred-side { font-size: 16px !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 12px !important; }
  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell { font-size: 14.1px !important; }
  .trade-card .prediction-panel .prediction-action-row .action-secondary {
    height: 46px !important;
    min-height: 46px !important;
    font-size: 13.5px !important;
  }
}

@media (max-width: 1040px) {
  .trade-card .prediction-panel .prediction-action-row #settleOpenBtn {
    background: linear-gradient(180deg, #6d7881, #4d575f) !important;
    border-color: #14191d !important;
  }
  .trade-card .prediction-panel .prediction-action-row #autoRunToggleBtn {
    background: linear-gradient(180deg, #2ed06e, #098c3e) !important;
    border-color: #075c2a !important;
  }
  .trade-card .prediction-panel .prediction-action-row #autoRunToggleBtn.running {
    background: linear-gradient(180deg, #ff6b78, #b92e40) !important;
    border-color: #791923 !important;
  }
  .trade-card .prediction-panel .prediction-action-row #autoSetupVisibilityBtn {
    background: linear-gradient(180deg, #45b7e8, #1b6f99) !important;
    border-color: #104862 !important;
  }
  .trade-card .prediction-panel .prediction-action-row #autoSetupVisibilityBtn[aria-pressed="true"] {
    background: linear-gradient(180deg, #ffc857, #c78309) !important;
    border-color: #7c5105 !important;
    color: #101418 !important;
  }
}


/* DPX v0.3.10 same-name final client patch 2026-07-02:
   keep admin prompt for protected setup, fix desktop prediction table width/TP% background,
   enlarge price columns, and keep bottom buttons readable on one line. */
@media (min-width: 1041px) {
  .trade-card .prediction-workbench {
    grid-template-columns: minmax(102px, 0.14fr) minmax(0, 0.86fr) !important;
    column-gap: 8px !important;
    row-gap: 6px !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .trade-card .prediction-workbench .prediction-order-row {
    max-width: 118px !important;
    gap: 6px !important;
    width: 100% !important;
    align-self: start !important;
  }
  .trade-card .prediction-workbench .prediction-order-row .field-label {
    font-size: 10px !important;
    margin-bottom: 2px !important;
    min-height: 12px !important;
  }
  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input,
  .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 5px 8px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
  }
  .trade-card .prediction-panel {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 10px 12px 11px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    color: #000000 !important;
  }
  .trade-card .prediction-table-layout {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    grid-template-columns: minmax(180px, 1.08fr) minmax(128px, .70fr) minmax(72px, .38fr) minmax(66px, .36fr) !important;
    column-gap: 10px !important;
    row-gap: 7px !important;
    overflow: hidden !important;
    background: #ffffff !important;
  }
  .trade-card .prediction-table-head,
  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell {
    font-family: Arial, Helvetica, sans-serif !important;
    color: #000000 !important;
    white-space: nowrap !important;
  }
  .trade-card .prediction-table-head {
    font-size: 18px !important;
    line-height: 1.08 !important;
    padding-bottom: 6px !important;
  }
  .trade-card .prediction-button-head {
    text-align: center !important;
    font-size: 19px !important;
  }
  .trade-card .prediction-action-cell {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    grid-template-columns: minmax(78px, 1fr) 42px 46px !important;
    padding: 6px 11px !important;
    gap: 7px !important;
    border-radius: 7px !important;
  }
  .trade-card .pred-side {
    font-size: 19px !important;
    line-height: 1.05 !important;
    letter-spacing: .035em !important;
  }
  .trade-card .pred-minute,
  .trade-card .pred-conf {
    font-size: 13.8px !important;
    line-height: 1.05 !important;
  }
  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell {
    font-size: 18px !important;
    line-height: 1.1 !important;
    font-weight: 540 !important;
    letter-spacing: 0 !important;
    background: #ffffff !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  .trade-card .tp-pct-cell {
    font-weight: 900 !important;
  }
  .trade-card .prediction-panel .prediction-action-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 9px !important;
    width: 100% !important;
  }
  .trade-card .prediction-panel .prediction-action-row .action-secondary {
    height: 42px !important;
    min-height: 42px !important;
    padding: 5px 6px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
}
@media (min-width: 1041px) and (max-width: 1260px) {
  .trade-card .prediction-workbench {
    grid-template-columns: minmax(96px, 0.13fr) minmax(0, 0.87fr) !important;
    column-gap: 7px !important;
  }
  .trade-card .prediction-workbench .prediction-order-row {
    max-width: 108px !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(150px, 1.04fr) minmax(108px, .68fr) minmax(60px, .36fr) minmax(58px, .35fr) !important;
    column-gap: 7px !important;
    row-gap: 6px !important;
  }
  .trade-card .prediction-table-head { font-size: 16px !important; }
  .trade-card .prediction-button-head { font-size: 17px !important; }
  .trade-card .prediction-action-cell {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    grid-template-columns: minmax(62px, 1fr) 35px 38px !important;
    gap: 5px !important;
    padding: 5px 8px !important;
  }
  .trade-card .pred-side { font-size: 16.4px !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 12px !important; }
  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell { font-size: 15.5px !important; }
  .trade-card .prediction-panel .prediction-action-row .action-secondary {
    height: 40px !important;
    min-height: 40px !important;
    font-size: 11.5px !important;
    padding-inline: 4px !important;
  }
}

/* DPX v0.3.10 same-name table/buttons width repair 2026-07-02 09:58:
   Make desktop white prediction panel use the full available width, stop TP% clipping,
   and keep bottom buttons readable without removing existing admin/setup features. */
@media (min-width: 1041px) {
  .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: 90px minmax(0, 1fr) !important;
    column-gap: 8px !important;
    row-gap: 6px !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .trade-card .prediction-workbench .prediction-order-row {
    max-width: 90px !important;
    width: 90px !important;
    min-width: 0 !important;
    gap: 6px !important;
    align-self: start !important;
  }

  .trade-card .prediction-workbench .prediction-order-row .field-label {
    font-size: 9.4px !important;
    line-height: 1.05 !important;
    min-height: 12px !important;
    margin: 0 0 2px !important;
    white-space: nowrap !important;
  }

  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input,
  .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    height: 33px !important;
    min-height: 33px !important;
    max-height: 33px !important;
    padding: 5px 7px !important;
    font-size: 12.8px !important;
    border-radius: 8px !important;
    width: 90px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .trade-card .prediction-panel {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    padding: 10px 13px 11px !important;
    background: #ffffff !important;
    color: #000000 !important;
    overflow: visible !important;
  }

  .trade-card .prediction-table-layout {
    display: grid !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    grid-template-columns: minmax(190px, 1.06fr) minmax(145px, .72fr) minmax(82px, .40fr) minmax(82px, .40fr) !important;
    column-gap: 11px !important;
    row-gap: 7px !important;
    overflow: visible !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .trade-card .prediction-table-head {
    font-size: 17.2px !important;
    line-height: 1.08 !important;
    padding-bottom: 6px !important;
    color: #000000 !important;
    overflow: visible !important;
  }

  .trade-card .prediction-button-head {
    font-size: 18px !important;
    text-align: center !important;
  }

  .trade-card .prediction-action-cell {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    grid-template-columns: minmax(84px, 1fr) 42px 46px !important;
    gap: 7px !important;
    padding: 6px 12px !important;
    border-radius: 7px !important;
    overflow: hidden !important;
  }

  .trade-card .pred-side {
    font-size: 18.5px !important;
    line-height: 1.05 !important;
  }

  .trade-card .pred-minute,
  .trade-card .pred-conf {
    font-size: 13.4px !important;
    line-height: 1.05 !important;
  }

  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell {
    font-family: Arial, Helvetica, sans-serif !important;
    color: #000000 !important;
    background: #ffffff !important;
    font-size: 17.2px !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .trade-card .tp-pct-cell {
    font-weight: 900 !important;
  }

  .trade-card .prediction-panel .prediction-action-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 9px !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .trade-card .prediction-panel .prediction-action-row .action-secondary {
    height: 40px !important;
    min-height: 40px !important;
    padding: 5px 5px !important;
    font-size: 11.2px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

@media (min-width: 1041px) and (max-width: 1260px) {
  .trade-card .prediction-workbench {
    grid-template-columns: 82px minmax(0, 1fr) !important;
    column-gap: 7px !important;
  }
  .trade-card .prediction-workbench .prediction-order-row {
    max-width: 82px !important;
    width: 82px !important;
  }
  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input,
  .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    width: 82px !important;
    font-size: 12px !important;
    padding-inline: 6px !important;
  }
  .trade-card .prediction-panel {
    padding: 9px 10px 10px !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(160px, 1.02fr) minmax(118px, .68fr) minmax(66px, .38fr) minmax(66px, .38fr) !important;
    column-gap: 8px !important;
    row-gap: 6px !important;
  }
  .trade-card .prediction-table-head { font-size: 15.8px !important; }
  .trade-card .prediction-button-head { font-size: 16.5px !important; }
  .trade-card .prediction-action-cell {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    grid-template-columns: minmax(68px, 1fr) 36px 40px !important;
    gap: 5px !important;
    padding: 5px 8px !important;
  }
  .trade-card .pred-side { font-size: 16.2px !important; }
  .trade-card .pred-minute,
  .trade-card .pred-conf { font-size: 11.8px !important; }
  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell { font-size: 15.2px !important; }
  .trade-card .prediction-panel .prediction-action-row .action-secondary {
    font-size: 10.2px !important;
    padding-inline: 3px !important;
  }
}


/* DPX v0.3.10 client comments: dark prediction panel, consistent app font, moved trades/day field. */
.trade-card .prediction-panel {
  background: var(--panel, #1d2e42) !important;
  color: #e8f0f8 !important;
  border: 1px solid rgba(255,255,255,.10) !important;
}
.trade-card .prediction-table-layout {
  background: transparent !important;
  color: #e8f0f8 !important;
  font-family: inherit !important;
}
.trade-card .prediction-table-head,
.trade-card .prediction-info-cell,
.trade-card .target-exit-cell,
.trade-card .tp-dollar-cell,
.trade-card .tp-pct-cell {
  background: transparent !important;
  color: #f4f8fd !important;
  font-family: inherit !important;
}
.trade-card .prediction-table-head { color: #b7c3d2 !important; }
.trade-card .tp-pct-cell { color: #ffffff !important; }
.trade-card .prediction-action-cell { font-family: inherit !important; }
.trade-card .prediction-workbench .prediction-order-row .trades-day-field { width: 100%; }
.mini-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mini-pair input { min-width: 0; }

@media (min-width: 1041px) {
  .trade-card .prediction-workbench { grid-template-columns: 104px minmax(0, 1fr) !important; }
  .trade-card .prediction-workbench .prediction-order-row,
  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input,
  .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    width: 104px !important;
    max-width: 104px !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(190px, .98fr) minmax(135px, .58fr) minmax(74px, .34fr) minmax(74px, .34fr) !important;
    column-gap: 12px !important;
  }
  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell {
    font-size: 16.6px !important;
  }
}
@media (max-width: 1040px) {
  .trade-card .prediction-panel { background: var(--panel, #1d2e42) !important; }
  .trade-card .prediction-workbench .prediction-order-row { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

/* DPX v0.3.13 final UI patch: investor-demo cleanup, admin-only setup, compact controls. */
input[type="number"] {
  appearance: textfield !important;
  -moz-appearance: textfield !important;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

.trade-heading {
  align-items: center !important;
  gap: 12px !important;
}
.trade-title-status {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}
.trade-title-status .eyebrow {
  margin: 0 !important;
  letter-spacing: .28em !important;
  font-size: .74rem !important;
}
.trading-auto-status {
  min-height: 32px !important;
  padding: 7px 18px !important;
  border-radius: 24px !important;
  font-size: .86rem !important;
  line-height: 1 !important;
}
.title-auto-run-toggle,
.setup-gear-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  height: 34px !important;
  margin: 0 !important;
  border-radius: 4px !important;
  color: #fff !important;
  text-transform: none !important;
  line-height: 1 !important;
  box-shadow: 0 3px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25) !important;
}
.title-auto-run-toggle {
  min-width: 78px !important;
  padding: 6px 16px !important;
  border-color: rgba(87, 120, 255, .82) !important;
  background: linear-gradient(180deg, #2d73ff 0%, #0d43ba 100%) !important;
  font-weight: 800 !important;
  font-size: 1rem !important;
}
.title-auto-run-toggle.running {
  border-color: rgba(255, 163, 82, .82) !important;
  background: linear-gradient(180deg, #b56a28 0%, #71320c 100%) !important;
}
.setup-gear-btn {
  width: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  border-color: rgba(255,255,255,.35) !important;
  background: linear-gradient(180deg, #e5eaf0 0%, #8c96a3 100%) !important;
  color: #1b2431 !important;
  font-size: 1.42rem !important;
}
.setup-gear-btn[aria-pressed="true"] {
  outline: 2px solid rgba(119, 244, 158, .72) !important;
  box-shadow: 0 0 0 3px rgba(53, 217, 116, .14), 0 3px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.32) !important;
}
.admin-unlocked .setup-gear-btn {
  display: inline-flex !important;
}
.non-admin-ledger .setup-gear-btn {
  display: inline-flex !important;
}

.trade-card .prediction-action-row {
  display: none !important;
}
.trade-card .prediction-table-layout {
  grid-template-columns: minmax(188px, .98fr) minmax(132px, .58fr) minmax(70px, .32fr) minmax(70px, .32fr) !important;
  column-gap: 12px !important;
  align-items: center !important;
}
.prediction-action-wrap {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  width: 100% !important;
}
.prediction-action-wrap .prediction-action-cell {
  width: 100% !important;
  min-width: 0 !important;
}
.prediction-settle-btn {
  min-width: 62px !important;
  height: 32px !important;
  padding: 5px 10px !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, #575f69 0%, #2b333d 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: .72rem !important;
  letter-spacing: .02em !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 2px 4px rgba(0,0,0,.2) !important;
  cursor: pointer !important;
}
.prediction-settle-btn:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.08) !important;
}

.auto-heading-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}
.auto-heading-actions .ghost-btn,
.auto-heading-actions .action-btn {
  min-height: 30px !important;
  padding: 6px 10px !important;
  font-size: .72rem !important;
}
#autoAllSetDefault,
#autoAllResetDefault {
  min-width: 92px !important;
}
#autoHideSetupBtn,
#autoToggleConditions {
  min-width: 96px !important;
}

.six-horizon-grid,
.horizon-param-grid.six-horizon-grid {
  display: grid !important;
  grid-template-columns: minmax(92px, .78fr) repeat(6, minmax(52px, .48fr)) !important;
  gap: 5px !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
.six-horizon-grid .horizon-grid-head,
.six-horizon-grid .horizon-row-label {
  min-width: 0 !important;
  font-size: .68rem !important;
  line-height: 1.05 !important;
  letter-spacing: .02em !important;
}
.six-horizon-grid .text-input,
.horizon-param-grid.six-horizon-grid .text-input {
  min-width: 0 !important;
  width: 100% !important;
  height: 31px !important;
  padding: 4px 4px !important;
  text-align: center !important;
  font-size: .74rem !important;
}
.auto-field-grid label,
.auto-field-grid .auto-field,
.settlement-risk-grid label {
  font-size: .76rem !important;
}
.checkbox-field {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 46px !important;
  padding: 8px 10px !important;
}
.checkbox-field input[type="checkbox"] {
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  accent-color: #2dd66d !important;
  cursor: pointer !important;
}
.logic-toggle {
  font-size: .66rem !important;
  padding: 3px 7px !important;
}
.auto-output-box,
.condition-input,
#ledgerTable,
#ledgerTable th,
#ledgerTable td {
  font-size: .78rem !important;
}

.non-admin-ledger #ledgerTableWrap.no-h-scroll {
  overflow-x: hidden !important;
  max-width: 100% !important;
  touch-action: pan-y !important;
}
.non-admin-ledger #ledgerTableWrap.no-h-scroll table {
  width: 100% !important;
  min-width: 100% !important;
}
.admin-unlocked #ledgerTableWrap {
  overflow-x: auto !important;
  touch-action: auto !important;
}

@media (max-width: 1040px) {
  .trade-heading {
    flex-wrap: nowrap !important;
  }
  .trade-title-status {
    gap: 7px !important;
  }
  .trade-title-status .eyebrow {
    font-size: .66rem !important;
    letter-spacing: .22em !important;
  }
  .trading-auto-status {
    padding: 7px 12px !important;
    font-size: .78rem !important;
  }
  .title-auto-run-toggle {
    min-width: 68px !important;
    height: 32px !important;
    padding-inline: 11px !important;
    font-size: .9rem !important;
  }
  .setup-gear-btn {
    width: 38px !important;
    min-width: 38px !important;
    height: 32px !important;
    font-size: 1.25rem !important;
  }
  .balance-row {
    font-size: .78rem !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(160px, 1fr) minmax(112px, .58fr) minmax(56px, .32fr) minmax(56px, .32fr) !important;
    column-gap: 6px !important;
  }
  .prediction-settle-btn {
    min-width: 54px !important;
    padding-inline: 7px !important;
    font-size: .66rem !important;
  }
  .six-horizon-grid,
  .horizon-param-grid.six-horizon-grid {
    grid-template-columns: minmax(72px, .72fr) repeat(6, minmax(38px, .42fr)) !important;
    gap: 4px !important;
  }
  .six-horizon-grid .text-input,
  .horizon-param-grid.six-horizon-grid .text-input {
    height: 29px !important;
    padding-inline: 2px !important;
    font-size: .64rem !important;
  }
  .six-horizon-grid .horizon-grid-head,
  .six-horizon-grid .horizon-row-label {
    font-size: .58rem !important;
  }
}

@media (max-width: 560px) {
  .trade-heading {
    gap: 8px !important;
  }
  .trade-title-status {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  .balance-row {
    width: 100% !important;
    justify-content: flex-end !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(132px, 1fr) minmax(82px, .56fr) minmax(48px, .32fr) minmax(48px, .32fr) !important;
    column-gap: 4px !important;
  }
  .prediction-action-wrap {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }
  .prediction-settle-btn {
    width: 100% !important;
    height: 27px !important;
    min-width: 0 !important;
  }
  .auto-heading-actions {
    justify-content: stretch !important;
  }
  .auto-heading-actions .ghost-btn {
    flex: 1 1 46% !important;
  }
  .six-horizon-grid,
  .horizon-param-grid.six-horizon-grid {
    grid-template-columns: minmax(56px, .7fr) repeat(6, minmax(30px, .38fr)) !important;
    gap: 3px !important;
  }
  .six-horizon-grid .text-input,
  .horizon-param-grid.six-horizon-grid .text-input {
    height: 27px !important;
    font-size: .56rem !important;
    padding-inline: 1px !important;
  }
  .six-horizon-grid .horizon-grid-head,
  .six-horizon-grid .horizon-row-label {
    font-size: .5rem !important;
  }
}

/* DPX v0.3.13 final override: no global settle button and no title wrapping. */
.trade-title-status {
  flex-wrap: nowrap !important;
}
.balance-row {
  flex-shrink: 0 !important;
}
.trade-card .prediction-panel .prediction-action-row,
.trade-card .prediction-panel .prediction-action-row[hidden],
.trade-card .prediction-panel .prediction-action-row.all-actions {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* DPX v0.3.13 title spacing polish. */
.trade-heading .setup-gear-btn {
  margin-right: 12px !important;
}
.trade-heading .balance-row {
  margin-left: 8px !important;
}

/* DPX v0.3.13 title compactness for PC investor view. */
.trade-title-status .eyebrow {
  letter-spacing: .22em !important;
  font-size: .70rem !important;
}
.trading-auto-status {
  padding-left: 14px !important;
  padding-right: 14px !important;
}
.title-auto-run-toggle {
  min-width: 68px !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}
.setup-gear-btn {
  width: 38px !important;
  min-width: 38px !important;
}

/* DPX v0.3.13 phone title row: keep controls readable, put balance on its own line. */
@media (max-width: 560px) {
  .trade-heading {
    flex-wrap: wrap !important;
  }
  .trade-title-status {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  .trade-heading .balance-row {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: flex-end !important;
  }
}

/* DPX v0.3.13 same-name patch 2026-07-04:
   Client comment #6 code areas:
   - Restore native up/down number arrows.
   - Make Auto Trading Setup fields fit on PC and phone.
   - Keep prediction-table numbers same size/weight.
   - Keep non-admin historical orders without horizontal scrolling. */

/* Restore browser number steppers for setup and trading inputs. */
input[type="number"] {
  appearance: auto !important;
  -moz-appearance: number-input !important;
  padding-right: 16px !important;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: auto !important;
  display: block !important;
  opacity: 1 !important;
  margin: 0 !important;
  cursor: pointer !important;
}

/* Auto setup fit: every card can shrink, and the 6 horizon columns are narrower. */
.auto-trading-card,
.auto-collapsible-grid,
.auto-rule-card,
.auto-rule-details,
.auto-rule-details > summary,
.auto-rule-details .auto-field,
.auto-rule-details .auto-field-grid,
.horizon-param-grid,
.six-horizon-grid {
  min-width: 0 !important;
  box-sizing: border-box !important;
}
.auto-rule-card,
.auto-rule-details {
  overflow: hidden !important;
}
@media (min-width: 981px) {
  .auto-collapsible-grid.logic-expanded-view,
  .auto-collapsible-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.02fr) minmax(250px, .76fr) !important;
    gap: 8px !important;
  }
  .six-horizon-grid,
  .horizon-param-grid.six-horizon-grid {
    grid-template-columns: minmax(72px, .70fr) repeat(6, minmax(36px, .36fr)) !important;
    gap: 3px !important;
    margin-left: 5px !important;
    margin-right: 5px !important;
  }
  .six-horizon-grid .horizon-grid-head,
  .six-horizon-grid .horizon-row-label {
    font-size: .56rem !important;
    letter-spacing: 0 !important;
  }
  .six-horizon-grid .text-input,
  .horizon-param-grid.six-horizon-grid .text-input {
    height: 28px !important;
    min-height: 28px !important;
    font-size: .64rem !important;
    padding: 3px 12px 3px 2px !important;
    border-radius: 7px !important;
  }
  .auto-rule-details .settlement-risk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }
  .auto-rule-details .settlement-risk-grid .text-input,
  .auto-rule-details .settlement-risk-grid .select-input {
    height: 28px !important;
    min-height: 28px !important;
    font-size: .64rem !important;
    padding: 3px 13px 3px 5px !important;
  }
  .auto-rule-card label span,
  .auto-rule-details .settlement-risk-grid > label span {
    font-size: .56rem !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
  }
  .checkbox-field {
    min-height: 36px !important;
    padding: 6px 7px !important;
  }
  .checkbox-field input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
  }
}
@media (max-width: 980px) {
  .auto-collapsible-grid.logic-expanded-view,
  .auto-collapsible-grid {
    grid-template-columns: 1fr !important;
  }
  .six-horizon-grid,
  .horizon-param-grid.six-horizon-grid {
    grid-template-columns: minmax(54px, .62fr) repeat(6, minmax(28px, .33fr)) !important;
    gap: 3px !important;
    margin-left: 4px !important;
    margin-right: 4px !important;
  }
  .six-horizon-grid .horizon-grid-head,
  .six-horizon-grid .horizon-row-label {
    font-size: .48rem !important;
    letter-spacing: 0 !important;
  }
  .six-horizon-grid .text-input,
  .horizon-param-grid.six-horizon-grid .text-input {
    height: 27px !important;
    min-height: 27px !important;
    font-size: .52rem !important;
    padding: 3px 11px 3px 1px !important;
    border-radius: 6px !important;
  }
  .auto-rule-details .settlement-risk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 430px) {
  .auto-heading-actions .ghost-btn,
  .auto-heading-actions .action-btn {
    min-height: 28px !important;
    padding: 5px 6px !important;
    font-size: .62rem !important;
  }
  .six-horizon-grid,
  .horizon-param-grid.six-horizon-grid {
    grid-template-columns: minmax(48px, .60fr) repeat(6, minmax(24px, .31fr)) !important;
    gap: 2px !important;
  }
  .six-horizon-grid .text-input,
  .horizon-param-grid.six-horizon-grid .text-input {
    font-size: .48rem !important;
    padding-right: 9px !important;
  }
}

/* Trading area numeric inputs: narrower fields with visible steppers on PC and phone. */
.trade-card .prediction-workbench .prediction-order-row .text-input,
.trade-card .prediction-workbench .prediction-order-row .select-input,
.trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
  min-width: 0 !important;
  box-sizing: border-box !important;
}
.trade-card .prediction-workbench .prediction-order-row input[type="number"] {
  padding-right: 15px !important;
}
@media (min-width: 1041px) {
  .trade-card .prediction-workbench {
    grid-template-columns: 90px minmax(0, 1fr) !important;
    column-gap: 8px !important;
  }
  .trade-card .prediction-workbench .prediction-order-row,
  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input,
  .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    width: 90px !important;
    max-width: 90px !important;
  }
  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input,
  .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    font-size: 11.6px !important;
    padding-left: 6px !important;
    padding-right: 15px !important;
  }
}
@media (max-width: 1040px) {
  .trade-card .prediction-workbench .prediction-order-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input,
  .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    font-size: 12px !important;
    padding-left: 5px !important;
    padding-right: 13px !important;
  }
}

/* Trading area prediction numbers: one consistent size and no bold, matching the Est. % column size. */
.trade-card .prediction-info-cell,
.trade-card .target-exit-cell,
.trade-card .tp-dollar-cell,
.trade-card .tp-pct-cell {
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}
.trade-card .tp-pct-cell {
  font-weight: 500 !important;
}
@media (min-width: 1041px) {
  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell {
    font-size: 15.2px !important;
    line-height: 1.08 !important;
  }
}
@media (max-width: 1040px) {
  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell {
    font-size: 11.2px !important;
    line-height: 1.05 !important;
  }
}
@media (max-width: 430px) {
  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell {
    font-size: 10.2px !important;
  }
}

/* Non-admin historical orders: no horizontal scrollbar and no sideways touch drag. */
body.non-admin-ledger #ledgerTableWrap,
body.non-admin-ledger #ledgerTableWrap.no-h-scroll {
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  touch-action: pan-y !important;
  max-width: 100% !important;
}
body.non-admin-ledger #ledgerTableWrap::-webkit-scrollbar:horizontal,
body.non-admin-ledger #ledgerTableWrap.no-h-scroll::-webkit-scrollbar:horizontal {
  height: 0 !important;
  display: none !important;
}
body.non-admin-ledger #ledgerTableWrap table {
  min-width: 100% !important;
  width: 100% !important;
  table-layout: auto !important;
}

/* DPX v0.3.13 same-name phone title fix 2026-07-04:
   Keep only the Trading Area title row controls inside the phone width.
   No other components are touched. */
@media (max-width: 560px) {
  .trade-heading {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .trade-title-status {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 5px !important;
    overflow: visible !important;
  }
  .trade-title-status .eyebrow {
    font-size: .58rem !important;
    letter-spacing: .18em !important;
    white-space: nowrap !important;
  }
  .trading-auto-status {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    justify-content: center !important;
    padding: 5px 6px !important;
    font-size: .66rem !important;
    line-height: 1 !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
  .title-auto-run-toggle {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    font-size: .82rem !important;
    flex: 0 0 52px !important;
  }
  .setup-gear-btn,
  .trade-heading .setup-gear-btn {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 30px !important;
    min-height: 30px !important;
    margin-right: 0 !important;
    padding: 0 !important;
    font-size: 1.05rem !important;
    flex: 0 0 32px !important;
  }
  .trade-heading .balance-row {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: flex-end !important;
  }
}

@media (max-width: 380px) {
  .trade-title-status {
    gap: 4px !important;
  }
  .trade-title-status .eyebrow {
    font-size: .52rem !important;
    letter-spacing: .15em !important;
  }
  .trading-auto-status {
    padding: 5px 5px !important;
    font-size: .60rem !important;
  }
  .title-auto-run-toggle {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    font-size: .76rem !important;
  }
  .setup-gear-btn,
  .trade-heading .setup-gear-btn {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    font-size: 1rem !important;
  }
}

/* DPX v0.3.13 same-name PC settle-button position fix 2026-07-04:
   Move the per-row manual Settle button to the left of the prediction button on PC.
   This preserves the Manual Trade prediction text (side, minute, confidence) when Settle is visible. */
@media (min-width: 1041px) {
  .trade-card .prediction-action-wrap.has-open-manual {
    grid-template-columns: auto minmax(0, 1fr) !important;
    column-gap: 6px !important;
  }
  .trade-card .prediction-action-wrap.has-open-manual .prediction-settle-btn {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
  .trade-card .prediction-action-wrap.has-open-manual .prediction-action-cell {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(48px, 1fr) 31px 36px !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
  }
}

/* DPX v0.3.17 client-request patch:
   1) Hide Auto Setup number spinner arrows to reduce clutter.
   2) Keep manual Trading Area number arrows visible.
   3) Hide the Historical Orders horizontal scrollbar while keeping sideway touch/mouse drag and column drag-to-reorder. */

/* CLIENT EDIT AREA: remove Auto Setup input scrolling controls/spinner arrows.
   Delete or comment this block if you want the small browser up/down arrows back in Auto Trading Setup. */
.auto-trading-card input[type="number"],
.auto-trading-card .decimal-input,
.auto-trading-card .integer-input {
  appearance: textfield !important;
  -moz-appearance: textfield !important;
  padding-right: 6px !important;
}
.auto-trading-card input[type="number"]::-webkit-outer-spin-button,
.auto-trading-card input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  display: none !important;
  opacity: 0 !important;
  margin: 0 !important;
}

/* Trading Area keeps the up/down number arrows requested in v0.3.13. */
.trade-card .prediction-workbench .prediction-order-row input[type="number"] {
  appearance: auto !important;
  -moz-appearance: number-input !important;
  padding-right: 15px !important;
}
.trade-card .prediction-workbench .prediction-order-row input[type="number"]::-webkit-outer-spin-button,
.trade-card .prediction-workbench .prediction-order-row input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: auto !important;
  display: block !important;
  opacity: 1 !important;
}

/* CLIENT EDIT AREA: Historical Orders horizontal scrollbar.
   - overflow-x:auto keeps sideways touch drag/trackpad drag available.
   - scrollbar-width:none and ::-webkit-scrollbar hide the visible bar only.
   - table min-width:max-content lets wide columns remain draggable/reorderable instead of being squeezed. */
body.non-admin-ledger #ledgerTableWrap,
body.non-admin-ledger #ledgerTableWrap.no-h-scroll {
  overflow-x: auto !important;
  overflow-y: auto !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  touch-action: pan-x pan-y !important;
  -webkit-overflow-scrolling: touch !important;
  max-width: 100% !important;
}
body.non-admin-ledger #ledgerTableWrap::-webkit-scrollbar,
body.non-admin-ledger #ledgerTableWrap.no-h-scroll::-webkit-scrollbar,
body.non-admin-ledger #ledgerTableWrap::-webkit-scrollbar:horizontal,
body.non-admin-ledger #ledgerTableWrap.no-h-scroll::-webkit-scrollbar:horizontal {
  height: 0 !important;
  width: 0 !important;
  display: none !important;
}
body.non-admin-ledger #ledgerTableWrap table {
  min-width: max-content !important;
  width: max-content !important;
  table-layout: auto !important;
}
body.non-admin-ledger #ledgerHead th[draggable="true"] {
  cursor: grab !important;
}

/* DPX v0.3.17 SAME-NAME PATCH 2026-07-05
   Client request:
   - Do not show scrollbars at all (vertical or horizontal), but keep normal page/box scrolling.
   - Historical Orders: admin can sideways touch/mouse/trackpad scroll; normal user cannot horizontal-scroll.
   - Auto setup 60m fields must fit inside Entry/Adjustment panels on PC and phone. */

/* Hide visible scrollbars everywhere while preserving scroll by mouse wheel, touch, trackpad and keyboard. */
html,
body,
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar,
*::-webkit-scrollbar:horizontal,
*::-webkit-scrollbar:vertical {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}

/* CLIENT EDIT AREA: Historical Orders scrolling.
   Admin mode: keep sideway drag/scroll available but hide the bar.
   Non-admin mode: no visible bar and no horizontal scroll/sideway drag.
   Do not use overflow-x:hidden for admin because that kills the client's desired sideway drag. */
#ledgerTableWrap,
#ledgerTableWrap.no-h-scroll {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  max-width: 100% !important;
}
#ledgerTableWrap::-webkit-scrollbar,
#ledgerTableWrap.no-h-scroll::-webkit-scrollbar,
#ledgerTableWrap::-webkit-scrollbar:horizontal,
#ledgerTableWrap.no-h-scroll::-webkit-scrollbar:horizontal {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
body.admin-unlocked #ledgerTableWrap,
body.admin-unlocked #ledgerTableWrap.no-h-scroll {
  overflow-x: auto !important;
  overflow-y: auto !important;
  touch-action: pan-x pan-y !important;
  -webkit-overflow-scrolling: touch !important;
}
body.admin-unlocked #ledgerTableWrap table {
  min-width: max-content !important;
  width: max-content !important;
  table-layout: auto !important;
}
body.non-admin-ledger #ledgerTableWrap,
body.non-admin-ledger #ledgerTableWrap.no-h-scroll {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch !important;
}
body.non-admin-ledger #ledgerTableWrap table {
  min-width: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}
body.non-admin-ledger #ledgerTableWrap th,
body.non-admin-ledger #ledgerTableWrap td {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Fit Entry/Adjustment 1m-60m fields fully inside each card. */
.auto-trading-card .horizon-param-grid.six-horizon-grid,
.auto-trading-card .six-horizon-grid {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  grid-template-columns: minmax(68px, .58fr) repeat(6, minmax(28px, .34fr)) !important;
  gap: 3px !important;
  overflow: hidden !important;
}
.auto-trading-card .horizon-param-grid.six-horizon-grid .text-input,
.auto-trading-card .six-horizon-grid .text-input,
.auto-trading-card .horizon-param-grid.six-horizon-grid input[type="number"],
.auto-trading-card .six-horizon-grid input[type="number"] {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 2px 3px !important;
  text-align: center !important;
  font-size: .62rem !important;
  line-height: 1 !important;
  border-radius: 7px !important;
}
.auto-trading-card .horizon-grid-head,
.auto-trading-card .horizon-row-label {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
@media (min-width: 1180px) {
  .auto-trading-card .horizon-param-grid.six-horizon-grid,
  .auto-trading-card .six-horizon-grid {
    grid-template-columns: minmax(78px, .62fr) repeat(6, minmax(34px, .36fr)) !important;
    gap: 4px !important;
  }
  .auto-trading-card .horizon-param-grid.six-horizon-grid .text-input,
  .auto-trading-card .six-horizon-grid .text-input {
    font-size: .66rem !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
}
@media (max-width: 520px) {
  .auto-trading-card .horizon-param-grid.six-horizon-grid,
  .auto-trading-card .six-horizon-grid {
    grid-template-columns: minmax(46px, .62fr) repeat(6, minmax(22px, .31fr)) !important;
    gap: 2px !important;
  }
  .auto-trading-card .horizon-param-grid.six-horizon-grid .text-input,
  .auto-trading-card .six-horizon-grid .text-input {
    height: 25px !important;
    min-height: 22px !important;
    font-size: .48rem !important;
    padding-left: 1px !important;
    padding-right: 1px !important;
  }
  .auto-trading-card .horizon-grid-head,
  .auto-trading-card .horizon-row-label {
    font-size: .44rem !important;
  }
}

/* DPX v0.3.17 SAME-NAME PATCH 2026-07-05: normal-user Historical Orders readability.
   Admin keeps the full wide draggable table and can sideway scroll with hidden bars.
   Normal user gets a compact readable table, no horizontal scrollbar, and no sideways drag. */
body.non-admin-ledger #ledgerTableWrap,
body.non-admin-ledger #ledgerTableWrap.no-h-scroll {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  touch-action: pan-y !important;
  max-width: 100% !important;
}
body.non-admin-ledger #ledgerTable,
body.non-admin-ledger #ledgerTableWrap table {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}
body.non-admin-ledger #ledgerTable .sticky-col {
  position: static !important;
  left: auto !important;
  box-shadow: none !important;
}
body.non-admin-ledger #ledgerTable th,
body.non-admin-ledger #ledgerTable td {
  padding: 7px 6px !important;
  font-size: .78rem !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}
body.non-admin-ledger #ledgerTable th[draggable="true"] {
  cursor: default !important;
}
body.non-admin-ledger #ledgerTable .reason-cell,
body.non-admin-ledger #ledgerTable .ledger-col-closeReason {
  min-width: 0 !important;
  max-width: none !important;
  white-space: normal !important;
}
body.non-admin-ledger #ledgerTable .ledger-col-tradeType { width: 6.8% !important; }
body.non-admin-ledger #ledgerTable .ledger-col-symbol { width: 9.8% !important; }
body.non-admin-ledger #ledgerTable .ledger-col-side { width: 7.6% !important; }
body.non-admin-ledger #ledgerTable .ledger-col-stake { width: 7.2% !important; }
body.non-admin-ledger #ledgerTable .ledger-col-entryPrice { width: 10.2% !important; }
body.non-admin-ledger #ledgerTable .ledger-col-exit { width: 11.2% !important; }
body.non-admin-ledger #ledgerTable .ledger-col-pnl { width: 8.2% !important; }
body.non-admin-ledger #ledgerTable .ledger-col-closeReason { width: 17.2% !important; }
body.non-admin-ledger #ledgerTable .ledger-col-createdAt { width: 11% !important; }
body.non-admin-ledger #ledgerTable .ledger-col-settledAt { width: 10.8% !important; }

@media (max-width: 760px) {
  body.non-admin-ledger .ledger-card .table-wrap,
  body.non-admin-ledger #ledgerTableWrap {
    max-height: none !important;
  }
  body.non-admin-ledger #ledgerTable th,
  body.non-admin-ledger #ledgerTable td {
    padding: 7px 4px !important;
    font-size: 12px !important;
    line-height: 1.22 !important;
    overflow-wrap: anywhere !important;
  }
  body.non-admin-ledger #ledgerTable .ledger-col-side { width: 16% !important; }
  body.non-admin-ledger #ledgerTable .ledger-col-entryPrice { width: 22% !important; }
  body.non-admin-ledger #ledgerTable .ledger-col-exit { width: 22% !important; }
  body.non-admin-ledger #ledgerTable .ledger-col-pnl { width: 15% !important; }
  body.non-admin-ledger #ledgerTable .ledger-col-closeReason { width: 25% !important; }
  body.non-admin-ledger #ledgerTable .ledger-col-entryPrice,
  body.non-admin-ledger #ledgerTable .ledger-col-exit {
    font-size: 11px !important;
  }
}
@media (max-width: 420px) {
  body.non-admin-ledger #ledgerTable th,
  body.non-admin-ledger #ledgerTable td {
    padding: 6px 3px !important;
    font-size: 11px !important;
  }
  body.non-admin-ledger #ledgerTable .ledger-col-entryPrice,
  body.non-admin-ledger #ledgerTable .ledger-col-exit {
    font-size: 10.3px !important;
  }
}

/* DPX v0.3.17 client comments patch
   #1/#6: Auto Trade Execution moved under Candle Trend and export CSV added.
   #2: Historical prediction columns collapsed to 1/2/5/10/30/60 minute columns.
   #3: Auto Trade Setting checkboxes grouped separately from numeric inputs.
   #4: Daily ML Recommendations moved under Auto Trade Setting and export CSV added.
   #5: IF Logic Reference removed from UI and documented in DOCX guide. */
.chart-zone {
  overflow: hidden !important;
}
.chart-auto-execution-panel {
  margin-top: 8px !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(121, 247, 165, .14) !important;
  border-radius: 12px !important;
  background: rgba(8, 15, 27, .58) !important;
}
.chart-auto-execution-panel .log-panel-header strong,
.auto-recommendation-panel .log-panel-header strong {
  color: var(--accent) !important;
  letter-spacing: .06em !important;
}
.log-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}
.chart-auto-execution-panel .auto-output-box {
  min-height: 54px !important;
  max-height: 92px !important;
  white-space: pre-wrap !important;
}
.auto-setting-split {
  display: grid !important;
  grid-template-columns: minmax(118px, .62fr) minmax(0, 1.38fr) !important;
  gap: 8px !important;
  margin: 0 8px 6px !important;
  align-items: start !important;
}
.auto-setting-checks {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 5px !important;
  min-width: 0 !important;
}
.auto-setting-checks .checkbox-field {
  min-height: 30px !important;
  padding: 5px 7px !important;
}
.auto-setting-checks .checkbox-field span {
  white-space: normal !important;
  letter-spacing: 0 !important;
}
.auto-setting-inputs,
.auto-rule-details .auto-setting-inputs,
.auto-collapsible-grid.logic-expanded-view .auto-setting-inputs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  margin: 0 !important;
  min-width: 0 !important;
}
.auto-setting-inputs label { min-width: 0 !important; }
.auto-setting-inputs .text-input,
.auto-setting-inputs .select-input {
  width: 100% !important;
  min-width: 0 !important;
  height: 28px !important;
  min-height: 28px !important;
  font-size: .66rem !important;
  padding: 3px 12px 3px 5px !important;
}
.auto-setting-inputs label span {
  font-size: .56rem !important;
  letter-spacing: 0 !important;
  white-space: normal !important;
}
.auto-recommendation-panel {
  margin: 8px 8px 0 !important;
  padding-top: 7px !important;
  border-top: 1px solid rgba(225, 234, 255, .10) !important;
}
.auto-recommendation-panel .auto-output-box {
  min-height: 58px !important;
  max-height: 112px !important;
  white-space: pre-wrap !important;
}
/* Historical prediction compact display. */
.ledger-card th.ledger-col-pred1,
.ledger-card th.ledger-col-pred2,
.ledger-card th.ledger-col-pred5,
.ledger-card th.ledger-col-pred10,
.ledger-card th.ledger-col-pred30,
.ledger-card th.ledger-col-pred60,
.ledger-card td.prediction-combined-cell {
  min-width: 104px !important;
  max-width: 132px !important;
  white-space: nowrap !important;
  font-size: 11px !important;
  letter-spacing: 0 !important;
}
.admin-unlocked #ledgerTableWrap table {
  min-width: 1420px !important;
}
@media (max-width: 980px) {
  .auto-setting-split {
    grid-template-columns: 1fr !important;
  }
  .auto-setting-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .chart-auto-execution-panel .auto-output-box,
  .auto-recommendation-panel .auto-output-box {
    max-height: 96px !important;
  }
}
@media (max-width: 520px) {
  .chart-auto-execution-panel {
    padding: 7px 8px !important;
  }
  .log-panel-header {
    align-items: flex-start !important;
  }
  .log-actions {
    gap: 4px !important;
  }
  .log-actions .mini-clear-btn {
    min-width: 54px !important;
    padding-inline: 5px !important;
    font-size: .56rem !important;
  }
  .auto-setting-checks,
  .auto-setting-inputs,
  .auto-rule-details .auto-setting-inputs,
  .auto-collapsible-grid.logic-expanded-view .auto-setting-inputs {
    grid-template-columns: 1fr !important;
  }
}

/* DPX v0.3.17 client comments patch
   1) Title renamed to Auto Trade Setup in index.html.
   2) Auto Trade Setting parameters are ordered in index.html per client numbering.
   3) Labels end with ':' and are right-justified in Auto Trade Setup.
   4) Daily ML recommendations box is taller so the three setup columns align better.
   5) Manual Trade/Target/Est headers use a smaller font consistent with other labels.
   6) Visible number input spinner controls and the chart helper line are removed.
   7) Prediction buttons are flushed closer to info columns to give more left-side parameter room. */

/* #6: remove the chart helper line under the chart. */
#chartHoverInfo,
.chart-hover-info {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* #6: hide up/down number controls while keeping values editable. */
input[type="number"] {
  appearance: textfield !important;
  -moz-appearance: textfield !important;
  padding-right: 8px !important;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
  margin: 0 !important;
}

/* #3: Auto Trade Setup labels end with ':' in HTML and are right-justified. */
.auto-trading-card .horizon-row-label,
.auto-trading-card .auto-field-grid label > span,
.auto-trading-card .checkbox-field > span,
.auto-trading-card .logic-field > span {
  text-align: right !important;
  justify-self: stretch !important;
}
.auto-trading-card .horizon-row-label {
  padding-right: 6px !important;
}
.auto-trading-card .auto-field-grid label > span,
.auto-trading-card .checkbox-field > span {
  display: block !important;
  padding-right: 3px !important;
}

/* #1/#2/#4: compact setup title/ordered parameters/taller recommendations. */
.auto-heading .eyebrow {
  text-transform: none !important;
  letter-spacing: .02em !important;
  font-size: .88rem !important;
}
.combined-settlement-risk {
  display: flex !important;
  flex-direction: column !important;
}
.combined-settlement-risk .auto-setting-split {
  flex: 0 0 auto !important;
}
.combined-settlement-risk .auto-recommendation-panel {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
}
.combined-settlement-risk .auto-recommendation-panel .auto-output-box {
  flex: 1 1 auto !important;
  min-height: 148px !important;
  max-height: none !important;
}
@media (min-width: 981px) {
  .auto-collapsible-grid.logic-expanded-view,
  .auto-collapsible-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.02fr) minmax(280px, .80fr) !important;
    align-items: stretch !important;
  }
  .combined-settlement-risk {
    min-height: 100% !important;
  }
  .auto-setting-split {
    grid-template-columns: minmax(110px, .62fr) minmax(0, 1.38fr) !important;
    gap: 6px !important;
  }
  .auto-setting-checks .checkbox-field {
    min-height: 27px !important;
    padding: 4px 6px !important;
  }
  .auto-setting-checks .checkbox-field input[type="checkbox"] {
    width: 17px !important;
    height: 17px !important;
  }
  .auto-setting-inputs,
  .auto-rule-details .auto-setting-inputs,
  .auto-collapsible-grid.logic-expanded-view .auto-setting-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px 5px !important;
  }
  .auto-setting-inputs label span {
    min-height: 18px !important;
  }
  .param-skipped-window {
    grid-column: 1 / span 2 !important;
  }
}

/* #5/#7: prediction table is tighter, header smaller, and left parameter column gets more room on PC. */
.trade-card .prediction-workbench {
  grid-template-columns: minmax(170px, .30fr) minmax(0, .70fr) !important;
  column-gap: 8px !important;
}
.trade-card .prediction-table-layout {
  grid-template-columns: minmax(160px, .92fr) minmax(92px, .46fr) minmax(58px, .26fr) minmax(56px, .25fr) !important;
  column-gap: 5px !important;
}
.trade-card .prediction-table-head {
  font-size: 12px !important;
  line-height: 1.05 !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  padding-bottom: 3px !important;
}
.trade-card .prediction-action-cell {
  grid-template-columns: minmax(58px, 1fr) 34px 38px !important;
  gap: 4px !important;
  padding-inline: 8px !important;
}
.trade-card .prediction-info-cell {
  font-size: 12.2px !important;
}
@media (max-width: 1040px) {
  .trade-card .prediction-workbench {
    grid-template-columns: none !important;
    column-gap: 0 !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(148px, 1fr) minmax(78px, .50fr) minmax(44px, .28fr) minmax(42px, .27fr) !important;
    column-gap: 4px !important;
  }
  .trade-card .prediction-table-head {
    font-size: 10.5px !important;
  }
}
@media (max-width: 430px) {
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(132px, 1fr) minmax(70px, .48fr) minmax(38px, .26fr) minmax(36px, .25fr) !important;
    column-gap: 3px !important;
  }
  .trade-card .prediction-table-head {
    font-size: 9.6px !important;
  }
  .trade-card .prediction-info-cell {
    font-size: 10px !important;
  }
}


/* DPX v0.3.17 same-version correction after user PC test.
   Fixes:
   - entry/adjustment condition labels keep their full text and colon visible;
   - label-to-field spacing is consistent across both condition panels;
   - condition fields are slightly narrower so the 60m column does not crowd the panel edge;
   - number spinner arrows are removed by CSS, while JS also converts visible numeric inputs to text as a fallback;
   - Auto Trade Setting labels are readable and not clipped. */

/* Hard fallback for any browser that still renders number spinners before JS converts inputs. */
input[type="number"],
input[data-original-type="number"] {
  appearance: textfield !important;
  -moz-appearance: textfield !important;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button,
input[data-original-type="number"]::-webkit-outer-spin-button,
input[data-original-type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
  margin: 0 !important;
}

/* Entry / Adjustment conditions: fixed label column, compact fields, consistent spacing. */
.auto-trading-card .horizon-param-grid.six-horizon-grid,
.auto-trading-card .six-horizon-grid {
  grid-template-columns: 118px repeat(6, minmax(43px, 54px)) !important;
  justify-content: start !important;
  align-items: center !important;
  column-gap: 6px !important;
  row-gap: 5px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow: visible !important;
}
.auto-trading-card .horizon-param-grid.six-horizon-grid .horizon-row-label,
.auto-trading-card .six-horizon-grid .horizon-row-label {
  width: 118px !important;
  min-width: 118px !important;
  max-width: 118px !important;
  text-align: right !important;
  padding-right: 10px !important;
  overflow: visible !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
  justify-self: end !important;
  line-height: 1.1 !important;
}
.auto-trading-card .horizon-param-grid.six-horizon-grid .horizon-grid-head,
.auto-trading-card .six-horizon-grid .horizon-grid-head {
  width: 54px !important;
  max-width: 54px !important;
  text-align: center !important;
  justify-self: stretch !important;
}
.auto-trading-card .horizon-param-grid.six-horizon-grid .text-input,
.auto-trading-card .six-horizon-grid .text-input,
.auto-trading-card .horizon-param-grid.six-horizon-grid input,
.auto-trading-card .six-horizon-grid input {
  width: 54px !important;
  max-width: 54px !important;
  min-width: 43px !important;
  height: 29px !important;
  min-height: 29px !important;
  padding: 4px 5px !important;
  text-align: center !important;
  font-size: .70rem !important;
  font-weight: 800 !important;
}

/* Auto Trade Setting: keep label text visible and spacing consistent. */
.auto-trading-card .auto-setting-checks .checkbox-field {
  grid-template-columns: minmax(88px, 1fr) 18px !important;
  gap: 8px !important;
}
.auto-trading-card .auto-setting-checks .checkbox-field > span {
  text-align: right !important;
  padding-right: 0 !important;
  overflow: visible !important;
  white-space: normal !important;
  line-height: 1.08 !important;
}
.auto-trading-card .auto-setting-inputs label > span {
  text-align: left !important;
  display: block !important;
  overflow: visible !important;
  white-space: normal !important;
  line-height: 1.08 !important;
  min-height: 15px !important;
  padding-right: 0 !important;
}
.auto-trading-card .auto-setting-inputs .text-input {
  height: 27px !important;
  min-height: 27px !important;
  padding-right: 5px !important;
}

@media (max-width: 1040px) {
  .auto-trading-card .horizon-param-grid.six-horizon-grid,
  .auto-trading-card .six-horizon-grid {
    grid-template-columns: 98px repeat(6, minmax(38px, 48px)) !important;
    column-gap: 5px !important;
  }
  .auto-trading-card .horizon-param-grid.six-horizon-grid .horizon-row-label,
  .auto-trading-card .six-horizon-grid .horizon-row-label {
    width: 98px !important;
    min-width: 98px !important;
    max-width: 98px !important;
    padding-right: 8px !important;
    font-size: .58rem !important;
  }
  .auto-trading-card .horizon-param-grid.six-horizon-grid .horizon-grid-head,
  .auto-trading-card .six-horizon-grid .horizon-grid-head,
  .auto-trading-card .horizon-param-grid.six-horizon-grid .text-input,
  .auto-trading-card .six-horizon-grid .text-input,
  .auto-trading-card .horizon-param-grid.six-horizon-grid input,
  .auto-trading-card .six-horizon-grid input {
    width: 48px !important;
    max-width: 48px !important;
  }
}

@media (max-width: 520px) {
  .auto-trading-card .horizon-param-grid.six-horizon-grid,
  .auto-trading-card .six-horizon-grid {
    grid-template-columns: 74px repeat(6, minmax(31px, 1fr)) !important;
    column-gap: 3px !important;
  }
  .auto-trading-card .horizon-param-grid.six-horizon-grid .horizon-row-label,
  .auto-trading-card .six-horizon-grid .horizon-row-label {
    width: 74px !important;
    min-width: 74px !important;
    max-width: 74px !important;
    padding-right: 5px !important;
    font-size: .52rem !important;
  }
  .auto-trading-card .horizon-param-grid.six-horizon-grid .horizon-grid-head,
  .auto-trading-card .six-horizon-grid .horizon-grid-head,
  .auto-trading-card .horizon-param-grid.six-horizon-grid .text-input,
  .auto-trading-card .six-horizon-grid .text-input,
  .auto-trading-card .horizon-param-grid.six-horizon-grid input,
  .auto-trading-card .six-horizon-grid input {
    width: auto !important;
    max-width: none !important;
    min-width: 31px !important;
    font-size: .56rem !important;
    padding-inline: 2px !important;
  }
}

/* DPX v0.4.2 M4 account/login layer */
body.auth-locked .app-shell { display: none; }
.auth-panel {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 14px 18px;
  background: radial-gradient(circle at 50% 0%, #ffffff 0, #f4f8fc 42%, #e6edf5 100%);
  overflow-y: auto;
}
.auth-panel[hidden] { display: none !important; }
.auth-card.auth-window {
  width: min(454px, 94vw);
  background: linear-gradient(180deg, #183a56 0%, #102f49 100%);
  border: 2px solid #06192a;
  border-radius: 34px;
  box-shadow: inset 0 2px 8px rgba(255,255,255,.16), inset 0 -3px 9px rgba(0,0,0,.2), 0 18px 44px rgba(15, 23, 42, .22);
  padding: 22px 26px 26px;
}
.auth-logo {
  color: #ffffff;
  text-align: center;
  font-size: 48px;
  line-height: .95;
  font-weight: 900;
  letter-spacing: .5px;
  text-shadow: -2px -2px 0 #0b1723, 2px -2px 0 #0b1723, -2px 2px 0 #0b1723, 2px 2px 0 #0b1723, 0 4px 8px rgba(0,0,0,.35);
}
.auth-logo span {
  font-size: 22px;
  font-weight: 900;
  margin-left: 8px;
  vertical-align: middle;
}
.auth-card h2 {
  color: #ffffff;
  text-align: center;
  margin: 12px 0 16px;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .3px;
}
.auth-paper {
  background: #ffffff;
  border: 2px solid #13283a;
  border-radius: 2px;
  padding: 22px 24px 18px;
  color: #111827;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.06);
}
.auth-message { min-height: 18px; color: #b45309; font-size: 13px; margin: -8px 0 8px; text-align: center; font-weight: 700; }
.auth-tabs { display: none !important; }
.auth-form { display: grid; gap: 12px; }
.auth-form-grid { gap: 12px; }
.auth-choice-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 18px;
  color: #111827;
  margin: 0 0 2px;
}
.auth-choice-row span { margin-right: 4px; }
.auth-choice-row label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.auth-choice-row input[type="radio"] {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid #0b1723;
  background: #ffffff;
  box-shadow: inset 0 0 0 5px #ffffff;
}
.auth-choice-row input[type="radio"]:checked { background: #8aa4b6; }
.auth-field {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 18px;
}
.auth-field > span:first-child { text-align: right; color: #111827; }
.auth-field input {
  width: 100%;
  height: 38px;
  border: 2px solid #d7d7d7;
  border-radius: 0;
  padding: 6px 10px;
  font: inherit;
  background: #ffffff;
  color: #111827;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.03);
}
.password-wrap { display: flex; position: relative; }
.password-wrap input { padding-right: 40px; }
.password-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #111827;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 900;
}
.auth-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  background: #fbfbfb;
  padding-top: 6px;
}
.auth-mini-row label { display: flex; align-items: center; gap: 8px; }
.auth-mini-row input[type="checkbox"] { width: 20px; height: 20px; }
.link-btn, .auth-switch button {
  border: 0;
  background: transparent;
  color: #0b6fe8;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.auth-primary {
  width: 100%;
  border: 0;
  border-radius: 4px;
  background: #2277e8;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0,0,0,.12);
}
.auth-primary:hover { filter: brightness(1.04); }
.auth-switch {
  border-top: 1px solid #cfd8e3;
  margin-top: 0;
  padding-top: 12px;
  text-align: center;
  font-size: 16px;
  background: #fbfbfb;
}
.auth-dev-note { color: #64748b; line-height: 1.28; font-size: 12px; }
.account-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.account-bar span { font-size: 12px; color: #475569; }
.account-bar button {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 999px;
  padding: 5px 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 11px;
}
.no-adj {
  color: #94a3b8;
  font-weight: 800;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .auth-panel { padding: 10px; align-items: flex-start; }
  .auth-card.auth-window { width: min(410px, 96vw); border-radius: 26px; padding: 16px 14px 18px; }
  .auth-logo { font-size: 38px; }
  .auth-logo span { font-size: 18px; }
  .auth-card h2 { font-size: 23px; margin: 10px 0 12px; }
  .auth-paper { padding: 16px 14px; }
  .auth-choice-row { font-size: 15px; gap: 10px; }
  .auth-choice-row input[type="radio"] { width: 20px; height: 20px; border-width: 3px; }
  .auth-field { grid-template-columns: 116px minmax(0, 1fr); font-size: 15px; gap: 8px; }
  .auth-field input { height: 34px; }
  .auth-primary { font-size: 18px; padding: 10px; }
  .auth-mini-row, .auth-switch { font-size: 14px; }
  .account-bar { max-width: 100%; }
}

/* DPX v0.4.2 stop-stability patch: make account header actions readable on dark header. */
.hero .account-bar span,
.account-bar span {
  color: #cbd5e1 !important;
  font-weight: 700;
}
.hero .account-bar button,
.account-bar button {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
  opacity: 1 !important;
}
.hero .account-bar button:hover,
.account-bar button:hover {
  background: #ffffff !important;
  color: #0f172a !important;
}

/* DPX v0.4.2 account/login/admin layout refinements */
.auth-panel { align-items: flex-start !important; padding-top: 18px !important; overflow-y: auto; }
.auth-window { width: min(520px, 94vw) !important; max-height: none !important; padding: 22px 26px 24px !important; border-radius: 36px !important; background: linear-gradient(180deg, #163955, #0f2d45) !important; box-shadow: 0 22px 44px rgba(0,0,0,.25), inset 0 0 0 2px rgba(255,255,255,.05) !important; }
.auth-logo { color: #fff !important; text-shadow: 2px 3px 0 #071523, 0 0 2px #071523 !important; font-size: clamp(42px, 7vw, 60px) !important; line-height: .9 !important; margin: 0 0 6px !important; text-align: center !important; }
.auth-logo span { font-size: .42em !important; margin-left: 10px !important; }
.auth-window h2 { color: #fff !important; font-size: clamp(26px, 4vw, 38px) !important; line-height: 1 !important; margin: 0 0 18px !important; text-align: center !important; text-shadow: 1px 2px 0 #071523 !important; }
.auth-paper { background: #fff !important; color: #071523 !important; border: 3px solid #08192a !important; padding: 28px 34px !important; box-shadow: inset 0 0 0 1px #e5e8ee !important; }
.auth-message { color: #b21d30 !important; min-height: 22px !important; text-align: center !important; font-weight: 700 !important; }
.auth-form-grid { gap: 12px !important; }
.auth-choice-row, .auth-mini-row, .auth-switch { color: #071523 !important; }
.auth-choice-row { justify-content: center !important; gap: 22px !important; font-size: 18px !important; }
.auth-choice-row input[type="radio"] { width: 24px !important; height: 24px !important; accent-color: #173a56 !important; vertical-align: middle; }
.auth-field { display: grid !important; grid-template-columns: 170px minmax(0, 1fr) !important; align-items: center !important; gap: 12px !important; color: #071523 !important; font-size: 18px !important; }
.auth-field > span:first-child { text-align: right !important; }
.auth-field input { height: 40px !important; border: 2px solid #d5d5d5 !important; border-radius: 0 !important; background: #fff !important; color: #071523 !important; padding: 6px 14px !important; font-size: 17px !important; }
.password-wrap { display: block !important; position: relative !important; min-width: 0 !important; }
.password-wrap input { width: 100% !important; padding-right: 44px !important; box-sizing: border-box !important; }
.password-toggle { position: absolute !important; top: 50% !important; right: 8px !important; transform: translateY(-50%) !important; width: 28px !important; height: 28px !important; border: 0 !important; background: transparent !important; color: #071523 !important; padding: 0 !important; margin: 0 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; font-size: 17px !important; line-height: 1 !important; cursor: pointer !important; }
.password-toggle:hover, .password-toggle:focus { transform: translateY(-50%) !important; outline: 2px solid #2b7be4 !important; outline-offset: 1px !important; border-radius: 50% !important; }
.auth-primary { height: 56px !important; border-radius: 5px !important; background: #2878e6 !important; font-size: 26px !important; font-weight: 900 !important; color: #fff !important; }
.auth-secondary { height: 44px !important; border: 1px solid #bfd0ec !important; border-radius: 6px !important; background: #eef5ff !important; color: #0f3770 !important; font-weight: 800 !important; }
.auth-secondary:disabled { opacity: .55 !important; cursor: not-allowed !important; }
.auth-switch { border-top: 1px solid #cbd5e1 !important; padding-top: 12px !important; text-align: center !important; font-size: 17px !important; }
.auth-switch button, .link-btn { color: #146de0 !important; background: none !important; border: 0 !important; font-size: inherit !important; cursor: pointer !important; }
.verify-copy, .verify-countdown { color: #071523 !important; text-align: center !important; font-weight: 700 !important; }

.account-bar { margin-top: 6px !important; }
.account-menu-wrap { position: relative; display: inline-block; }
.account-menu-btn { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.10); color: #fff; border-radius: 999px; padding: 6px 11px; font-weight: 800; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.avatar-dot { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #dceeff; color: #0e273f; font-size: 14px; }
.menu-caret { opacity: .8; }
.account-menu { display: none; position: absolute; left: 0; top: calc(100% + 6px); min-width: 230px; z-index: 100; background: #fff; color: #071523; border: 1px solid #d5dfed; border-radius: 12px; padding: 8px; box-shadow: 0 16px 34px rgba(0,0,0,.28); }
.account-menu-wrap.open .account-menu { display: block; }
.account-menu button { display: block; width: 100%; border: 0; border-radius: 8px; background: transparent; color: #071523; padding: 9px 10px; text-align: left; font-weight: 700; cursor: pointer; }
.account-menu button:hover { background: #e9f2ff; }
.account-menu-group { margin: 8px 8px 4px; padding-top: 8px; border-top: 1px solid #d8e2f0; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #436079; font-weight: 900; }

.demo-layout { position: relative !important; }
.layout-tools { position: absolute; top: 8px; left: calc(50% - 28px); z-index: 10; display: flex; flex-direction: column; gap: 8px; }
.layout-tool-btn { width: 54px; min-width: 54px; padding: 7px 5px !important; font-weight: 900 !important; border-color: rgba(119,239,255,.55) !important; background: #213954 !important; color: #fff !important; }
.layout-swapped .chart-zone { grid-column: 2; grid-row: 1; }
.layout-swapped .trade-card { grid-column: 1; grid-row: 1; }
.chart-panel-hidden .chart-zone { display: none !important; }
.chart-panel-hidden .trade-card { grid-column: 1 / -1; }
.chart-panel-hidden .layout-tools { left: 12px; }

body.user-normal .toolbar,
body.user-normal .log-actions,
body.user-normal #autoTradingCard,
body.user-normal #autoSetupVisibilityBtn,
body.user-normal #autoToggleConditions,
body.user-normal #autoExpandConditions,
body.user-normal #autoHideSetupBtn,
body.user-normal #autoAllSetDefault,
body.user-normal #autoAllResetDefault { display: none !important; }
body.user-admin .toolbar, body.user-admin .log-actions { display: flex !important; }
#autoToggleConditions { display: none !important; }
#autoTradingCard.auto-setup-hidden { display: none !important; }

@media (max-width: 720px) {
  .auth-window { width: min(390px, 96vw) !important; padding: 16px 15px 18px !important; border-radius: 28px !important; }
  .auth-logo { font-size: 44px !important; }
  .auth-window h2 { font-size: 30px !important; margin-bottom: 12px !important; }
  .auth-paper { padding: 18px 16px !important; }
  .auth-field { grid-template-columns: 1fr !important; gap: 4px !important; font-size: 15px !important; }
  .auth-field > span:first-child { text-align: left !important; }
  .auth-choice-row { font-size: 15px !important; gap: 12px !important; }
  .auth-primary { font-size: 22px !important; height: 50px !important; }
  .layout-tools { position: static !important; grid-row: 2; display: flex; flex-direction: row; justify-content: center; margin: -4px 0 6px; }
  .layout-swapped .chart-zone, .layout-swapped .trade-card { grid-column: auto; grid-row: auto; }
}
.auth-panel [hidden], [hidden] { display: none !important; }
.hero { position: relative !important; z-index: 40 !important; overflow: visible !important; }
.account-menu { z-index: 9999 !important; }
.demo-layout { z-index: 1 !important; }

/* DPX v0.4.2-1 consolidated responsive patch */
.account-bar { margin-top: 8px !important; }
.account-menu-btn {
  background: #ffffff !important;
  color: #0d2035 !important;
  border: 1px solid #d7e6f8 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.18) !important;
  min-height: 34px !important;
  padding: 6px 13px !important;
}
.account-menu-btn span:not(.avatar-dot):not(.menu-caret) {
  color: #0d2035 !important;
  opacity: 1 !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}
.avatar-dot { background: #eef6ff !important; color: #16436a !important; }
.menu-caret { color: #526b84 !important; opacity: 1 !important; }

.demo-layout {
  position: relative !important;
  grid-template-rows: auto auto !important;
  align-items: start !important;
}
.demo-layout .layout-tools {
  position: static !important;
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  align-self: center !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 6px !important;
  margin: 0 6px 2px 0 !important;
  z-index: 20 !important;
}
.demo-layout .layout-tool-btn {
  width: 42px !important;
  min-width: 42px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  line-height: 1 !important;
}
.demo-layout .chart-zone { grid-column: 1 !important; grid-row: 2 !important; }
.demo-layout .trade-card { grid-column: 2 !important; grid-row: 2 !important; }
.layout-swapped .chart-zone { grid-column: 2 !important; grid-row: 2 !important; }
.layout-swapped .trade-card { grid-column: 1 !important; grid-row: 2 !important; }
.chart-panel-hidden .chart-zone { display: none !important; }
.chart-panel-hidden .trade-card { grid-column: 1 / -1 !important; grid-row: 2 !important; }
.chart-panel-hidden .layout-tools { justify-self: start !important; margin-left: 6px !important; }
.upper-area-hidden .demo-layout { display: none !important; }
.upper-restore-bar {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  margin: -4px 0 10px !important;
  padding: 0 10px !important;
}
.upper-restore-bar[hidden] { display: none !important; }
.upper-restore-bar .ghost-btn { min-height: 34px !important; }

/* Chart-hidden / mobile prediction cards: compact and readable green/red buttons. */
.prediction-cards-layout {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(230px, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
}
.prediction-card {
  border: 1px solid rgba(255,255,255,.12) !important;
  background: rgba(7,18,32,.30) !important;
  border-radius: 12px !important;
  padding: 8px !important;
  display: grid !important;
  grid-template-columns: minmax(150px, .95fr) minmax(150px, 1.05fr) !important;
  gap: 8px !important;
  align-items: center !important;
}
.prediction-card .prediction-card-action { display: flex !important; gap: 6px !important; align-items: center !important; min-width: 0 !important; }
.prediction-card .prediction-action-cell {
  width: 100% !important;
  min-width: 0 !important;
  height: 38px !important;
  min-height: 38px !important;
  grid-template-columns: minmax(56px, 1fr) 38px 42px !important;
  padding: 5px 9px !important;
}
.prediction-card .pred-side { font-size: 18px !important; }
.prediction-card .pred-minute,
.prediction-card .pred-conf { font-size: 13px !important; }
.prediction-card-metrics {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: stretch !important;
  min-width: 0 !important;
}
.prediction-card-metrics span {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,.055) !important;
  padding: 5px 6px !important;
  color: #f7fbff !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  text-align: right !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.prediction-card-metrics b {
  display: block !important;
  color: #a8bad1 !important;
  font-size: 9px !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  font-family: inherit !important;
}

/* Auto setup visibility safety: if the card is shown, fields must be shown too. */
body.user-admin #autoTradingCard:not(.auto-setup-hidden) #autoConditionsGrid {
  display: grid !important;
}
body.user-admin #autoTradingCard:not(.auto-setup-hidden) #autoConditionsGrid.conditions-hidden {
  display: grid !important;
}

/* Full mobile reflow: phone is a dedicated layout, not compressed PC. */
@media (max-width: 760px) {
  body { overflow-x: hidden !important; }
  .app-shell { padding: 8px !important; gap: 8px !important; }
  .hero { padding: 12px !important; gap: 8px !important; }
  .brand-block h1 { font-size: 32px !important; line-height: 1 !important; }
  .app-version { font-size: 14px !important; }
  .account-menu-btn { max-width: calc(100vw - 42px) !important; }
  .account-menu { min-width: 220px !important; max-width: calc(100vw - 36px) !important; }
  .status-box { width: 100% !important; justify-content: flex-start !important; padding: 9px 11px !important; }
  .demo-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .demo-layout .layout-tools {
    grid-row: 1 !important;
    grid-column: 1 !important;
    justify-self: end !important;
    margin: 0 4px 0 0 !important;
  }
  .demo-layout .layout-tool-btn { width: 38px !important; min-width: 38px !important; height: 30px !important; }
  .demo-layout .chart-zone,
  .demo-layout .trade-card,
  .layout-swapped .chart-zone,
  .layout-swapped .trade-card,
  .chart-panel-hidden .trade-card {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
  .candle-title-row { flex-direction: column !important; align-items: stretch !important; }
  .candle-toolbar { justify-content: space-between !important; flex-wrap: wrap !important; }
  .tv-chart, .canvas-fallback { height: 245px !important; }
  .chart-auto-execution-panel .auto-output-box { max-height: 90px !important; }
  .trade-heading { align-items: flex-start !important; }
  .trade-title-status {
    display: grid !important;
    grid-template-columns: 1fr auto auto !important;
    gap: 6px !important;
  }
  .trade-title-status .eyebrow { grid-column: 1 / -1 !important; }
  .trade-market-row { display: grid !important; grid-template-columns: 1fr !important; gap: 8px !important; }
  .market-price-panel { width: 100% !important; justify-content: center !important; }
  .trade-card .prediction-workbench { display: flex !important; flex-direction: column !important; gap: 8px !important; }
  .trade-card .prediction-workbench .prediction-order-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    order: 1 !important;
    width: 100% !important;
    max-width: none !important;
  }
  .trade-card .prediction-workbench .prediction-order-row .text-input,
  .trade-card .prediction-workbench .prediction-order-row .select-input,
  .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    width: 100% !important;
    max-width: none !important;
    height: 36px !important;
    min-height: 36px !important;
    font-size: 12px !important;
  }
  .prediction-panel { order: 2 !important; width: 100% !important; }
  .prediction-cards-layout { grid-template-columns: 1fr !important; gap: 7px !important; }
  .prediction-card { grid-template-columns: 1fr !important; gap: 6px !important; padding: 7px !important; }
  .prediction-card .prediction-action-cell { height: 40px !important; min-height: 40px !important; grid-template-columns: minmax(70px, 1fr) 44px 48px !important; }
  .prediction-card .pred-side { font-size: 20px !important; }
  .prediction-card-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .prediction-card-metrics span { font-size: 11px !important; padding: 5px !important; }
  .ledger-card { min-height: 0 !important; }
  .ledger-header { flex-wrap: wrap !important; gap: 8px !important; }
  .ledger-title-line { width: 100% !important; }
  .ledger-card .toolbar { width: 100% !important; justify-content: flex-end !important; }
  #ledgerTableWrap { max-height: 240px !important; overflow-y: auto !important; }
  .auto-heading { flex-direction: column !important; align-items: stretch !important; gap: 8px !important; }
  .auto-heading-actions { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px !important; }
  .auto-heading-actions .ghost-btn { width: 100% !important; }
  .auto-collapsible-grid.logic-expanded-view,
  .auto-collapsible-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 430px) {
  .trade-card .prediction-workbench .prediction-order-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .prediction-card-metrics { grid-template-columns: 1fr 1fr 1fr !important; }
  .prediction-card-metrics span { font-size: 10px !important; letter-spacing: -.02em !important; }
  .chart-auto-execution-panel .auto-output-box { max-height: 76px !important; }
}


/* DPX v0.4.2 patch_list_v0.4.2-2 visual refinements */
.layout-tools {
  width: auto !important;
  max-width: calc(100vw - 32px) !important;
}
.demo-layout .layout-tools {
  justify-self: start !important;
  margin-left: 6px !important;
}
.chart-panel-hidden .trade-card .prediction-workbench {
  display: grid !important;
  grid-template-columns: minmax(160px, 260px) minmax(520px, 1fr) !important;
  gap: 16px !important;
  align-items: start !important;
}
.chart-panel-hidden .trade-card .prediction-order-row {
  max-width: 260px !important;
}
.chart-panel-hidden .prediction-panel {
  width: 100% !important;
}
.chart-panel-hidden .prediction-cards-layout {
  grid-template-columns: repeat(2, minmax(340px, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
}
.chart-panel-hidden .prediction-card {
  grid-template-columns: minmax(170px, .95fr) minmax(210px, 1.05fr) !important;
  min-height: 58px !important;
}
.chart-panel-hidden .prediction-card .prediction-action-cell {
  height: 44px !important;
  min-height: 44px !important;
}
.chart-panel-hidden .trade-card {
  min-height: 0 !important;
  padding-bottom: 18px !important;
}
.upper-area-hidden .ledger-card {
  margin-top: 0 !important;
}
#livePrice, .prediction-card, .prediction-action-cell, .prediction-info-cell {
  will-change: contents;
}
@media (max-width: 900px) {
  .chart-panel-hidden .trade-card .prediction-workbench {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .chart-panel-hidden .trade-card .prediction-order-row {
    max-width: none !important;
  }
  .chart-panel-hidden .prediction-cards-layout {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 760px) {
  .demo-layout .layout-tools {
    justify-self: center !important;
    margin: 2px 0 6px 0 !important;
    gap: 8px !important;
  }
  .demo-layout .layout-tool-btn {
    width: 36px !important;
    min-width: 36px !important;
    height: 30px !important;
  }
  .chart-panel-hidden .prediction-card {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
  }
  .chart-panel-hidden .prediction-card .prediction-action-cell {
    height: 42px !important;
    min-height: 42px !important;
  }
}


/* DPX v0.4.2 patch_list_v0.4.2-3: final hidden-view and phone safety overrides */
.chart-panel-hidden .trade-card {
  padding: 16px 18px 20px !important;
}
.chart-panel-hidden .trade-card .prediction-workbench {
  display: grid !important;
  grid-template-columns: minmax(108px, 132px) minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: start !important;
}
.chart-panel-hidden .trade-card .prediction-workbench .prediction-order-row {
  max-width: 132px !important;
  width: 132px !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}
.chart-panel-hidden .trade-card .prediction-workbench .prediction-order-row .text-input,
.chart-panel-hidden .trade-card .prediction-workbench .prediction-order-row .select-input,
.chart-panel-hidden .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
  width: 100% !important;
  max-width: 132px !important;
  height: 36px !important;
  min-height: 36px !important;
}
.chart-panel-hidden .prediction-panel {
  width: 100% !important;
  min-width: 0 !important;
  padding: 12px !important;
}
.chart-panel-hidden .prediction-cards-layout {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(360px, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  align-items: stretch !important;
}
.chart-panel-hidden .prediction-card {
  min-width: 0 !important;
  min-height: 64px !important;
  border: 1px solid rgba(132, 171, 211, .24) !important;
  background: rgba(12, 29, 48, .46) !important;
  border-radius: 12px !important;
  padding: 9px !important;
  display: grid !important;
  grid-template-columns: minmax(190px, .95fr) minmax(240px, 1.05fr) !important;
  gap: 10px !important;
  align-items: center !important;
}
.chart-panel-hidden .prediction-card-action {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
}
.chart-panel-hidden .prediction-card .prediction-action-cell {
  width: 100% !important;
  min-width: 0 !important;
  height: 46px !important;
  min-height: 46px !important;
  grid-template-columns: minmax(78px, 1fr) 44px 50px !important;
  padding: 7px 10px !important;
}
.chart-panel-hidden .prediction-card .pred-side { font-size: 20px !important; }
.chart-panel-hidden .prediction-card .pred-minute,
.chart-panel-hidden .prediction-card .pred-conf { font-size: 15px !important; }
.chart-panel-hidden .prediction-card-metrics {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(110px, 1.2fr) minmax(74px, .8fr) minmax(62px, .7fr) !important;
  gap: 7px !important;
}
.chart-panel-hidden .prediction-card-metrics span {
  min-width: 0 !important;
  display: grid !important;
  grid-template-rows: auto auto !important;
  gap: 3px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .055) !important;
  padding: 6px 7px !important;
  color: #f8fbff !important;
  text-align: right !important;
  overflow: visible !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
}
.chart-panel-hidden .prediction-card-metrics b {
  font-size: 9px !important;
  color: #aec2d8 !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  font-weight: 900 !important;
}
.chart-panel-hidden .prediction-card-metrics em {
  font-style: normal !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  overflow: visible !important;
}
.chart-panel-hidden .prediction-card-settle {
  grid-column: 1 / -1 !important;
  display: flex !important;
  justify-content: flex-start !important;
  margin-top: -2px !important;
}
.chart-panel-hidden .prediction-card-settle .prediction-settle-btn {
  min-width: 82px !important;
  height: 30px !important;
}

@media (max-width: 1120px) {
  .chart-panel-hidden .prediction-cards-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  .chart-panel-hidden .trade-card {
    padding: 10px !important;
  }
  .chart-panel-hidden .trade-card .prediction-workbench,
  .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .chart-panel-hidden .trade-card .prediction-workbench .prediction-order-row,
  .trade-card .prediction-workbench .prediction-order-row {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  .chart-panel-hidden .trade-card .prediction-workbench .prediction-order-row .text-input,
  .chart-panel-hidden .trade-card .prediction-workbench .prediction-order-row .select-input,
  .chart-panel-hidden .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
    max-width: none !important;
    width: 100% !important;
  }
  .chart-panel-hidden .prediction-panel,
  .prediction-panel {
    width: 100% !important;
    padding: 8px !important;
    overflow: visible !important;
  }
  .chart-panel-hidden .prediction-cards-layout { display: none !important; }
  .chart-panel-hidden .prediction-table-layout,
  .trade-card .prediction-table-layout {
    display: grid !important;
    grid-template-columns: minmax(154px, 1.25fr) minmax(86px, .75fr) minmax(58px, .55fr) minmax(48px, .45fr) !important;
    column-gap: 6px !important;
    row-gap: 7px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .trade-card .prediction-table-head {
    display: block !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    letter-spacing: .02em !important;
    white-space: nowrap !important;
  }
  .trade-card .prediction-action-wrap {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 4px !important;
    min-width: 0 !important;
  }
  .trade-card .prediction-action-cell {
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    grid-template-columns: minmax(55px, 1fr) 34px 36px !important;
    padding: 6px 7px !important;
  }
  .trade-card .prediction-action-cell .pred-side { font-size: 19px !important; }
  .trade-card .prediction-action-cell .pred-minute,
  .trade-card .prediction-action-cell .pred-conf { font-size: 12px !important; }
  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell {
    min-width: 0 !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    padding: 0 2px !important;
    text-align: right !important;
  }
  .prediction-settle-btn {
    min-width: 50px !important;
    height: 30px !important;
    padding: 4px 6px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 430px) {
  .chart-panel-hidden .prediction-table-layout,
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(148px, 1.42fr) minmax(78px, .75fr) minmax(50px, .52fr) minmax(42px, .42fr) !important;
    column-gap: 4px !important;
  }
  .trade-card .prediction-table-head { font-size: 9px !important; }
  .trade-card .prediction-action-cell {
    grid-template-columns: minmax(52px, 1fr) 30px 32px !important;
    padding: 6px !important;
  }
  .trade-card .prediction-action-cell .pred-side { font-size: 17px !important; }
  .trade-card .prediction-action-cell .pred-minute,
  .trade-card .prediction-action-cell .pred-conf { font-size: 11px !important; }
  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell { font-size: 10px !important; }
}

/* DPX v0.4.2 patch_list_v0.4.2-3 overflow hardening after static layout test */
.chart-panel-hidden .prediction-cards-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.chart-panel-hidden .prediction-card {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr) !important;
  overflow: hidden !important;
}
.chart-panel-hidden .prediction-card .prediction-action-cell {
  grid-template-columns: minmax(0, 1fr) 38px 44px !important;
}
.chart-panel-hidden .prediction-card-metrics {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, .75fr) !important;
}
.chart-panel-hidden .prediction-card-metrics span,
.chart-panel-hidden .prediction-card-metrics em,
.chart-panel-hidden .prediction-card-metrics b {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* DPX v0.4.2 patch_list_v0.4.2-3b: phone re-engineering + hidden view cleanup */
.sound-on-label { font-weight: 900; }

/* PC/tablet compact hidden-chart mode: clean two-column prediction cards, no squeezed labels. */
.chart-panel-hidden .trade-card .prediction-workbench {
  grid-template-columns: minmax(112px, 140px) minmax(0, 1fr) !important;
  align-items: start !important;
}
.chart-panel-hidden .prediction-cards-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}
.chart-panel-hidden .prediction-card {
  min-height: 76px !important;
  border-radius: 14px !important;
  padding: 10px !important;
  grid-template-columns: minmax(165px, .9fr) minmax(245px, 1.1fr) !important;
  gap: 10px !important;
  background: linear-gradient(180deg, rgba(23, 47, 76, .76), rgba(13, 31, 52, .70)) !important;
  border-color: rgba(126, 174, 218, .25) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03) !important;
  overflow: visible !important;
}
.chart-panel-hidden .prediction-card .prediction-action-cell {
  height: 48px !important;
  min-height: 48px !important;
  border-radius: 10px !important;
}
.chart-panel-hidden .prediction-card-metrics {
  grid-template-columns: minmax(116px, 1.18fr) minmax(86px, .85fr) minmax(74px, .72fr) !important;
}
.chart-panel-hidden .prediction-card-metrics span {
  min-height: 44px !important;
  justify-content: center !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.chart-panel-hidden .prediction-card-metrics em {
  font-size: 14px !important;
  letter-spacing: 0 !important;
}
.chart-panel-hidden .prediction-card-settle {
  grid-column: 1 / -1 !important;
  justify-content: flex-end !important;
  margin-top: 0 !important;
}

/* Dedicated phone prediction list: one clean row per horizon; values stay visible. */
.prediction-mobile-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  width: 100% !important;
}
.prediction-mobile-row {
  display: grid !important;
  grid-template-columns: minmax(128px, 1.2fr) minmax(82px, .75fr) minmax(58px, .52fr) minmax(50px, .45fr) !important;
  gap: 5px !important;
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  border-radius: 10px !important;
  padding: 4px !important;
  background: rgba(6, 18, 31, .30) !important;
  border: 1px solid rgba(132, 171, 211, .16) !important;
}
.prediction-mobile-row .prediction-action-cell {
  width: 100% !important;
  min-width: 0 !important;
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 9px !important;
  grid-template-columns: minmax(52px, 1fr) 32px 34px !important;
  padding: 6px !important;
}
.prediction-mobile-row .pred-side { font-size: 18px !important; }
.prediction-mobile-row .pred-minute,
.prediction-mobile-row .pred-conf { font-size: 11px !important; }
.prediction-mobile-row .mobile-pred-target,
.prediction-mobile-row .mobile-pred-est,
.prediction-mobile-row .mobile-pred-pct {
  display: grid !important;
  grid-template-rows: 14px 1fr !important;
  align-items: center !important;
  justify-items: end !important;
  min-width: 0 !important;
  border-radius: 8px !important;
  padding: 4px 5px !important;
  background: rgba(255,255,255,.055) !important;
  color: #f6fbff !important;
  overflow: hidden !important;
}
.prediction-mobile-row b {
  font-size: 8px !important;
  line-height: 1 !important;
  color: #a8bad1 !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  white-space: nowrap !important;
}
.prediction-mobile-row em {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-style: normal !important;
  font-size: 10.5px !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums !important;
}
.prediction-mobile-settle {
  grid-column: 1 / -1 !important;
  display: flex !important;
  justify-content: flex-start !important;
  padding-top: 2px !important;
}
.prediction-mobile-settle .prediction-settle-btn {
  min-width: 86px !important;
  height: 30px !important;
}

@media (max-width: 760px) {
  html, body { max-width: 100% !important; overflow-x: hidden !important; }
  .app-shell { padding: 6px !important; gap: 7px !important; }
  .hero {
    display: grid !important;
    grid-template-columns: 1fr minmax(145px, .95fr) !important;
    gap: 6px !important;
    align-items: start !important;
    padding: 8px !important;
    min-height: 0 !important;
    border-radius: 14px !important;
  }
  .brand-block h1 { font-size: 30px !important; }
  .app-version { font-size: 12px !important; margin-left: 5px !important; }
  .account-bar { margin-top: 6px !important; }
  .account-menu-btn { min-height: 30px !important; padding: 5px 10px !important; font-size: 12px !important; max-width: 170px !important; }
  .status-box { width: 100% !important; padding: 7px 8px !important; border-radius: 12px !important; align-self: stretch !important; }
  .status-box strong { font-size: 12px !important; }
  .status-box small { font-size: 10px !important; }

  .demo-layout { gap: 6px !important; }
  .demo-layout .layout-tools {
    justify-self: start !important;
    justify-content: flex-start !important;
    margin: 0 0 4px 2px !important;
    gap: 7px !important;
  }
  .demo-layout .layout-tool-btn {
    width: 34px !important;
    min-width: 34px !important;
    height: 28px !important;
    min-height: 28px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
  }
  .card { border-radius: 13px !important; }
  .trade-card { padding: 9px !important; }
  .trade-heading { margin-bottom: 6px !important; }
  .trade-title-status { grid-template-columns: 1fr auto auto !important; gap: 5px !important; align-items: center !important; }
  .trade-title-status .eyebrow { grid-column: 1 / -1 !important; font-size: 12px !important; letter-spacing: .18em !important; }
  .auto-status-pill { min-height: 28px !important; font-size: 11px !important; padding: 5px 9px !important; }
  .title-auto-run-toggle { min-height: 30px !important; padding: 5px 11px !important; font-size: 13px !important; }
  .balance-row { font-size: 12px !important; justify-content: flex-end !important; margin-top: 0 !important; }
  .trade-market-row { gap: 6px !important; }
  .trade-symbol-control .select-input { height: 34px !important; min-height: 34px !important; font-size: 12px !important; }
  .market-price-panel { height: 52px !important; min-height: 52px !important; }
  .market-price-panel strong { font-size: 24px !important; }

  .trade-card .prediction-workbench,
  .chart-panel-hidden .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .trade-card .prediction-workbench .prediction-order-row,
  .chart-panel-hidden .trade-card .prediction-workbench .prediction-order-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: none !important;
  }
  .prediction-order-row .field-label { font-size: 10px !important; margin-bottom: 2px !important; }
  .trade-card .prediction-order-row .text-input,
  .trade-card .prediction-order-row .select-input,
  .trade-card .prediction-order-row #presetPercentSelect {
    max-width: none !important;
    width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    font-size: 14px !important;
  }
  .prediction-panel, .chart-panel-hidden .prediction-panel { padding: 7px !important; overflow: hidden !important; }
  .trade-card .prediction-table-layout { display: block !important; }
  .trade-card .prediction-table-head { display: none !important; }
  .trade-card .prediction-action-wrap,
  .trade-card .prediction-info-cell { display: none !important; }

  .ledger-card { padding: 10px !important; }
  .ledger-header { gap: 8px !important; align-items: flex-start !important; }
  .ledger-title-line { flex-wrap: wrap !important; gap: 5px !important; }
  .ledger-card .toolbar { gap: 5px !important; flex-wrap: wrap !important; }
  .ledger-card .toolbar .ghost-btn { min-height: 30px !important; padding: 5px 8px !important; font-size: 11px !important; }
  #ledgerTable { min-width: 0 !important; width: 100% !important; }
  #ledgerTable th, #ledgerTable td { font-size: 10px !important; padding: 6px 5px !important; }
  .no-h-scroll { overflow-x: hidden !important; }
  .upper-restore-bar { margin: 0 0 7px !important; padding: 0 4px !important; }
  .upper-restore-bar .ghost-btn { min-height: 32px !important; font-size: 12px !important; }
}

@media (max-width: 390px) {
  .prediction-mobile-row {
    grid-template-columns: minmax(118px, 1.14fr) minmax(74px, .75fr) minmax(50px, .50fr) minmax(43px, .43fr) !important;
    gap: 4px !important;
    padding: 3px !important;
  }
  .prediction-mobile-row .prediction-action-cell {
    grid-template-columns: minmax(48px, 1fr) 28px 30px !important;
    padding: 5px !important;
  }
  .prediction-mobile-row .pred-side { font-size: 16px !important; }
  .prediction-mobile-row .pred-minute,
  .prediction-mobile-row .pred-conf { font-size: 10px !important; }
  .prediction-mobile-row em { font-size: 9.5px !important; }
}

/* DPX v0.4.2 patch_list_v0.4.2-3c: prediction layout wrappers span the full prediction grid. */
.prediction-table-layout > .prediction-cards-layout,
.prediction-table-layout > .prediction-mobile-list {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

/* DPX v0.4.2 patch_list_v0.4.2-4: phone chart/history swap button and safety. */
@media (max-width: 760px) {
  body.phone-history-first .demo-layout .ledger-card {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    order: 0 !important;
  }
  body.phone-history-first .demo-layout .chart-zone {
    order: 1 !important;
  }
  body.phone-history-first #swapPanelsBtn,
  body.phone-history-first .layout-tools #swapPanelsBtn {
    box-shadow: 0 0 0 2px rgba(105, 245, 169, .55), 0 8px 18px rgba(0, 0, 0, .20) !important;
    border-color: rgba(105, 245, 169, .85) !important;
  }
  .layout-tools .layout-tool-btn { touch-action: manipulation !important; }
}

/* DPX v0.4.2 patch_list_v0.4.2-4b: keep phone history/chart swap inside the phone width. */
@media (max-width: 760px) {
  body.phone-history-first .demo-layout,
  body.phone-history-first .ledger-card,
  body.phone-history-first .chart-zone,
  body.phone-history-first .trade-card {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  body.phone-history-first .demo-layout .ledger-card {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
  body.phone-history-first .demo-layout .table-wrap {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  body.phone-history-first .demo-layout #ledgerTable {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }
}

/* DPX v0.4.2 patch_list_v0.4.2-4c: phone historical rows stay inside viewport. */
@media (max-width: 760px) {
  .ledger-card .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  .ledger-card #ledgerTable {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }
  .ledger-card #ledgerTable th,
  .ledger-card #ledgerTable td {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .ledger-card .reason-cell,
  .ledger-card td[data-col="closeReason"] {
    white-space: normal !important;
    line-height: 1.12 !important;
  }
}


/* DPX v0.5.1: simple phone-only underline tabs for the lower half. */
.phone-bottom-tabs,
.phone-tab-panels {
  display: none;
}

@media (max-width: 760px) {
  /* The old swap/hide controls remain unchanged on PC/tablet, but are removed
     from the phone experience to keep the top half stable and predictable. */
  .demo-layout .layout-tools {
    display: none !important;
  }
  .demo-layout {
    display: block !important;
    width: 100% !important;
  }
  .demo-layout .trade-card {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .phone-bottom-tabs {
    display: block;
    width: 100%;
    margin: 8px 0 7px;
    padding: 0 8px;
  }
  .phone-tab-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    border-bottom: 1px solid rgba(170, 196, 221, .34);
  }
  .phone-bottom-tab {
    position: relative;
    min-width: 0;
    min-height: 43px;
    border: 0;
    border-radius: 0;
    padding: 9px 6px 11px;
    background: transparent;
    color: #aebfd2;
    font: inherit;
    font-size: 13px;
    line-height: 1.1;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    touch-action: manipulation;
  }
  .phone-bottom-tab::after {
    content: '';
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
  }
  .phone-bottom-tab.active,
  .phone-bottom-tab[aria-selected="true"] {
    color: #ffffff;
  }
  .phone-bottom-tab.active::after,
  .phone-bottom-tab[aria-selected="true"]::after {
    background: #72e9fb;
    box-shadow: 0 0 12px rgba(114, 233, 251, .34);
  }
  .phone-bottom-tab:focus-visible {
    outline: 2px solid #72e9fb;
    outline-offset: -4px;
  }
  .phone-tab-panels {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .phone-tab-panels > .chart-zone,
  .phone-tab-panels > .ledger-card {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  body.phone-tab-history .phone-tab-panels > .chart-zone,
  body.phone-tab-chart .phone-tab-panels > .ledger-card {
    display: none !important;
  }
  body.phone-tab-history .phone-tab-panels > .ledger-card,
  body.phone-tab-chart .phone-tab-panels > .chart-zone {
    display: block !important;
  }
  .phone-tab-panels .chart-zone {
    grid-column: auto !important;
    grid-row: auto !important;
    overflow-x: hidden !important;
  }
  .phone-tab-panels .ledger-card {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  /* Client phone mock-up: Auto Trade Execution belongs to the fixed upper
     trading area, not below the chart inside the switchable lower half. */
  body.phone-tab-layout .trade-card > .chart-auto-execution-panel,
  body.phone-tab-layout .trade-card > .phone-top-auto-execution {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 5px 0 6px !important;
    padding: 5px 7px !important;
    border-radius: 9px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .trade-card > .chart-auto-execution-panel .log-panel-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    margin-bottom: 2px !important;
  }
  body.phone-tab-layout .trade-card > .chart-auto-execution-panel .log-panel-header strong {
    min-width: 0 !important;
    font-size: 9.5px !important;
    line-height: 1.1 !important;
    letter-spacing: .035em !important;
    white-space: nowrap !important;
  }
  body.phone-tab-layout .trade-card > .chart-auto-execution-panel .log-actions {
    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
  }
  body.phone-tab-layout .trade-card > .chart-auto-execution-panel .mini-clear-btn {
    min-height: 22px !important;
    padding: 2px 5px !important;
    font-size: 8.8px !important;
    line-height: 1 !important;
  }
  body.phone-tab-layout .trade-card > .chart-auto-execution-panel .auto-output-box {
    min-height: 28px !important;
    max-height: 42px !important;
    padding: 4px 5px !important;
    overflow-y: auto !important;
    font-size: 9.2px !important;
    line-height: 1.2 !important;
  }
  .phone-tab-panels .tv-chart,
  .phone-tab-panels .canvas-fallback {
    width: 100% !important;
    height: 255px !important;
  }
}

@media (max-width: 390px) {
  .phone-bottom-tab {
    min-height: 40px;
    font-size: 12px;
    padding-inline: 3px;
  }
}


/* ==========================================================================\n   DPX v0.5.1 FINAL CLIENT DESIGN — portrait tabs + compact landscape workspace\n   ========================================================================== */
:root { --dpx-line: rgba(139,177,215,.34); --dpx-cyan: #63e4f6; }
.hero-market-slot { margin-left: auto; min-width: 260px; }
.hero-market-slot .market-price-panel { width: 100% !important; min-height: 48px !important; height: 48px !important; }
.session-bar {
  display: flex !important; align-items: center !important; justify-content: space-between !important;
  gap: 12px !important; min-height: 44px !important; padding: 6px 12px !important; border-radius: 0 !important;
}
.session-account-slot, .session-balance-slot { min-width: 0; }
.session-account-slot .account-bar { margin: 0 !important; }
.session-account-slot .account-menu-btn {
  border: 0 !important; background: transparent !important; border-radius: 7px !important;
  min-height: 32px !important; padding: 4px 7px !important; box-shadow: none !important;
}
.session-account-slot .avatar-dot { font-size: 19px !important; background: transparent !important; }
.session-balance-slot .balance-row { margin: 0 !important; font-size: 15px !important; white-space: nowrap !important; }
.trade-market-row { grid-template-columns: 1fr !important; }
.trade-market-row .mini-price-panel { display: none !important; }

.desktop-bottom-tabs, .desktop-tab-panels { display: none; }
.desktop-tab-list, .phone-tab-list { border: 1px solid var(--dpx-line); background: rgba(5,17,30,.26); }
.desktop-tab-list { display: flex; align-items: stretch; }
.desktop-bottom-tab {
  position: relative; min-height: 38px; border: 0; padding: 8px 12px; background: transparent;
  color: #aebed1; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer;
}
.desktop-bottom-tab.active, .desktop-bottom-tab[aria-selected="true"] { color: var(--dpx-cyan); background: rgba(255,255,255,.035); }
.desktop-bottom-tab.active::after, .desktop-bottom-tab[aria-selected="true"]::after {
  content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 3px; background: var(--dpx-cyan);
}
.entry-exit-stack { display: grid; gap: 2px; line-height: 1.05; }
.entry-exit-stack > span { display: grid; grid-template-columns: 25px 1fr; gap: 3px; align-items: baseline; }
.entry-exit-stack b { color: #8fa6bf; font-size: .72em; text-transform: uppercase; }
.ledger-kind { font-weight: 900; color: #7feeff; }

@media (min-width: 761px) and (orientation: landscape) {
  html, body { overflow-x: hidden !important; }
  .app-shell { max-width: none !important; width: 100% !important; padding: 7px 10px 10px !important; gap: 4px !important; }
  .hero {
    min-height: 86px !important; padding: 10px 14px !important; border-radius: 16px 16px 0 0 !important;
    display: grid !important; grid-template-columns: 1fr 300px 280px !important; align-items: center !important; gap: 10px !important;
  }
  .hero h1 { font-size: 38px !important; }
  .hero .status-box { width: 100% !important; min-height: 50px !important; padding: 7px 10px !important; }
  .session-bar { border-radius: 0 !important; }
  .demo-layout {
    display: grid !important; grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr) !important;
    grid-template-rows: auto !important; gap: 4px !important; align-items: stretch !important;
  }
  .demo-layout .chart-zone { grid-column: 1 !important; grid-row: 1 !important; }
  .demo-layout .trade-card { grid-column: 2 !important; grid-row: 1 !important; }
  .demo-layout .layout-tools { display: none !important; }
  .market-card, .trade-card { padding: 6px !important; border-radius: 0 !important; min-height: 350px !important; max-height: 350px !important; overflow: hidden !important; }
  .candle-title-row { min-height: 30px !important; margin-bottom: 3px !important; }
  .market-card .tv-chart, .market-card .canvas-fallback { height: 224px !important; min-height: 224px !important; }
  .chart-hover-info { display: none !important; }
  .chart-auto-execution-panel { height: 82px !important; min-height: 82px !important; margin-top: 4px !important; padding: 4px 7px !important; overflow: hidden !important; }
  .chart-auto-execution-panel .auto-output-box { min-height: 48px !important; max-height: 48px !important; overflow-y: auto !important; font-size: 10px !important; }
  .trade-card .section-title-row.trade-heading { min-height: 34px !important; margin-bottom: 3px !important; }
  .trade-card .balance-row { display: none !important; }
  .trade-market-row { margin-bottom: 3px !important; }
  .trade-symbol-control .field-label { display: none !important; }
  .trade-symbol-control .select-input { height: 30px !important; min-height: 30px !important; }
  .trade-card .prediction-workbench { grid-template-columns: 130px minmax(0, 1fr) !important; gap: 5px !important; }
  .trade-card .prediction-order-row { grid-template-columns: repeat(2, minmax(0,1fr)) !important; gap: 3px !important; align-content: start !important; }
  .trade-card .prediction-order-row > div { min-width: 0 !important; }
  .trade-card .prediction-order-row .field-label { font-size: 8px !important; }
  .trade-card .prediction-order-row .text-input, .trade-card .prediction-order-row .select-input { height: 30px !important; min-height: 30px !important; font-size: 12px !important; }
  .prediction-panel { padding: 3px !important; }
  .prediction-cards-layout { gap: 3px !important; }
  .prediction-card-row { min-height: 34px !important; height: 34px !important; }
  .prediction-card-row .prediction-action-cell { min-height: 30px !important; height: 30px !important; }
  .desktop-bottom-tabs { display: block !important; margin-top: 0 !important; }
  .desktop-tab-panels { display: block !important; min-width: 0 !important; }
  .desktop-tab-panels > .ledger-card, .desktop-tab-panels > .auto-trading-card {
    display: block; width: 100% !important; max-width: 100% !important; margin: 0 !important; border-radius: 0 0 12px 12px !important;
  }
  body.desktop-tab-history .desktop-tab-panels > .auto-trading-card,
  body.desktop-tab-setup .desktop-tab-panels > .ledger-card { display: none !important; }
  .desktop-tab-panels .ledger-card { padding: 5px !important; min-height: 245px !important; max-height: 245px !important; overflow: hidden !important; }
  .desktop-tab-panels .ledger-header { min-height: 34px !important; margin-bottom: 2px !important; }
  .desktop-tab-panels .table-wrap { max-height: 198px !important; overflow: auto !important; }
  .desktop-tab-panels #ledgerTable { font-size: 9px !important; min-width: 1320px !important; }
  .desktop-tab-panels #ledgerTable th, .desktop-tab-panels #ledgerTable td { padding: 5px 6px !important; font-size: 9px !important; }
  .desktop-tab-panels .auto-trading-card { padding: 8px !important; min-height: 245px !important; max-height: 245px !important; overflow: auto !important; }
}

/* Portrait client design is also used on phones in either orientation, and on\n   portrait tablets/laptop windows. The body class is controlled by app.js. */
body.phone-tab-layout .hero {
  display: grid !important; grid-template-columns: minmax(110px,.72fr) minmax(140px,1fr) !important;
  grid-template-areas: "brand price" "brand status" !important; gap: 2px 6px !important;
  align-items: stretch !important; min-height: 78px !important; padding: 6px 8px !important; border-radius: 12px 12px 0 0 !important;
}
body.phone-tab-layout .brand-block { grid-area: brand !important; align-self: center !important; }
body.phone-tab-layout .hero-market-slot { grid-area: price !important; min-width: 0 !important; }
body.phone-tab-layout .status-box { grid-area: status !important; min-width: 0 !important; width: 100% !important; padding: 4px 6px !important; border-radius: 8px !important; }
body.phone-tab-layout .status-box strong { font-size: 10px !important; }
body.phone-tab-layout .status-box small { display: none !important; }
body.phone-tab-layout .hero-market-slot .market-price-panel { min-height: 34px !important; height: 34px !important; padding: 2px 7px !important; border-radius: 6px !important; }
body.phone-tab-layout .hero-market-slot .market-price-label { display: none !important; }
body.phone-tab-layout .hero-market-slot .market-price-panel strong { font-size: 18px !important; }
body.phone-tab-layout .session-bar { min-height: 34px !important; padding: 2px 6px !important; border-radius: 0 !important; }
body.phone-tab-layout .session-account-slot .account-menu-btn { max-width: 220px !important; min-height: 29px !important; font-size: 11px !important; }
body.phone-tab-layout .session-balance-slot .balance-row { display: flex !important; font-size: 11px !important; }
body.phone-tab-layout .demo-layout { display: block !important; }
body.phone-tab-layout .demo-layout .chart-zone { display: none !important; }
body.phone-tab-layout .demo-layout .layout-tools { display: none !important; }
body.phone-tab-layout .demo-layout .trade-card { width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 5px 7px !important; border-radius: 0 !important; }
body.phone-tab-layout .trade-heading { min-height: 28px !important; margin-bottom: 2px !important; }
body.phone-tab-layout .trade-title-status .eyebrow { display: none !important; }
body.phone-tab-layout .trade-title-status { display: grid !important; grid-template-columns: 1fr auto !important; width: 100% !important; }
body.phone-tab-layout .trade-card .balance-row { display: none !important; }
body.phone-tab-layout .trade-market-row { margin-bottom: 2px !important; }
body.phone-tab-layout .trade-symbol-control .field-label { font-size: 8px !important; margin-bottom: 1px !important; }
body.phone-tab-layout .trade-symbol-control .select-input { height: 28px !important; min-height: 28px !important; font-size: 10px !important; }
body.phone-tab-layout .trade-card .prediction-workbench { display: grid !important; grid-template-columns: 1fr !important; gap: 3px !important; }
body.phone-tab-layout .trade-card .prediction-order-row { order: -1 !important; grid-template-columns: repeat(4,minmax(0,1fr)) !important; gap: 2px !important; }
body.phone-tab-layout .prediction-order-row .field-label { font-size: 7px !important; margin: 0 !important; }
body.phone-tab-layout .trade-card .prediction-order-row .text-input,
body.phone-tab-layout .trade-card .prediction-order-row .select-input { height: 27px !important; min-height: 27px !important; padding: 3px 5px !important; font-size: 9px !important; }
body.phone-tab-layout .prediction-panel { padding: 3px !important; }
body.phone-tab-layout .prediction-mobile-list { gap: 2px !important; }
body.phone-tab-layout .prediction-mobile-row {
  grid-template-columns: minmax(116px,1.18fr) minmax(67px,.66fr) minmax(48px,.48fr) minmax(43px,.42fr) !important;
  gap: 2px !important; padding: 2px !important; border-radius: 5px !important;
}
body.phone-tab-layout .prediction-mobile-row .prediction-action-cell { height: 31px !important; min-height: 31px !important; border-radius: 5px !important; padding: 3px 5px !important; }
body.phone-tab-layout .prediction-mobile-row .pred-side { font-size: 13px !important; }
body.phone-tab-layout .prediction-mobile-row .pred-minute, body.phone-tab-layout .prediction-mobile-row .pred-conf { font-size: 8px !important; }
body.phone-tab-layout .prediction-mobile-row .mobile-pred-target,
body.phone-tab-layout .prediction-mobile-row .mobile-pred-est,
body.phone-tab-layout .prediction-mobile-row .mobile-pred-pct { padding: 2px 3px !important; border-radius: 4px !important; grid-template-rows: 9px 1fr !important; }
body.phone-tab-layout .prediction-mobile-row b { font-size: 6px !important; }
body.phone-tab-layout .prediction-mobile-row em { font-size: 8px !important; }
body.phone-tab-layout .phone-bottom-tabs { display: block !important; margin: 0 !important; padding: 0 !important; }
body.phone-tab-layout .phone-tab-list { display: grid !important; grid-template-columns: repeat(5,minmax(0,1fr)) !important; }
body.phone-tab-layout .phone-bottom-tab { min-height: 34px !important; padding: 7px 2px 8px !important; font-size: 10px !important; }
body.phone-tab-layout .phone-bottom-tab::after { left: 5% !important; right: 5% !important; }
body.phone-tab-layout .phone-tab-panels { display: block !important; width: 100% !important; min-width: 0 !important; }
body.phone-tab-layout .phone-tab-panels > * { display: none !important; }
body.phone-tab-layout.phone-tab-history #phoneHistoryPanel,
body.phone-tab-layout.phone-tab-chart #phoneChartPanel,
body.phone-tab-layout.phone-tab-entry #phoneEntryPanel,
body.phone-tab-layout.phone-tab-adjust #phoneAdjustPanel,
body.phone-tab-layout.phone-tab-setting #phoneSettingPanel { display: block !important; }
body.phone-tab-layout .phone-tab-panels > .card { border-radius: 0 0 12px 12px !important; margin: 0 !important; }
body.phone-tab-layout #phoneChartPanel { padding: 5px !important; }
body.phone-tab-layout #phoneChartPanel .tv-chart,
body.phone-tab-layout #phoneChartPanel .canvas-fallback { height: 250px !important; min-height: 250px !important; }
body.phone-tab-layout #phoneChartPanel .chart-auto-execution-panel { display: block !important; height: auto !important; min-height: 60px !important; margin-top: 4px !important; }
body.phone-tab-layout #phoneChartPanel .auto-output-box { min-height: 36px !important; max-height: 70px !important; overflow-y: auto !important; }
body.phone-tab-layout #phoneHistoryPanel { padding: 5px !important; min-height: 300px !important; }
body.phone-tab-layout #phoneHistoryPanel .ledger-header { gap: 3px !important; margin-bottom: 2px !important; }
body.phone-tab-layout #phoneHistoryPanel .eyebrow { display: none !important; }
body.phone-tab-layout #phoneHistoryPanel .daily-pnl-totals { font-size: 10px !important; }
body.phone-tab-layout #phoneHistoryPanel .toolbar .ghost-btn { min-height: 25px !important; padding: 3px 5px !important; font-size: 8px !important; }
body.phone-tab-layout #ledgerTable { table-layout: fixed !important; width: 100% !important; min-width: 0 !important; }
body.phone-tab-layout #ledgerTable th, body.phone-tab-layout #ledgerTable td { padding: 6px 3px !important; font-size: 8px !important; }
body.phone-tab-layout #ledgerTable .ledger-col-tradeKind { width: 8% !important; }
body.phone-tab-layout #ledgerTable .ledger-col-tradeType { width: 14% !important; }
body.phone-tab-layout #ledgerTable .ledger-col-side { width: 12% !important; }
body.phone-tab-layout #ledgerTable .ledger-col-entryExit { width: 24% !important; }
body.phone-tab-layout #ledgerTable .ledger-col-pnl { width: 14% !important; }
body.phone-tab-layout #ledgerTable .ledger-col-closeReason { width: 28% !important; }
body.phone-tab-layout .entry-exit-stack > span { grid-template-columns: 18px 1fr !important; }
body.phone-tab-layout .entry-exit-stack b { font-size: 6px !important; }
body.phone-tab-layout .phone-auto-panel { padding: 6px !important; min-height: 300px !important; overflow-x: hidden !important; }
body.phone-tab-layout .phone-auto-panel .auto-rule-details { display: block !important; margin: 0 !important; }
body.phone-tab-layout .phone-auto-panel .auto-heading-actions { display: flex !important; gap: 4px !important; flex-wrap: wrap !important; margin-bottom: 5px !important; }
body.phone-tab-layout .phone-auto-panel .horizon-param-grid { font-size: 8px !important; gap: 3px !important; }
body.phone-tab-layout .phone-auto-panel .text-input { min-width: 0 !important; height: 28px !important; font-size: 9px !important; }
body.phone-tab-layout .phone-auto-panel textarea { font-size: 9px !important; }

@media (max-width: 390px) {
  body.phone-tab-layout .hero { grid-template-columns: minmax(100px,.68fr) minmax(132px,1fr) !important; }
  body.phone-tab-layout .brand-block h1 { font-size: 25px !important; }
  body.phone-tab-layout .phone-bottom-tab { font-size: 9px !important; }
  body.phone-tab-layout .prediction-mobile-row { grid-template-columns: minmax(108px,1.16fr) minmax(62px,.66fr) minmax(45px,.47fr) minmax(40px,.42fr) !important; }
}

/* v0.5.1 client-design final visual corrections */
.session-account-slot .account-menu-btn,
.session-account-slot .account-menu-btn span,
body.phone-tab-layout .session-account-slot .account-menu-btn,
body.phone-tab-layout .session-account-slot .account-menu-btn span {
  color: #f7fbff !important;
}
@media (min-width: 761px) and (orientation: landscape) {
  .market-card, .trade-card { min-height: 380px !important; max-height: 380px !important; }
  .market-card .tv-chart, .market-card .canvas-fallback { height: 250px !important; min-height: 250px !important; }
  .chart-auto-execution-panel { height: 88px !important; min-height: 88px !important; }
  .desktop-tab-panels .ledger-header .eyebrow { display: none !important; }
  .desktop-tab-panels .ledger-header { min-height: 30px !important; }
  .desktop-tab-panels .ledger-card { min-height: 255px !important; max-height: 255px !important; }
  .desktop-tab-panels .table-wrap { max-height: 210px !important; }
}

/* v0.5.1 portrait tablet/laptop normalization and account contrast */
#sessionAccountSlot .account-menu-btn,
#sessionAccountSlot .account-menu-btn span:not(.avatar-dot):not(.menu-caret),
#sessionAccountSlot .account-menu-btn .avatar-dot,
#sessionAccountSlot .account-menu-btn .menu-caret {
  color: #f7fbff !important;
}
#sessionAccountSlot .account-menu-btn .avatar-dot {
  background: transparent !important;
}
body.phone-tab-layout .app-shell {
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 auto !important;
  padding: 6px !important;
  gap: 4px !important;
}
body.phone-tab-layout .trade-card .prediction-order-row > .preset-field,
body.phone-tab-layout .trade-card .prediction-order-row > .fee-field,
body.phone-tab-layout .trade-card .prediction-order-row > .risk-field,
body.phone-tab-layout .trade-card .prediction-order-row > .trades-day-field {
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  align-self: start !important;
}
body.phone-tab-layout .trade-card .prediction-order-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
  gap: 3px !important;
  align-items: start !important;
}
body.phone-tab-layout .trade-card .prediction-order-row .field-label {
  display: block !important;
  min-height: 10px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
body.phone-tab-layout .phone-tab-list {
  background: rgba(5,17,30,.26) !important;
  border: 1px solid var(--dpx-line) !important;
}
body.phone-tab-layout .phone-bottom-tab {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #aebfd2 !important;
  opacity: 1 !important;
}
body.phone-tab-layout .phone-bottom-tab.active,
body.phone-tab-layout .phone-bottom-tab[aria-selected="true"] {
  color: #ffffff !important;
  background: rgba(255,255,255,.025) !important;
}
body.phone-tab-layout .trade-card .prediction-panel {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}
body.phone-tab-layout .prediction-mobile-list,
body.phone-tab-layout .prediction-mobile-row {
  width: 100% !important;
  max-width: 100% !important;
}

/* ========================================================================== 
   DPX v0.5.1 SAME-NAME PATCH — verified PC clipping and account menu layering
   2026-07-11
   ========================================================================== */

/* Keep the account trigger and its dropdown readable in every interaction
   state, and place the dropdown in a stacking context above both chart and
   trading panels. */
.session-bar {
  position: relative !important;
  z-index: 5000 !important;
  overflow: visible !important;
  isolation: isolate !important;
}
.session-account-slot,
.session-account-slot .account-bar,
.session-account-slot .account-menu-wrap {
  position: relative !important;
  z-index: 5001 !important;
  overflow: visible !important;
}
#sessionAccountSlot .account-menu-btn,
#sessionAccountSlot .account-menu-btn:hover,
#sessionAccountSlot .account-menu-btn:focus,
#sessionAccountSlot .account-menu-btn:focus-visible,
#sessionAccountSlot .account-menu-btn:active,
#sessionAccountSlot .account-menu-wrap.open .account-menu-btn {
  background: rgba(8, 24, 41, .72) !important;
  border: 1px solid rgba(131, 185, 230, .32) !important;
  color: #f7fbff !important;
  box-shadow: none !important;
  outline: none !important;
  opacity: 1 !important;
}
#sessionAccountSlot .account-menu-btn span,
#sessionAccountSlot .account-menu-btn:hover span,
#sessionAccountSlot .account-menu-btn:focus span,
#sessionAccountSlot .account-menu-btn:active span,
#sessionAccountSlot .account-menu-wrap.open .account-menu-btn span {
  color: #f7fbff !important;
  opacity: 1 !important;
}
#sessionAccountSlot .account-menu {
  z-index: 5100 !important;
  background: #12263d !important;
  color: #f7fbff !important;
  border-color: rgba(135, 190, 235, .42) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .48) !important;
}
#sessionAccountSlot .account-menu button {
  background: transparent !important;
  color: #f7fbff !important;
}
#sessionAccountSlot .account-menu button:hover,
#sessionAccountSlot .account-menu button:focus,
#sessionAccountSlot .account-menu button:focus-visible {
  background: #25435f !important;
  color: #ffffff !important;
  outline: none !important;
}
#sessionAccountSlot .account-menu-group {
  color: #86dff0 !important;
  border-top-color: rgba(139, 177, 215, .34) !important;
}

/* Landscape PC/tablet: keep all labels, controls and six prediction horizons
   inside the upper workspace instead of clipping the final row. */
@media (min-width: 761px) and (orientation: landscape) {
  .demo-layout {
    align-items: stretch !important;
  }
  .market-card,
  .trade-card {
    min-height: 380px !important;
    height: auto !important;
    max-height: none !important;
  }
  .trade-card {
    overflow: visible !important;
  }
  .market-card {
    overflow: hidden !important;
  }
  .trade-card .trade-symbol-control,
  .trade-card .trade-market-row,
  .trade-card #symbolSelect {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .trade-card #symbolSelect {
    padding-left: 12px !important;
    padding-right: 36px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .trade-card .prediction-workbench {
    grid-template-columns: 130px minmax(0, 1fr) !important;
    overflow: visible !important;
  }
  .trade-card .prediction-order-row {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    grid-template-columns: 1fr !important;
  }
  .trade-card .prediction-order-row > div,
  .trade-card .prediction-order-row .text-input,
  .trade-card .prediction-order-row .select-input,
  .trade-card .prediction-order-row #presetPercentSelect {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
  .trade-card .prediction-panel,
  .trade-card .prediction-table-layout {
    overflow: visible !important;
  }
  .trade-card .prediction-table-layout {
    row-gap: 3px !important;
  }
  .trade-card .prediction-action-wrap {
    min-height: 34px !important;
    height: 34px !important;
  }
  .trade-card .prediction-action-cell {
    min-height: 34px !important;
    height: 34px !important;
    max-height: 34px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }
  .trade-card .prediction-info-cell,
  .trade-card .target-exit-cell,
  .trade-card .tp-dollar-cell,
  .trade-card .tp-pct-cell {
    min-height: 34px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }
}

/* Slightly tighter laptop widths retain full text without shrinking controls
   to the point where labels disappear. */
@media (min-width: 761px) and (max-width: 1180px) and (orientation: landscape) {
  .trade-card .prediction-workbench {
    grid-template-columns: 112px minmax(0, 1fr) !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(170px, 1.18fr) minmax(86px, .72fr) minmax(54px, .48fr) minmax(48px, .43fr) !important;
    column-gap: 4px !important;
  }
  .trade-card .prediction-action-cell {
    grid-template-columns: minmax(64px, 1fr) 32px 36px !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
  }
}

@media (min-width: 761px) and (orientation: landscape) {
  .trade-card .prediction-workbench .prediction-order-row {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    grid-template-columns: 1fr !important;
  }
}

/* Portrait client mock: symbol + Auto status/Start share the first row; the
   compact Auto Trade Execution log stays in the fixed upper trading area. */
.phone-auto-execution-slot { display: none; }

body.phone-tab-layout .demo-layout .trade-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "market heading"
    "workbench workbench" !important;
  column-gap: 4px !important;
  row-gap: 2px !important;
  align-items: end !important;
}
body.phone-tab-layout .trade-card .trade-market-row {
  grid-area: market !important;
  min-width: 0 !important;
  margin: 0 !important;
  align-self: end !important;
}
body.phone-tab-layout .trade-card .trade-heading {
  grid-area: heading !important;
  min-width: 0 !important;
  width: auto !important;
  margin: 0 !important;
  align-self: end !important;
}
body.phone-tab-layout .trade-card .trade-title-status {
  display: grid !important;
  grid-template-columns: auto auto !important;
  gap: 3px !important;
  width: auto !important;
  justify-content: end !important;
}
body.phone-tab-layout .trade-card .trading-auto-status {
  min-width: 88px !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 4px 7px !important;
  font-size: 9px !important;
  white-space: nowrap !important;
}
body.phone-tab-layout .trade-card .title-auto-run-toggle {
  min-width: 50px !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
}
body.phone-tab-layout .trade-card .trade-symbol-control .field-label {
  display: block !important;
  white-space: nowrap !important;
}
body.phone-tab-layout .trade-card .trade-symbol-control .select-input {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
body.phone-tab-layout .trade-card .prediction-workbench {
  grid-area: workbench !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.58fr) minmax(0, 1fr) !important;
  grid-template-areas:
    "parameters execution"
    "predictions predictions" !important;
  gap: 3px !important;
  align-items: stretch !important;
}
body.phone-tab-layout .trade-card .prediction-workbench .prediction-order-row {
  grid-area: parameters !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 2px !important;
  align-content: start !important;
}
body.phone-tab-layout .trade-card .phone-auto-execution-slot {
  grid-area: execution !important;
  display: block !important;
  min-width: 0 !important;
  min-height: 45px !important;
  overflow: hidden !important;
}
body.phone-tab-layout .phone-auto-execution-slot .chart-auto-execution-panel {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 45px !important;
  max-height: 58px !important;
  margin: 0 !important;
  padding: 3px 4px !important;
  border-radius: 5px !important;
  overflow: hidden !important;
}
body.phone-tab-layout .phone-auto-execution-slot .log-panel-header {
  display: none !important;
}
body.phone-tab-layout .phone-auto-execution-slot .auto-output-box {
  min-height: 39px !important;
  height: 39px !important;
  max-height: 39px !important;
  padding: 3px 4px !important;
  border-radius: 4px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  font-size: 7px !important;
  line-height: 1.18 !important;
}
body.phone-tab-layout .trade-card .prediction-panel {
  grid-area: predictions !important;
}
/* The Trend tab contains the chart only in portrait because execution remains
   fixed above, matching the approved phone mock-up. */
body.phone-tab-layout #phoneChartPanel > .chart-auto-execution-panel {
  display: none !important;
}

@media (max-width: 390px) {
  body.phone-tab-layout .trade-card .trading-auto-status {
    min-width: 80px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    font-size: 8px !important;
  }
  body.phone-tab-layout .trade-card .title-auto-run-toggle {
    min-width: 46px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
  body.phone-tab-layout .trade-card .prediction-workbench {
    grid-template-columns: minmax(0, 1.62fr) minmax(0, .98fr) !important;
  }
}

body.phone-tab-layout .trade-card .prediction-workbench .prediction-order-row .field-label {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  font-size: 5.8px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

/* ========================================================================== 
   DPX v0.5.1 SAME-NAME PATCH — role-aware phone ledger scroll + symbol height
   2026-07-11
   ========================================================================== */

/* The page itself never scrolls sideways. Historical Orders owns its horizontal
   scroll so every approved column stays reachable on a phone. */
body.phone-tab-layout {
  overflow-x: hidden !important;
}
body.phone-tab-layout #phoneHistoryPanel,
body.phone-tab-layout #phoneHistoryPanel.ledger-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
body.phone-tab-layout #phoneHistoryPanel .table-wrap,
body.phone-tab-layout #ledgerTableWrap,
body.phone-tab-layout #ledgerTableWrap.no-h-scroll,
body.phone-tab-layout.user-admin #ledgerTableWrap,
body.phone-tab-layout.user-normal #ledgerTableWrap,
body.phone-tab-layout.non-admin-ledger #ledgerTableWrap {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  overscroll-behavior-x: contain !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y !important;
  scrollbar-width: auto !important;
  scrollbar-color: rgba(99, 228, 246, .72) rgba(5, 17, 30, .48) !important;
}
body.phone-tab-layout #ledgerTableWrap::-webkit-scrollbar,
body.phone-tab-layout #ledgerTableWrap.no-h-scroll::-webkit-scrollbar,
body.phone-tab-layout.non-admin-ledger #ledgerTableWrap::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
  display: block !important;
}
body.phone-tab-layout #ledgerTableWrap::-webkit-scrollbar-thumb,
body.phone-tab-layout #ledgerTableWrap.no-h-scroll::-webkit-scrollbar-thumb,
body.phone-tab-layout.non-admin-ledger #ledgerTableWrap::-webkit-scrollbar-thumb {
  background: rgba(99, 228, 246, .72) !important;
  border-radius: 999px !important;
}
body.phone-tab-layout #ledgerTableWrap::-webkit-scrollbar-track,
body.phone-tab-layout #ledgerTableWrap.no-h-scroll::-webkit-scrollbar-track,
body.phone-tab-layout.non-admin-ledger #ledgerTableWrap::-webkit-scrollbar-track {
  background: rgba(5, 17, 30, .48) !important;
}
body.phone-tab-layout #ledgerTable,
body.phone-tab-layout #ledgerTableWrap table,
body.phone-tab-layout.non-admin-ledger #ledgerTable,
body.phone-tab-layout.non-admin-ledger #ledgerTableWrap table {
  table-layout: auto !important;
  width: max-content !important;
  max-width: none !important;
  min-width: 0 !important;
}
body.phone-tab-layout.user-admin #ledgerTable {
  min-width: 2200px !important;
}
body.phone-tab-layout.user-normal #ledgerTable,
body.phone-tab-layout.non-admin-ledger #ledgerTable {
  min-width: 980px !important;
}
body.phone-tab-layout #ledgerTable th,
body.phone-tab-layout #ledgerTable td,
body.phone-tab-layout.non-admin-ledger #ledgerTable th,
body.phone-tab-layout.non-admin-ledger #ledgerTable td {
  width: auto !important;
  min-width: 76px !important;
  max-width: none !important;
  padding: 6px 8px !important;
  font-size: 8.5px !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
body.phone-tab-layout #ledgerTable .ledger-col-tradeKind,
body.phone-tab-layout #ledgerTable .ledger-col-tradeType { min-width: 58px !important; }
body.phone-tab-layout #ledgerTable .ledger-col-symbol { min-width: 86px !important; }
body.phone-tab-layout #ledgerTable .ledger-col-side { min-width: 62px !important; }
body.phone-tab-layout #ledgerTable .ledger-col-entryExit,
body.phone-tab-layout #ledgerTable .entry-exit-cell { min-width: 126px !important; }
body.phone-tab-layout #ledgerTable .ledger-col-closeReason,
body.phone-tab-layout #ledgerTable .reason-cell {
  min-width: 160px !important;
  white-space: normal !important;
  line-height: 1.18 !important;
}
body.phone-tab-layout #ledgerTable .ledger-col-createdAt,
body.phone-tab-layout #ledgerTable .ledger-col-settledAt { min-width: 118px !important; }
body.phone-tab-layout #ledgerTable .prediction-combined-cell,
body.phone-tab-layout #ledgerTable th[class*="ledger-col-pred"] { min-width: 108px !important; }
body.phone-tab-layout .entry-exit-stack { min-width: 108px !important; gap: 3px !important; }
body.phone-tab-layout .entry-exit-stack > span { grid-template-columns: 22px 1fr !important; }
body.phone-tab-layout .entry-exit-stack b { font-size: 7px !important; }

/* Increase the symbol selector line so its text is not vertically clipped. */
@media (min-width: 761px) and (orientation: landscape) {
  .trade-card .trade-market-row,
  .trade-card .trade-symbol-control {
    min-height: 40px !important;
    overflow: visible !important;
  }
  .trade-card .trade-symbol-control .select-input,
  .trade-card #symbolSelect {
    height: 38px !important;
    min-height: 38px !important;
    line-height: 1.25 !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }
}
body.phone-tab-layout .trade-card .trade-market-row,
body.phone-tab-layout .trade-card .trade-symbol-control {
  min-height: 34px !important;
  overflow: visible !important;
}
body.phone-tab-layout .trade-card .trade-symbol-control .select-input,
body.phone-tab-layout .trade-card #symbolSelect {
  height: 32px !important;
  min-height: 32px !important;
  line-height: 1.2 !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

/* ========================================================================== 
   DPX v0.5.1 SAME-NAME FINAL PATCH — client Historical Orders layout
   Exact role-aware columns, compact spacing, fixed administrator analysis area,
   internal table scrolling only, and no whole-page horizontal overflow.
   ========================================================================== */
html, body { max-width: 100%; overflow-x: hidden !important; }

#ledgerTableWrap,
#ledgerTableWrap.no-h-scroll,
body.admin-unlocked #ledgerTableWrap,
body.non-admin-ledger #ledgerTableWrap,
body.user-admin #ledgerTableWrap,
body.user-normal #ledgerTableWrap {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  overscroll-behavior-x: contain !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y !important;
  scrollbar-width: auto !important;
  scrollbar-color: rgba(99, 228, 246, .72) rgba(5, 17, 30, .48) !important;
}
#ledgerTableWrap::-webkit-scrollbar,
#ledgerTableWrap.no-h-scroll::-webkit-scrollbar,
body.non-admin-ledger #ledgerTableWrap::-webkit-scrollbar {
  display: block !important;
  width: 8px !important;
  height: 8px !important;
}
#ledgerTableWrap::-webkit-scrollbar-thumb,
#ledgerTableWrap.no-h-scroll::-webkit-scrollbar-thumb {
  background: rgba(99, 228, 246, .72) !important;
  border-radius: 999px !important;
}
#ledgerTableWrap::-webkit-scrollbar-track,
#ledgerTableWrap.no-h-scroll::-webkit-scrollbar-track {
  background: rgba(5, 17, 30, .48) !important;
}

#ledgerTable,
#ledgerTableWrap table,
body.non-admin-ledger #ledgerTable,
body.non-admin-ledger #ledgerTableWrap table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
  width: max-content !important;
  max-width: none !important;
  margin: 0 !important;
}
body.user-admin #ledgerTable,
body.admin-unlocked #ledgerTable { min-width: 1810px !important; }
body.user-normal #ledgerTable,
body.non-admin-ledger #ledgerTable { min-width: 1060px !important; }

#ledgerTable th,
#ledgerTable td,
body.non-admin-ledger #ledgerTable th,
body.non-admin-ledger #ledgerTable td {
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 4px 5px !important;
  font-size: 9px !important;
  line-height: 1.18 !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}
#ledgerTable th { letter-spacing: .02em !important; }
#ledgerTable td { height: 38px !important; }

/* Exact compact widths remove the old large empty gaps between columns. */
#ledgerTable .ledger-col-tradeCount { width: 96px !important; min-width: 96px !important; max-width: 96px !important; }
#ledgerTable .ledger-col-side { width: 58px !important; min-width: 58px !important; max-width: 58px !important; }
#ledgerTable .ledger-col-entryExit,
#ledgerTable .entry-exit-cell { width: 124px !important; min-width: 124px !important; max-width: 124px !important; }
#ledgerTable .ledger-col-origAdjSl,
#ledgerTable .orig-adj-sl-cell { width: 188px !important; min-width: 188px !important; max-width: 188px !important; }
#ledgerTable .ledger-col-origAdjTarget,
#ledgerTable .orig-adj-target-cell { width: 196px !important; min-width: 196px !important; max-width: 196px !important; }
#ledgerTable .ledger-col-stopLoss,
#ledgerTable .stop-loss-cell { width: 178px !important; min-width: 178px !important; max-width: 178px !important; }
#ledgerTable .ledger-col-targetExit,
#ledgerTable .target-exit-cell { width: 184px !important; min-width: 184px !important; max-width: 184px !important; }
#ledgerTable .ledger-col-createdSettled,
#ledgerTable .created-settled-cell { width: 142px !important; min-width: 142px !important; max-width: 142px !important; }
#ledgerTable .ledger-col-duration { width: 76px !important; min-width: 76px !important; max-width: 76px !important; text-align: center !important; }
#ledgerTable .ledger-col-pnl { width: 76px !important; min-width: 76px !important; max-width: 76px !important; text-align: center !important; }
#ledgerTable .ledger-col-closeReason,
#ledgerTable .reason-cell {
  width: 162px !important;
  min-width: 162px !important;
  max-width: 162px !important;
  white-space: normal !important;
  line-height: 1.16 !important;
}
#ledgerTable .ledger-col-stake { width: 72px !important; min-width: 72px !important; max-width: 72px !important; }
#ledgerTable .ledger-col-symbol { width: 88px !important; min-width: 88px !important; max-width: 88px !important; }
#ledgerTable th[class*="ledger-col-pred"],
#ledgerTable td.prediction-combined-cell {
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
  font-size: 8.5px !important;
}

.ledger-stack {
  display: grid !important;
  grid-template-rows: repeat(2, minmax(0, auto)) !important;
  gap: 2px !important;
  width: 100% !important;
  min-width: 0 !important;
}
.ledger-stack-line {
  display: grid !important;
  grid-template-columns: 29px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 3px !important;
  min-width: 0 !important;
}
.ledger-stack-line b {
  color: rgba(116, 226, 245, .84) !important;
  font-size: 7px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}
.ledger-stack-line em {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  color: inherit !important;
  font-size: 8.5px !important;
  font-style: normal !important;
  white-space: nowrap !important;
}
.created-settled-stack .ledger-stack-line { grid-template-columns: 31px minmax(0, 1fr) !important; }
.orig-adj-stack .ledger-stack-line { grid-template-columns: 27px minmax(0, 1fr) !important; }
.entry-exit-stack .ledger-stack-line { grid-template-columns: 22px minmax(0, 1fr) !important; }

/* In administrator landscape/PC view, Count through Reason stay fixed while
   Stake, Symbol, and prediction columns scroll. JS supplies exact left offsets. */
body.user-admin:not(.phone-tab-layout) #ledgerTable .sticky-col,
body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .sticky-col {
  position: sticky !important;
  background: #1d2d43 !important;
  box-shadow: 1px 0 0 rgba(255,255,255,.09) !important;
  z-index: 6 !important;
}
body.user-admin:not(.phone-tab-layout) #ledgerTable thead .sticky-col,
body.admin-unlocked:not(.phone-tab-layout) #ledgerTable thead .sticky-col {
  background: #20324a !important;
  z-index: 12 !important;
}

/* Portrait phone/tablet: all columns remain reachable inside Historical Orders,
   but none are frozen because the fixed analysis group is wider than the screen. */
body.phone-tab-layout #ledgerTable,
body.phone-tab-layout.user-admin #ledgerTable,
body.phone-tab-layout.user-normal #ledgerTable,
body.phone-tab-layout.non-admin-ledger #ledgerTable {
  table-layout: fixed !important;
  width: max-content !important;
  max-width: none !important;
}
body.phone-tab-layout.user-admin #ledgerTable { min-width: 1810px !important; }
body.phone-tab-layout.user-normal #ledgerTable,
body.phone-tab-layout.non-admin-ledger #ledgerTable { min-width: 1060px !important; }
body.phone-tab-layout #ledgerTable th,
body.phone-tab-layout #ledgerTable td {
  padding: 4px 5px !important;
  font-size: 8.5px !important;
}
body.phone-tab-layout #ledgerTable .sticky-col { position: static !important; left: auto !important; }


/* ========================================================================== 
   DPX v0.5.1 SAME-NAME PATCH — prediction count-down column
   Count down is measured from the displayed prediction snapshot and updates
   once per second without changing prediction or trading calculations.
   ========================================================================== */
.prediction-countdown-head,
.prediction-countdown-cell,
.prediction-countdown-value {
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
}
.prediction-countdown-head,
.prediction-countdown-cell {
  text-align: center !important;
}
.prediction-countdown-value {
  display: inline-block !important;
  min-width: 46px !important;
  color: #f8fbff !important;
  font-weight: 900 !important;
  letter-spacing: .02em !important;
}
.prediction-countdown-value.expired { color: #aeb9c8 !important; }

@media (min-width: 761px) {
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(205px, 1.58fr) minmax(98px, .76fr) minmax(65px, .50fr) minmax(58px, .46fr) minmax(72px, .54fr) !important;
    column-gap: 7px !important;
  }
  .trade-card .prediction-countdown-head { font-size: 10px !important; }
  .trade-card .prediction-countdown-cell { font-size: 11px !important; padding-left: 2px !important; padding-right: 2px !important; }
  .chart-panel-hidden .prediction-card-metrics {
    grid-template-columns: minmax(104px, 1.15fr) minmax(72px, .82fr) minmax(62px, .72fr) minmax(76px, .82fr) !important;
  }
  .chart-panel-hidden .prediction-card-countdown em { text-align: center !important; }
}
@media (min-width: 761px) and (max-width: 1400px) {
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(175px, 1.45fr) minmax(84px, .72fr) minmax(58px, .48fr) minmax(52px, .44fr) minmax(66px, .52fr) !important;
    column-gap: 5px !important;
  }
  .trade-card .prediction-table-head { font-size: 9px !important; }
  .trade-card .prediction-info-cell { font-size: 10px !important; }
}

/* Phone/portrait: preserve the client layout while adding a compact fifth
   metric. The full page remains fixed; prediction rows do not overflow. */
body.phone-tab-layout .prediction-mobile-row {
  grid-template-columns: minmax(116px, 1.18fr) minmax(66px, .70fr) minmax(46px, .48fr) minmax(42px, .44fr) minmax(48px, .50fr) !important;
  gap: 3px !important;
}
body.phone-tab-layout .prediction-mobile-row .mobile-pred-countdown {
  display: grid !important;
  grid-template-rows: 14px 1fr !important;
  align-items: center !important;
  justify-items: center !important;
  min-width: 0 !important;
  border-radius: 8px !important;
  padding: 4px 3px !important;
  background: rgba(255,255,255,.055) !important;
  color: #f6fbff !important;
  overflow: hidden !important;
}
body.phone-tab-layout .prediction-mobile-row .mobile-pred-countdown b {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  font-size: 6.8px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
body.phone-tab-layout .prediction-mobile-row .mobile-pred-countdown em,
body.phone-tab-layout .prediction-mobile-row .mobile-pred-countdown .prediction-countdown-value {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  text-align: center !important;
  font-size: 9.5px !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
@media (max-width: 390px) {
  body.phone-tab-layout .prediction-mobile-row {
    grid-template-columns: minmax(112px, 1.16fr) minmax(62px, .68fr) minmax(43px, .46fr) minmax(39px, .42fr) minmax(45px, .48fr) !important;
    gap: 2px !important;
    padding: 3px !important;
  }
  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell {
    grid-template-columns: minmax(45px, 1fr) 28px 30px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  body.phone-tab-layout .prediction-mobile-row .pred-side { font-size: 16px !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-minute,
  body.phone-tab-layout .prediction-mobile-row .pred-conf { font-size: 10px !important; }
}

/* Tablet-landscape countdown fit: keep all five prediction columns inside the
   trading card without creating whole-page horizontal overflow. */
@media (min-width: 761px) and (max-width: 1240px) {
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(148px, 1.32fr) minmax(72px, .68fr) minmax(48px, .44fr) minmax(44px, .40fr) minmax(58px, .48fr) !important;
    column-gap: 4px !important;
  }
  .trade-card .prediction-action-cell {
    grid-template-columns: minmax(58px, 1fr) 32px 36px !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
  }
  .trade-card .prediction-table-head,
  .trade-card .prediction-info-cell { font-size: 9px !important; }
  .trade-card .prediction-countdown-value { min-width: 42px !important; }
}

/* ========================================================================== 
   DPX v0.5.1 SAME-NAME PATCH — exact uploaded profit sound + ultra-compact ledger
   ========================================================================== */

/* PC/laptop: hide scrollbar chrome, but preserve wheel, touchpad, keyboard and
   programmatic horizontal/vertical scrolling. */
@media (min-width: 761px) {
  #ledgerTableWrap,
  #ledgerTableWrap.no-h-scroll,
  body.admin-unlocked #ledgerTableWrap,
  body.non-admin-ledger #ledgerTableWrap,
  body.user-admin #ledgerTableWrap,
  body.user-normal #ledgerTableWrap {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
  }
  #ledgerTableWrap::-webkit-scrollbar,
  #ledgerTableWrap.no-h-scroll::-webkit-scrollbar,
  body.admin-unlocked #ledgerTableWrap::-webkit-scrollbar,
  body.non-admin-ledger #ledgerTableWrap::-webkit-scrollbar,
  body.user-admin #ledgerTableWrap::-webkit-scrollbar,
  body.user-normal #ledgerTableWrap::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
  }
}

/* Minimum practical spacing: compact cells without clipping or overlap. */
#ledgerTable th,
#ledgerTable td,
body.non-admin-ledger #ledgerTable th,
body.non-admin-ledger #ledgerTable td {
  padding-left: 2px !important;
  padding-right: 2px !important;
}
#ledgerTable .ledger-col-tradeCount { width: 84px !important; min-width: 84px !important; max-width: 84px !important; }
#ledgerTable .ledger-col-side { width: 48px !important; min-width: 48px !important; max-width: 48px !important; }
#ledgerTable .ledger-col-entryExit,
#ledgerTable .entry-exit-cell { width: 112px !important; min-width: 112px !important; max-width: 112px !important; }
#ledgerTable .ledger-col-stopLoss,
#ledgerTable .stop-loss-cell { width: 132px !important; min-width: 132px !important; max-width: 132px !important; }
#ledgerTable .ledger-col-targetExit,
#ledgerTable .target-exit-cell { width: 136px !important; min-width: 136px !important; max-width: 136px !important; }
#ledgerTable .ledger-col-createdSettled,
#ledgerTable .created-settled-cell { width: 134px !important; min-width: 134px !important; max-width: 134px !important; }
#ledgerTable .ledger-col-duration { width: 66px !important; min-width: 66px !important; max-width: 66px !important; }
#ledgerTable .ledger-col-pnl { width: 68px !important; min-width: 68px !important; max-width: 68px !important; }
#ledgerTable .ledger-col-closeReason,
#ledgerTable .reason-cell { width: 142px !important; min-width: 142px !important; max-width: 142px !important; }
#ledgerTable .ledger-col-stake { width: 64px !important; min-width: 64px !important; max-width: 64px !important; }
#ledgerTable .ledger-col-symbol { width: 78px !important; min-width: 78px !important; max-width: 78px !important; }
#ledgerTable th[class*="ledger-col-pred"],
#ledgerTable td.prediction-combined-cell { width: 92px !important; min-width: 92px !important; max-width: 92px !important; }

.risk-value-stack {
  display: grid !important;
  grid-template-rows: repeat(2, auto) !important;
  gap: 1px !important;
  width: 100% !important;
  min-width: 0 !important;
  line-height: 1.08 !important;
}
.risk-value-stack > span {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}
.risk-value-stack > span:first-child {
  color: rgba(116, 226, 245, .9) !important;
  font-size: 7.5px !important;
  font-weight: 800 !important;
}
.risk-value-stack > span:last-child { font-size: 8px !important; }

/* Phone/narrow tablet: make Stop Loss and Target Exit especially narrow and
   always show percentage on line 1, price/difference on line 2. */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1024px) {
  body.phone-tab-layout #ledgerTable .ledger-col-stopLoss,
  body.phone-tab-layout #ledgerTable .stop-loss-cell { width: 112px !important; min-width: 112px !important; max-width: 112px !important; }
  body.phone-tab-layout #ledgerTable .ledger-col-targetExit,
  body.phone-tab-layout #ledgerTable .target-exit-cell { width: 116px !important; min-width: 116px !important; max-width: 116px !important; }
  body.phone-tab-layout #ledgerTable th,
  body.phone-tab-layout #ledgerTable td { padding-left: 2px !important; padding-right: 2px !important; }
  body.phone-tab-layout.user-normal #ledgerTable,
  body.phone-tab-layout.non-admin-ledger #ledgerTable { min-width: 900px !important; }
}

/* ========================================================================== 
   DPX v0.5.1 — client-design responsive and typography patch
   ========================================================================== */
:root { --v044-readable: 1.10; }
body { font-size: 16px !important; }
button, input, select, textarea { font-size: 15px !important; }
.eyebrow { font-size: 14px !important; }

/* Swap header information: connection status precedes market price. */
.hero { display: grid !important; grid-template-columns: 1fr auto auto !important; align-items: center !important; gap: 10px !important; }
.hero .brand-block { order: 1; }
.hero .status-box { order: 2; }
.hero .hero-market-slot { order: 3; }
.status-box strong { font-size: 17px !important; }
.status-box small { font-size: 13px !important; }
.market-price-panel .market-price-label { font-size: 12px !important; }
.market-price-panel #livePrice { font-size: 24px !important; }

/* Larger custom info popup, no browser “localhost says” alert chrome. */
.dpx-info-modal { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 18px; background: rgba(2,8,18,.72); }
.dpx-info-dialog { width: min(560px, 94vw); border: 2px solid #5fdff2; border-radius: 14px; background: #1c3149; color: #fff; box-shadow: 0 18px 70px rgba(0,0,0,.55); padding: 24px; }
.dpx-info-title { font-size: 26px; line-height: 1.15; font-weight: 900; margin-bottom: 16px; color: #6ce8fa; }
.dpx-info-body { display: grid; gap: 10px; font-size: 21px; line-height: 1.35; overflow-wrap: anywhere; }
.dpx-info-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.dpx-info-actions button { min-height: 46px; padding: 10px 18px !important; font-size: 17px !important; }

/* Larger readable ledger text while preserving the existing column widths. */
#ledgerTable th { font-size: 12px !important; line-height: 1.08 !important; padding-top: 5px !important; padding-bottom: 5px !important; }
#ledgerTable td { font-size: 12.5px !important; line-height: 1.13 !important; padding-top: 6px !important; padding-bottom: 6px !important; }
#ledgerTable .stack-label, #ledgerTable .entry-exit-stack b { font-size: 9px !important; }
#ledgerTable .stack-value, #ledgerTable .entry-exit-stack span { font-size: inherit !important; }

/* Prediction metrics and countdown alignment. */
.prediction-table-head, .prediction-info-cell { font-size: 13px !important; }
.prediction-countdown-value { font-size: 13px !important; }
.prediction-countdown-cell { display: flex !important; align-items: center !important; justify-content: center !important; }

@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  body.phone-tab-layout { font-size: 14px !important; }
  body.phone-tab-layout .app-shell { gap: 3px !important; padding: 3px !important; }
  body.phone-tab-layout .hero { grid-template-columns: 1fr auto !important; grid-template-areas: "brand price" "brand status" !important; gap: 0 5px !important; min-height: 64px !important; padding: 5px 7px !important; }
  body.phone-tab-layout .hero .brand-block { grid-area: brand; align-self: center; }
  body.phone-tab-layout .hero .hero-market-slot { grid-area: price; justify-self: end; }
  body.phone-tab-layout .hero .status-box { grid-area: status; justify-self: end; width: auto !important; max-width: 100% !important; padding: 2px 0 !important; border: 0 !important; background: transparent !important; }
  body.phone-tab-layout .status-box strong { font-size: 10px !important; white-space: nowrap; }
  body.phone-tab-layout .status-box small { display: none !important; }
  body.phone-tab-layout .market-price-panel { padding: 2px 5px !important; min-height: 28px !important; }
  body.phone-tab-layout .market-price-panel #livePrice { font-size: 20px !important; }
  body.phone-tab-layout .session-bar { min-height: 37px !important; padding: 3px 6px !important; }
  body.phone-tab-layout #accountMenuBtn { min-height: 29px !important; font-size: 11px !important; padding: 3px 7px !important; }
  body.phone-tab-layout .balance-row { font-size: 11px !important; }

  /* Pack complete upper section into one phone viewport. */
  body.phone-tab-layout .demo-layout { gap: 2px !important; }
  body.phone-tab-layout .demo-layout .trade-card { padding: 3px !important; row-gap: 1px !important; }
  body.phone-tab-layout .trade-card .trade-market-row { min-height: 32px !important; }
  body.phone-tab-layout .trade-card .trade-symbol-control .field-label { font-size: 6px !important; line-height: 1 !important; }
  body.phone-tab-layout .trade-card .trade-symbol-control .select-input { height: 30px !important; min-height: 30px !important; padding: 2px 7px !important; font-size: 10px !important; }
  body.phone-tab-layout .trade-card .trading-auto-status,
  body.phone-tab-layout .trade-card .title-auto-run-toggle { height: 30px !important; min-height: 30px !important; }
  body.phone-tab-layout .trade-card .prediction-workbench { grid-template-columns: minmax(0,1.72fr) minmax(0,.82fr) !important; gap: 2px !important; }
  body.phone-tab-layout .trade-card .prediction-workbench .prediction-order-row { gap: 1px !important; }
  body.phone-tab-layout .trade-card .prediction-workbench .prediction-order-row .field-label { font-size: 6.6px !important; }
  body.phone-tab-layout .trade-card .prediction-workbench input,
  body.phone-tab-layout .trade-card .prediction-workbench select { height: 28px !important; min-height: 28px !important; padding: 2px 5px !important; font-size: 10px !important; }
  body.phone-tab-layout #presetPercentSelect { height: 28px !important; min-height: 28px !important; }
  body.phone-tab-layout .phone-auto-execution-slot .chart-auto-execution-panel { min-height: 43px !important; max-height: 48px !important; }
  body.phone-tab-layout .phone-auto-execution-slot .auto-output-box { height: 36px !important; min-height: 36px !important; max-height: 36px !important; font-size: 7.5px !important; }

  body.phone-tab-layout .prediction-mobile-list { gap: 2px !important; }
  body.phone-tab-layout .prediction-mobile-row { min-height: 47px !important; padding: 2px !important; grid-template-columns: minmax(126px,1.24fr) minmax(65px,.66fr) minmax(48px,.48fr) minmax(45px,.45fr) minmax(55px,.55fr) !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-side { font-size: 19px !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-minute,
  body.phone-tab-layout .prediction-mobile-row .pred-conf { font-size: 11px !important; }
  body.phone-tab-layout .prediction-mobile-row span b { font-size: 7.5px !important; }
  body.phone-tab-layout .prediction-mobile-row span em { font-size: 11px !important; }
  body.phone-tab-layout .prediction-mobile-row .mobile-pred-countdown { align-self: stretch !important; display: grid !important; place-content: center !important; }
  body.phone-tab-layout .prediction-mobile-row .mobile-pred-countdown b { font-size: 7.5px !important; }
  body.phone-tab-layout .prediction-mobile-row .mobile-pred-countdown em,
  body.phone-tab-layout .prediction-mobile-row .mobile-pred-countdown .prediction-countdown-value { font-size: 11px !important; }

  body.phone-tab-layout .phone-bottom-tabs { margin-top: 2px !important; }
  body.phone-tab-layout .phone-tab-list { border-top: 2px solid #6f8498 !important; border-bottom: 2px solid #6f8498 !important; }
  body.phone-tab-layout .phone-bottom-tab { min-height: 38px !important; font-size: 12px !important; }
  body.phone-tab-layout.user-normal #phoneEntryTab,
  body.phone-tab-layout.user-normal #phoneAdjustTab,
  body.phone-tab-layout.user-normal #phoneSettingTab,
  body.phone-tab-layout.non-admin-ledger #phoneEntryTab,
  body.phone-tab-layout.non-admin-ledger #phoneAdjustTab,
  body.phone-tab-layout.non-admin-ledger #phoneSettingTab { display: none !important; }
  body.phone-tab-layout.user-normal .phone-tab-list,
  body.phone-tab-layout.non-admin-ledger .phone-tab-list { grid-template-columns: repeat(2,1fr) !important; }

  /* Bigger phone history text without widening columns. */
  body.phone-tab-layout #ledgerTable th { font-size: 10.5px !important; line-height: 1.05 !important; }
  body.phone-tab-layout #ledgerTable td { font-size: 11.5px !important; line-height: 1.08 !important; }
  body.phone-tab-layout #ledgerTable .entry-exit-stack b,
  body.phone-tab-layout #ledgerTable .stack-label { font-size: 8.5px !important; }
  body.phone-tab-layout #ledgerTable th,
  body.phone-tab-layout #ledgerTable td { padding-top: 4px !important; padding-bottom: 4px !important; }
}


/* DPX v0.5.1 patch: lock the first 3 Historical Orders columns for all users. */
#ledgerTable .sticky-col {
  position: sticky !important;
  background: #1d2d43 !important;
  box-shadow: 1px 0 0 rgba(255,255,255,.09) !important;
  z-index: 8 !important;
}
#ledgerTable thead .sticky-col {
  background: #20324a !important;
  z-index: 16 !important;
}
body.phone-tab-layout #ledgerTable .sticky-col {
  position: sticky !important;
}

/* ========================================================================== 
   DPX v0.5.1 FINAL ACCEPTANCE PATCH — 2026-07-12
   Mandatory references: client phone layout + account/admin popup screenshots.
   ========================================================================== */

/* Header: live connection status on the left, market price on the far right. */
.hero {
  grid-template-columns: minmax(150px, 1fr) auto auto !important;
  column-gap: 10px !important;
}
.hero .brand-block { order: 1 !important; }
.hero .status-box { order: 2 !important; justify-self: end !important; }
.hero .hero-market-slot { order: 3 !important; justify-self: end !important; }
.hero .status-box,
.hero .market-price-panel { align-self: center !important; }

/* Account menu follows the approved dark layout and keeps the full client name visible. */
#accountMenuBtn {
  width: auto !important;
  max-width: min(420px, 92vw) !important;
  min-height: 38px !important;
  padding: 7px 12px !important;
  gap: 8px !important;
  font-size: 15px !important;
  line-height: 1.1 !important;
}
#accountMenuBtn > span:nth-child(2) {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.account-menu {
  min-width: 250px !important;
  padding: 7px !important;
  border: 1px solid rgba(107, 224, 244, .55) !important;
  background: #14263a !important;
  z-index: 50000 !important;
}
.account-menu button,
.account-menu .account-menu-group {
  font-size: 14px !important;
  line-height: 1.15 !important;
}

/* Custom DPX dialogs. Native browser prompt chrome is not used by account/admin flows. */
.dpx-info-modal {
  backdrop-filter: blur(2px) !important;
}
.dpx-info-dialog {
  width: min(620px, 95vw) !important;
  max-height: 92vh !important;
  overflow: auto !important;
  padding: 24px !important;
}
.dpx-info-title {
  font-size: 28px !important;
  line-height: 1.12 !important;
}
.dpx-info-body {
  font-size: 22px !important;
  line-height: 1.38 !important;
}
.dpx-users-dialog {
  width: min(1040px, 96vw) !important;
}
.dpx-users-message {
  min-height: 28px !important;
  margin: -4px 0 10px !important;
  color: #7ff0a5 !important;
  font-size: 17px !important;
  font-weight: 800 !important;
}
.dpx-users-message.error { color: #ff8ba6 !important; }
.dpx-users-layout {
  display: grid !important;
  grid-template-columns: minmax(300px, .9fr) minmax(320px, 1.1fr) !important;
  gap: 18px !important;
  align-items: start !important;
}
.dpx-users-section-title {
  margin-bottom: 8px !important;
  color: #68e3f4 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
}
.dpx-users-list {
  display: grid !important;
  gap: 8px !important;
  max-height: 520px !important;
  overflow: auto !important;
}
.dpx-user-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 5px 10px !important;
  width: 100% !important;
  padding: 12px !important;
  border: 1px solid rgba(111, 225, 244, .28) !important;
  border-radius: 10px !important;
  background: #102238 !important;
  color: #fff !important;
  text-align: left !important;
  cursor: pointer !important;
}
.dpx-user-card.selected {
  border-color: #66e5f6 !important;
  box-shadow: 0 0 0 2px rgba(102, 229, 246, .2) !important;
  background: #18314a !important;
}
.dpx-user-card-name {
  min-width: 0 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  overflow-wrap: anywhere !important;
}
.dpx-user-card-contact,
.dpx-user-card-invite {
  font-size: 14px !important;
  color: #c7d7e8 !important;
  overflow-wrap: anywhere !important;
}
.dpx-user-card-status {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  grid-row: span 2 !important;
}
.dpx-user-card-status b {
  padding: 3px 6px !important;
  border-radius: 999px !important;
  background: rgba(99, 228, 246, .13) !important;
  color: #7ceafa !important;
  font-size: 11px !important;
}
.dpx-users-controls {
  display: grid !important;
  gap: 9px !important;
}
.dpx-users-controls label {
  display: grid !important;
  gap: 4px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}
.dpx-users-controls .text-input {
  min-height: 42px !important;
  font-size: 16px !important;
}
.dpx-user-action-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
}
.dpx-user-action-grid button,
#dpxCreateInvite {
  min-height: 42px !important;
  font-size: 14px !important;
}
.dpx-wide-action { grid-column: 1 / -1 !important; }
.dpx-invite-title {
  margin-top: 10px !important;
  padding-top: 12px !important;
  border-top: 1px solid rgba(111, 225, 244, .24) !important;
}
.dpx-users-empty {
  padding: 18px !important;
  color: #cad8e8 !important;
  font-size: 16px !important;
}

/* Historical Orders: only Count, Side and Entry/Exit are sticky for every role. */
#ledgerTableWrap,
#ledgerTableWrap.no-h-scroll,
body.admin-unlocked #ledgerTableWrap,
body.non-admin-ledger #ledgerTableWrap,
body.user-admin #ledgerTableWrap,
body.user-normal #ledgerTableWrap {
  overflow-x: auto !important;
  overflow-y: auto !important;
  touch-action: pan-x pan-y !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
#ledgerTableWrap::-webkit-scrollbar,
#ledgerTableWrap.no-h-scroll::-webkit-scrollbar,
body.admin-unlocked #ledgerTableWrap::-webkit-scrollbar,
body.non-admin-ledger #ledgerTableWrap::-webkit-scrollbar,
body.user-admin #ledgerTableWrap::-webkit-scrollbar,
body.user-normal #ledgerTableWrap::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}
#ledgerTable .sticky-col {
  position: sticky !important;
  background: #1d2d43 !important;
  box-shadow: 1px 0 0 rgba(255,255,255,.10) !important;
  z-index: 8 !important;
}
#ledgerTable thead .sticky-col {
  background: #20324a !important;
  z-index: 18 !important;
}
/* No column after Entry/Exit may become sticky, even if an old browser cache has classes. */
#ledgerTable .ledger-col-origAdjSl,
#ledgerTable .ledger-col-origAdjTarget,
#ledgerTable .ledger-col-stopLoss,
#ledgerTable .ledger-col-targetExit,
#ledgerTable .ledger-col-createdSettled,
#ledgerTable .ledger-col-duration,
#ledgerTable .ledger-col-pnl,
#ledgerTable .ledger-col-closeReason,
#ledgerTable .ledger-col-stake,
#ledgerTable .ledger-col-symbol,
#ledgerTable [class*="ledger-col-pred"] {
  position: static !important;
  left: auto !important;
}

/* Larger ledger fonts without changing the approved column widths. */
#ledgerTable th {
  font-size: 12.5px !important;
  line-height: 1.06 !important;
  font-weight: 900 !important;
}
#ledgerTable td {
  font-size: 13px !important;
  line-height: 1.12 !important;
}
#ledgerTable .ledger-stack-line b,
#ledgerTable .entry-exit-stack b,
#ledgerTable .stack-label {
  font-size: 9.5px !important;
}
#ledgerTable .ledger-stack-line em,
#ledgerTable .stack-value {
  font-size: 11.5px !important;
}

/* Stronger visual separation of phone sections. */
body.phone-tab-layout .session-bar,
body.phone-tab-layout .trade-market-row,
body.phone-tab-layout .prediction-workbench,
body.phone-tab-layout .phone-bottom-tabs,
body.phone-tab-layout .phone-tab-panels {
  border-color: rgba(124, 151, 177, .72) !important;
}
body.phone-tab-layout .trade-market-row {
  border-bottom: 2px solid rgba(124, 151, 177, .72) !important;
  padding-bottom: 3px !important;
}
body.phone-tab-layout .prediction-workbench {
  border-bottom: 2px solid rgba(124, 151, 177, .72) !important;
  padding-bottom: 3px !important;
}

@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  /* Compact the complete upper trading portion so it fits in a phone viewport. */
  body.phone-tab-layout .app-shell {
    padding: 2px !important;
    gap: 2px !important;
  }
  body.phone-tab-layout .hero {
    min-height: 54px !important;
    max-height: 54px !important;
    padding: 3px 6px !important;
    grid-template-columns: minmax(100px, 1fr) auto !important;
    grid-template-areas: "brand price" "brand status" !important;
    row-gap: 0 !important;
  }
  body.phone-tab-layout .hero h1 { font-size: 25px !important; line-height: 1 !important; }
  body.phone-tab-layout .hero .status-box {
    grid-area: status !important;
    justify-self: end !important;
    text-align: right !important;
    padding: 0 !important;
    min-height: 18px !important;
  }
  body.phone-tab-layout .hero .status-box > div { text-align: right !important; }
  body.phone-tab-layout .hero .status-box strong {
    display: block !important;
    font-size: 10.5px !important;
    line-height: 1 !important;
  }
  body.phone-tab-layout .hero .market-price-panel {
    grid-area: price !important;
    justify-self: end !important;
    min-height: 25px !important;
    padding: 1px 5px !important;
  }
  body.phone-tab-layout .market-price-panel .market-price-label { font-size: 7px !important; line-height: 1 !important; }
  body.phone-tab-layout .market-price-panel #livePrice { font-size: 19px !important; line-height: 1 !important; }
  body.phone-tab-layout .session-bar {
    min-height: 33px !important;
    max-height: 33px !important;
    padding: 2px 5px !important;
  }
  body.phone-tab-layout #accountMenuBtn {
    min-height: 27px !important;
    max-height: 27px !important;
    max-width: 255px !important;
    padding: 2px 6px !important;
    font-size: 10.5px !important;
  }
  body.phone-tab-layout .balance-row { font-size: 10.5px !important; }

  body.phone-tab-layout .demo-layout .trade-card {
    padding: 2px !important;
    gap: 1px !important;
  }
  body.phone-tab-layout .trade-heading {
    min-height: 31px !important;
    max-height: 31px !important;
    padding: 1px 2px !important;
  }
  body.phone-tab-layout .trade-title-status { gap: 4px !important; }
  body.phone-tab-layout .trade-title-status .eyebrow { font-size: 8px !important; }
  body.phone-tab-layout .trading-auto-status,
  body.phone-tab-layout .title-auto-run-toggle {
    height: 27px !important;
    min-height: 27px !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
    font-size: 11px !important;
  }
  body.phone-tab-layout .trade-market-row {
    min-height: 31px !important;
    max-height: 34px !important;
  }
  body.phone-tab-layout .trade-symbol-control .field-label { font-size: 6.5px !important; }
  body.phone-tab-layout #symbolSelect {
    height: 28px !important;
    min-height: 28px !important;
    font-size: 10.5px !important;
  }

  /* All four parameter controls use exactly the same height and baseline. */
  body.phone-tab-layout .manual-trade-line {
    align-items: end !important;
    gap: 2px !important;
  }
  body.phone-tab-layout .manual-trade-line > div {
    display: grid !important;
    grid-template-rows: 10px 28px !important;
    align-items: end !important;
  }
  body.phone-tab-layout .manual-trade-line .field-label {
    height: 10px !important;
    min-height: 10px !important;
    margin: 0 !important;
    font-size: 6.8px !important;
    line-height: 1 !important;
  }
  body.phone-tab-layout .manual-trade-line input,
  body.phone-tab-layout .manual-trade-line select,
  body.phone-tab-layout #presetPercentSelect {
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    font-size: 10.5px !important;
    line-height: 1 !important;
  }

  body.phone-tab-layout .prediction-mobile-list { gap: 1px !important; }
  body.phone-tab-layout .prediction-mobile-row {
    min-height: 43px !important;
    max-height: 43px !important;
    padding: 1px 2px !important;
    grid-template-columns: minmax(122px, 1.22fr) minmax(63px, .63fr) minmax(48px, .48fr) minmax(46px, .46fr) minmax(56px, .56fr) !important;
    align-items: stretch !important;
    border-bottom: 1px solid rgba(106, 137, 164, .35) !important;
  }
  body.phone-tab-layout .prediction-mobile-row .pred-side { font-size: 19px !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-minute,
  body.phone-tab-layout .prediction-mobile-row .pred-conf { font-size: 11.5px !important; }
  body.phone-tab-layout .prediction-mobile-row > span {
    display: grid !important;
    grid-template-rows: 13px 1fr !important;
    align-items: center !important;
    justify-items: center !important;
    min-height: 0 !important;
  }
  body.phone-tab-layout .prediction-mobile-row > span b {
    font-size: 7.8px !important;
    line-height: 1 !important;
    align-self: end !important;
  }
  body.phone-tab-layout .prediction-mobile-row > span em,
  body.phone-tab-layout .prediction-countdown-value {
    font-size: 11.5px !important;
    line-height: 1 !important;
    align-self: center !important;
  }
  body.phone-tab-layout .mobile-pred-countdown {
    align-self: stretch !important;
    justify-self: stretch !important;
  }

  body.phone-tab-layout .phone-bottom-tabs { margin-top: 1px !important; }
  body.phone-tab-layout .phone-bottom-tab {
    min-height: 34px !important;
    max-height: 34px !important;
    font-size: 11.5px !important;
  }
  body.phone-tab-layout.user-normal .phone-tab-list,
  body.phone-tab-layout.non-admin-ledger .phone-tab-list {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }
  body.phone-tab-layout.user-normal #phoneEntryTab,
  body.phone-tab-layout.user-normal #phoneAdjustTab,
  body.phone-tab-layout.user-normal #phoneSettingTab,
  body.phone-tab-layout.non-admin-ledger #phoneEntryTab,
  body.phone-tab-layout.non-admin-ledger #phoneAdjustTab,
  body.phone-tab-layout.non-admin-ledger #phoneSettingTab {
    display: none !important;
  }

  /* Phone Historical Orders: larger type, unchanged column widths. */
  body.phone-tab-layout #ledgerTable th { font-size: 11px !important; }
  body.phone-tab-layout #ledgerTable td { font-size: 12px !important; }
  body.phone-tab-layout #ledgerTable .ledger-stack-line b,
  body.phone-tab-layout #ledgerTable .entry-exit-stack b { font-size: 8.8px !important; }
  body.phone-tab-layout #ledgerTable .ledger-stack-line em { font-size: 10.8px !important; }

  .dpx-info-dialog { padding: 18px !important; }
  .dpx-info-title { font-size: 24px !important; }
  .dpx-info-body { font-size: 19px !important; }
  .dpx-users-layout { grid-template-columns: 1fr !important; }
  .dpx-users-list { max-height: 34vh !important; }
  .dpx-user-card-name { font-size: 16px !important; }
  .dpx-user-action-grid { grid-template-columns: 1fr 1fr !important; }
}

/* v0.5.1 final acceptance override: readability and hidden-scroll behavior. */
html body #ledgerTableWrap,
html body.user-admin #ledgerTableWrap,
html body.user-normal #ledgerTableWrap,
html body.admin-unlocked #ledgerTableWrap,
html body.non-admin-ledger #ledgerTableWrap {
  overflow-x: auto !important;
  overflow-y: auto !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html body #ledgerTableWrap::-webkit-scrollbar,
html body.user-admin #ledgerTableWrap::-webkit-scrollbar,
html body.user-normal #ledgerTableWrap::-webkit-scrollbar,
html body.admin-unlocked #ledgerTableWrap::-webkit-scrollbar,
html body.non-admin-ledger #ledgerTableWrap::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
/* Higher specificity is deliberate: older compact rules used !important. */
html body #ledgerTable th,
html body.user-admin #ledgerTable th,
html body.user-normal #ledgerTable th,
html body.non-admin-ledger #ledgerTable th {
  font-size: 12.5px !important;
  line-height: 1.06 !important;
  font-weight: 900 !important;
}
html body #ledgerTable td,
html body.user-admin #ledgerTable td,
html body.user-normal #ledgerTable td,
html body.non-admin-ledger #ledgerTable td {
  font-size: 13px !important;
  line-height: 1.12 !important;
}
html body #ledgerTable .ledger-stack-line b,
html body #ledgerTable .entry-exit-stack b,
html body #ledgerTable .stack-label {
  font-size: 9.5px !important;
}
html body #ledgerTable .ledger-stack-line em,
html body #ledgerTable .stack-value {
  font-size: 11.5px !important;
}

@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  html body.phone-tab-layout .manual-trade-line input:not([type="hidden"]),
  html body.phone-tab-layout .manual-trade-line select,
  html body.phone-tab-layout .manual-trade-line #presetPercentSelect {
    box-sizing: border-box !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    line-height: 1 !important;
  }
  html body.phone-tab-layout #ledgerTable th,
  html body.phone-tab-layout.user-admin #ledgerTable th,
  html body.phone-tab-layout.user-normal #ledgerTable th,
  html body.phone-tab-layout.non-admin-ledger #ledgerTable th {
    font-size: 11.5px !important;
    line-height: 1.05 !important;
  }
  html body.phone-tab-layout #ledgerTable td,
  html body.phone-tab-layout.user-admin #ledgerTable td,
  html body.phone-tab-layout.user-normal #ledgerTable td,
  html body.phone-tab-layout.non-admin-ledger #ledgerTable td {
    font-size: 12.5px !important;
    line-height: 1.1 !important;
  }
  html body.phone-tab-layout #ledgerTable .ledger-stack-line b,
  html body.phone-tab-layout #ledgerTable .entry-exit-stack b,
  html body.phone-tab-layout #ledgerTable .stack-label {
    font-size: 9px !important;
  }
  html body.phone-tab-layout #ledgerTable .ledger-stack-line em,
  html body.phone-tab-layout #ledgerTable .stack-value {
    font-size: 11px !important;
  }
}

/* v0.5.1 absolute final specificity overrides for legacy same-name patches. */
html body.phone-tab-layout #ledgerTableWrap,
html body.phone-tab-layout #ledgerTableWrap.no-h-scroll,
html body.phone-tab-layout.user-admin #ledgerTableWrap,
html body.phone-tab-layout.user-admin #ledgerTableWrap.no-h-scroll,
html body.phone-tab-layout.user-normal #ledgerTableWrap,
html body.phone-tab-layout.user-normal #ledgerTableWrap.no-h-scroll,
html body.phone-tab-layout.non-admin-ledger #ledgerTableWrap,
html body.phone-tab-layout.non-admin-ledger #ledgerTableWrap.no-h-scroll {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html body.phone-tab-layout #ledgerTableWrap::-webkit-scrollbar,
html body.phone-tab-layout #ledgerTableWrap.no-h-scroll::-webkit-scrollbar,
html body.phone-tab-layout.user-admin #ledgerTableWrap::-webkit-scrollbar,
html body.phone-tab-layout.user-admin #ledgerTableWrap.no-h-scroll::-webkit-scrollbar,
html body.phone-tab-layout.user-normal #ledgerTableWrap::-webkit-scrollbar,
html body.phone-tab-layout.user-normal #ledgerTableWrap.no-h-scroll::-webkit-scrollbar,
html body.phone-tab-layout.non-admin-ledger #ledgerTableWrap::-webkit-scrollbar,
html body.phone-tab-layout.non-admin-ledger #ledgerTableWrap.no-h-scroll::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  html body.phone-tab-layout .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect,
  html body.phone-tab-layout .trade-card .prediction-workbench .prediction-order-row input:not([type="hidden"]),
  html body.phone-tab-layout .trade-card .prediction-workbench .prediction-order-row select {
    box-sizing: border-box !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    line-height: 1 !important;
  }
}

/* ========================================================================== 
   DPX v0.5.1 FINAL ACCEPTANCE PATCH — 2026-07-12
   Mandatory PC/phone screenshots, readable dialogs, ledger type, phone fit.
   ========================================================================== */

/* All custom modal buttons must remain readable in enabled and disabled states. */
.dpx-info-modal .action-btn,
.dpx-info-modal .ghost-btn,
.dpx-users-modal .action-btn,
.dpx-users-modal .ghost-btn,
#dpxCreateInvite,
#dpxUsersClose,
.dpx-modal-primary,
.dpx-modal-secondary {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.35) !important;
  border: 1px solid rgba(121, 217, 245, .42) !important;
  background: linear-gradient(180deg, #31577d, #243e5d) !important;
  opacity: 1 !important;
  font-weight: 900 !important;
}
.dpx-info-modal .action-btn:hover,
.dpx-info-modal .ghost-btn:hover,
#dpxCreateInvite:hover,
#dpxUsersClose:hover,
.dpx-modal-primary:hover,
.dpx-modal-secondary:hover {
  background: linear-gradient(180deg, #3e6e9c, #2c4d72) !important;
  border-color: #73e6ff !important;
}
.dpx-info-modal button:focus-visible,
.dpx-users-modal button:focus-visible {
  outline: 3px solid #72e8ff !important;
  outline-offset: 2px !important;
}
.dpx-info-modal button:disabled,
.dpx-users-modal button:disabled,
#dpxCreateInvite:disabled {
  color: rgba(255,255,255,.78) !important;
  -webkit-text-fill-color: rgba(255,255,255,.78) !important;
  background: #4d6074 !important;
  border-color: rgba(255,255,255,.22) !important;
  opacity: .72 !important;
  cursor: not-allowed !important;
}
.dpx-info-dialog,
.dpx-users-dialog,
.dpx-form-dialog {
  color: #f5f9ff !important;
}
.dpx-info-title { font-size: clamp(25px, 2.1vw, 34px) !important; line-height: 1.1 !important; }
.dpx-info-body { font-size: clamp(19px, 1.35vw, 24px) !important; line-height: 1.45 !important; }
.dpx-info-actions { gap: 10px !important; }
.dpx-info-actions button { min-height: 48px !important; padding: 10px 20px !important; font-size: 17px !important; }
.dpx-form-dialog { width: min(560px, calc(100vw - 28px)) !important; }
.dpx-form-label { display: grid !important; gap: 6px !important; font-size: 17px !important; font-weight: 900 !important; margin: 12px 0 !important; }
.dpx-form-label .text-input { min-height: 48px !important; font-size: 18px !important; }
.dpx-form-message { min-height: 24px !important; font-size: 16px !important; color: #9deeff !important; }
.dpx-form-message.error { color: #ff8ba2 !important; }

/* Users Management remains usable and readable at every supported viewport. */
.dpx-users-dialog { max-height: min(88dvh, 820px) !important; overflow: auto !important; scrollbar-width: none !important; }
.dpx-users-dialog::-webkit-scrollbar { display: none !important; }
.dpx-users-message { min-height: 22px !important; font-size: 15px !important; color: #83f1ff !important; }
.dpx-users-message.error { color: #ff91a8 !important; }
.dpx-user-action-grid button,
#dpxCreateInvite,
#dpxUsersClose { min-height: 44px !important; font-size: 15px !important; }

/* Historical Orders: minimum spacing, larger readable type, no wider columns. */
html body #ledgerTable {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: auto !important;
}
html body #ledgerTable th,
html body #ledgerTable td {
  padding: 5px 4px !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}
html body #ledgerTable th {
  font-size: 13px !important;
  line-height: 1.05 !important;
  letter-spacing: .01em !important;
}
html body #ledgerTable td {
  font-size: 13.5px !important;
  line-height: 1.12 !important;
}
html body #ledgerTable .ledger-stack { gap: 1px !important; }
html body #ledgerTable .ledger-stack-line { gap: 4px !important; line-height: 1.08 !important; }
html body #ledgerTable .ledger-stack-line b,
html body #ledgerTable .entry-exit-stack b,
html body #ledgerTable .stack-label {
  font-size: 10.5px !important;
  min-width: 30px !important;
}
html body #ledgerTable .ledger-stack-line em,
html body #ledgerTable .stack-value,
html body #ledgerTable .risk-value-stack span {
  font-size: 12.5px !important;
  line-height: 1.08 !important;
}
html body #ledgerTable .entry-exit-cell,
html body #ledgerTable .orig-adj-sl-cell,
html body #ledgerTable .orig-adj-target-cell,
html body #ledgerTable .stop-loss-cell,
html body #ledgerTable .target-exit-cell,
html body #ledgerTable .created-settled-cell {
  padding-left: 4px !important;
  padding-right: 4px !important;
}

/* Exactly the first three columns are locked; all later columns scroll. */
html body #ledgerTable .sticky-col {
  position: sticky !important;
  background: #1d2f47 !important;
  z-index: 12 !important;
  box-shadow: 1px 0 0 rgba(131, 180, 220, .28) !important;
}
html body #ledgerTable thead .sticky-col {
  background: #243a55 !important;
  z-index: 24 !important;
}
html body #ledgerTable th:not(.sticky-col),
html body #ledgerTable td:not(.sticky-col) {
  position: static !important;
  left: auto !important;
}
html body #ledgerTableWrap,
html body #ledgerTableWrap.no-h-scroll {
  overflow: auto !important;
  touch-action: pan-x pan-y !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html body #ledgerTableWrap::-webkit-scrollbar,
html body #ledgerTableWrap.no-h-scroll::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Desktop header location required by the client: status first, market price at far right. */
@media (min-width: 761px) {
  .hero {
    grid-template-columns: minmax(260px, 1fr) auto auto !important;
    grid-template-areas: "brand status price" !important;
  }
  .brand-block { grid-area: brand !important; }
  .status-box { grid-area: status !important; }
  .hero-market-slot { grid-area: price !important; justify-self: end !important; }
}

/* Dedicated phone action stack prevents Settle from covering metrics. */
.prediction-mobile-action-stack {
  min-width: 0 !important;
  display: grid !important;
  grid-template-rows: 1fr !important;
  gap: 1px !important;
  align-self: stretch !important;
}
.prediction-mobile-row.has-open-manual .prediction-mobile-action-stack {
  grid-template-rows: minmax(24px, 1fr) 14px !important;
}
.prediction-mobile-action-stack .prediction-action-cell {
  min-height: 0 !important;
  height: 100% !important;
}
.prediction-mobile-action-stack .mobile-settle {
  position: static !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 14px !important;
  min-height: 14px !important;
  padding: 0 4px !important;
  border-radius: 4px !important;
  font-size: 8.5px !important;
  line-height: 1 !important;
  color: #ffffff !important;
  background: #536a7f !important;
  z-index: 2 !important;
}

/* Phone view: one-viewport shell, compact upper area, internal tab scrolling only. */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  html, body { height: 100% !important; min-height: 100% !important; overflow: hidden !important; }
  body.phone-tab-layout { overflow: hidden !important; }
  body.phone-tab-layout .app-shell {
    box-sizing: border-box !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    padding: 2px !important;
  }
  body.phone-tab-layout .hero,
  body.phone-tab-layout .session-bar,
  body.phone-tab-layout .demo-layout,
  body.phone-tab-layout .phone-bottom-tabs {
    flex: 0 0 auto !important;
  }
  body.phone-tab-layout .layout-tools { display: none !important; }

  body.phone-tab-layout .hero {
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 2px 5px !important;
    border-radius: 8px !important;
    grid-template-columns: minmax(90px, 1fr) auto !important;
    grid-template-areas: "brand price" "brand status" !important;
    column-gap: 5px !important;
    row-gap: 0 !important;
  }
  body.phone-tab-layout .brand-block { grid-area: brand !important; align-self: center !important; }
  body.phone-tab-layout .brand-block h1 { font-size: 24px !important; }
  body.phone-tab-layout .app-version { font-size: 9.5px !important; }
  body.phone-tab-layout .hero-market-slot { grid-area: price !important; justify-self: end !important; align-self: end !important; }
  body.phone-tab-layout .hero .market-price-panel {
    width: auto !important;
    min-width: 116px !important;
    min-height: 24px !important;
    height: 24px !important;
    padding: 1px 5px !important;
    justify-content: flex-end !important;
    text-align: right !important;
  }
  body.phone-tab-layout .market-price-label { font-size: 6.8px !important; }
  body.phone-tab-layout #livePrice { font-size: 18px !important; }
  body.phone-tab-layout .hero .status-box {
    grid-area: status !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 18px !important;
    height: 18px !important;
    justify-self: end !important;
    justify-content: flex-end !important;
    padding: 0 2px !important;
    border: 0 !important;
    background: transparent !important;
    text-align: right !important;
  }
  body.phone-tab-layout .status-box .pulse { width: 8px !important; height: 8px !important; }
  body.phone-tab-layout .status-box strong { font-size: 9.5px !important; line-height: 1 !important; }
  body.phone-tab-layout .status-box small { display: none !important; }

  body.phone-tab-layout .session-bar {
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 1px 4px !important;
    border-radius: 7px !important;
  }
  body.phone-tab-layout #accountMenuBtn {
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    max-width: 245px !important;
    padding: 1px 6px !important;
    font-size: 10.5px !important;
  }
  body.phone-tab-layout .balance-row { font-size: 10px !important; gap: 3px !important; }

  body.phone-tab-layout .demo-layout {
    display: block !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  body.phone-tab-layout .demo-layout .trade-card {
    min-height: 0 !important;
    padding: 2px 3px !important;
    border-radius: 7px !important;
    overflow: visible !important;
  }
  body.phone-tab-layout .trade-heading {
    min-height: 28px !important;
    max-height: 28px !important;
    margin: 0 !important;
    padding: 0 2px !important;
  }
  body.phone-tab-layout .trade-title-status {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    gap: 4px !important;
    width: 100% !important;
  }
  body.phone-tab-layout .trade-title-status .eyebrow {
    grid-column: 1 !important;
    font-size: 8px !important;
    margin: 0 !important;
  }
  body.phone-tab-layout .trading-auto-status {
    grid-column: 2 !important;
    justify-self: end !important;
    height: 25px !important;
    min-height: 25px !important;
    font-size: 10.5px !important;
    padding: 2px 8px !important;
  }
  body.phone-tab-layout .title-auto-run-toggle {
    grid-column: 3 !important;
    height: 25px !important;
    min-height: 25px !important;
    padding: 2px 9px !important;
    font-size: 11px !important;
  }
  body.phone-tab-layout .trade-market-row {
    min-height: 31px !important;
    max-height: 31px !important;
    margin: 0 !important;
    padding: 0 1px 2px !important;
    border-bottom: 1px solid rgba(142, 172, 201, .72) !important;
  }
  body.phone-tab-layout .trade-symbol-control .field-label { font-size: 6.5px !important; line-height: 1 !important; }
  body.phone-tab-layout #symbolSelect {
    min-height: 25px !important;
    height: 25px !important;
    max-height: 25px !important;
    padding: 1px 6px !important;
    font-size: 10.5px !important;
  }

  body.phone-tab-layout .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: minmax(0, 2fr) minmax(112px, 1fr) !important;
    grid-template-areas: "parameters execution" "predictions predictions" !important;
    align-items: stretch !important;
    gap: 2px 3px !important;
    padding: 1px 0 2px !important;
    border-bottom: 1px solid rgba(142, 172, 201, .72) !important;
  }
  body.phone-tab-layout .prediction-order-row {
    grid-area: parameters !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: end !important;
    gap: 2px !important;
    min-width: 0 !important;
  }
  body.phone-tab-layout .prediction-order-row > div {
    display: grid !important;
    grid-template-rows: 8px 25px !important;
    min-width: 0 !important;
  }
  body.phone-tab-layout .prediction-order-row .field-label {
    height: 8px !important;
    min-height: 8px !important;
    margin: 0 !important;
    font-size: 6.3px !important;
    line-height: 1 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .prediction-order-row input,
  body.phone-tab-layout .prediction-order-row select,
  body.phone-tab-layout #presetPercentSelect {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    padding: 1px 4px !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot {
    grid-area: execution !important;
    display: block !important;
    min-width: 0 !important;
    height: 33px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot .chart-auto-execution-panel {
    height: 33px !important;
    min-height: 33px !important;
    margin: 0 !important;
    padding: 1px 3px !important;
    border-radius: 5px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot .log-panel-header { display: none !important; }
  body.phone-tab-layout .phone-auto-execution-slot .auto-output-box {
    height: 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    padding: 2px 4px !important;
    overflow: hidden !important;
    font-size: 7.5px !important;
    line-height: 1.15 !important;
  }
  body.phone-tab-layout .prediction-panel {
    grid-area: predictions !important;
    min-width: 0 !important;
    padding: 1px !important;
    overflow: visible !important;
  }
  body.phone-tab-layout .prediction-mobile-list { gap: 1px !important; }
  body.phone-tab-layout .prediction-mobile-row {
    box-sizing: border-box !important;
    min-height: 39px !important;
    height: 39px !important;
    max-height: 39px !important;
    padding: 1px !important;
    gap: 2px !important;
    grid-template-columns: minmax(116px, 1.22fr) minmax(61px, .63fr) minmax(46px, .48fr) minmax(44px, .46fr) minmax(54px, .56fr) !important;
    border-radius: 4px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell {
    border-radius: 4px !important;
    padding: 1px 5px !important;
    grid-template-columns: minmax(48px, 1fr) 28px 32px !important;
  }
  body.phone-tab-layout .prediction-mobile-row .pred-side { font-size: 17px !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-minute,
  body.phone-tab-layout .prediction-mobile-row .pred-conf { font-size: 10.5px !important; }
  body.phone-tab-layout .prediction-mobile-row > span {
    display: grid !important;
    grid-template-rows: 11px 1fr !important;
    min-width: 0 !important;
    padding: 1px 2px !important;
    justify-items: center !important;
    align-items: center !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .prediction-mobile-row > span b { font-size: 7px !important; line-height: 1 !important; }
  body.phone-tab-layout .prediction-mobile-row > span em,
  body.phone-tab-layout .prediction-countdown-value { font-size: 10.5px !important; line-height: 1 !important; }

  body.phone-tab-layout .phone-bottom-tabs {
    min-height: 32px !important;
    max-height: 32px !important;
    margin: 1px 0 0 !important;
    border-top: 2px solid rgba(142, 172, 201, .72) !important;
    border-bottom: 1px solid rgba(142, 172, 201, .72) !important;
  }
  body.phone-tab-layout .phone-bottom-tab {
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 2px 4px !important;
    font-size: 11px !important;
  }
  body.phone-tab-layout.user-normal .phone-tab-list,
  body.phone-tab-layout.non-admin-ledger .phone-tab-list { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  body.phone-tab-layout.user-normal #phoneEntryTab,
  body.phone-tab-layout.user-normal #phoneAdjustTab,
  body.phone-tab-layout.user-normal #phoneSettingTab,
  body.phone-tab-layout.non-admin-ledger #phoneEntryTab,
  body.phone-tab-layout.non-admin-ledger #phoneAdjustTab,
  body.phone-tab-layout.non-admin-ledger #phoneSettingTab { display: none !important; }

  body.phone-tab-layout .phone-tab-panels {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
    display: block !important;
  }
  body.phone-tab-layout .phone-tab-panels > [aria-hidden="true"] { display: none !important; }
  body.phone-tab-layout .phone-tab-panels > [aria-hidden="false"] {
    box-sizing: border-box !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
  }
  body.phone-tab-layout #phoneChartPanel[aria-hidden="false"] {
    display: flex !important;
    flex-direction: column !important;
    padding: 3px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout #phoneChartPanel .candle-title-row {
    flex: 0 0 auto !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 1px 2px !important;
    flex-direction: row !important;
    align-items: center !important;
  }
  body.phone-tab-layout #phoneChartPanel .eyebrow { font-size: 11px !important; }
  body.phone-tab-layout #phoneChartPanel .candle-toolbar {
    display: grid !important;
    grid-template-columns: minmax(105px, 1fr) auto auto !important;
    align-items: center !important;
    gap: 3px !important;
    width: 100% !important;
  }
  body.phone-tab-layout #phoneChartPanel .horizon-inline span { display: none !important; }
  body.phone-tab-layout #horizonSelect { min-height: 29px !important; height: 29px !important; font-size: 12px !important; }
  body.phone-tab-layout #candleCountdown { font-size: 9px !important; white-space: nowrap !important; }
  body.phone-tab-layout #refreshBtn { min-height: 29px !important; height: 29px !important; padding: 2px 8px !important; font-size: 11px !important; }
  body.phone-tab-layout #tvChart,
  body.phone-tab-layout .canvas-fallback {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 120px !important;
    max-height: none !important;
  }
  body.phone-tab-layout .chart-hover-info { display: none !important; }

  body.phone-tab-layout #phoneHistoryPanel[aria-hidden="false"] {
    display: flex !important;
    flex-direction: column !important;
    padding: 4px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout #phoneHistoryPanel .ledger-header { flex: 0 0 auto !important; }
  body.phone-tab-layout #phoneHistoryPanel #ledgerTableWrap { flex: 1 1 auto !important; min-height: 0 !important; max-height: none !important; }
  body.phone-tab-layout .phone-auto-panel[aria-hidden="false"] { display: block !important; overflow: auto !important; scrollbar-width: none !important; }
  body.phone-tab-layout .phone-auto-panel[aria-hidden="false"]::-webkit-scrollbar { display: none !important; }

  /* Readable phone ledger fonts without increasing approved widths. */
  html body.phone-tab-layout #ledgerTable th { font-size: 11.8px !important; padding: 4px 3px !important; }
  html body.phone-tab-layout #ledgerTable td { font-size: 12.6px !important; padding: 4px 3px !important; }
  html body.phone-tab-layout #ledgerTable .ledger-stack-line b { font-size: 9.2px !important; min-width: 27px !important; }
  html body.phone-tab-layout #ledgerTable .ledger-stack-line em,
  html body.phone-tab-layout #ledgerTable .risk-value-stack span { font-size: 11.3px !important; }

  .dpx-info-dialog { width: min(94vw, 620px) !important; padding: 16px !important; }
  .dpx-info-title { font-size: 24px !important; }
  .dpx-info-body { font-size: 18px !important; }
  .dpx-info-actions button { min-height: 44px !important; font-size: 15px !important; }
  .dpx-users-layout { grid-template-columns: 1fr !important; }
  .dpx-users-list { max-height: 28dvh !important; }
}

@media (max-width: 410px) {
  body.phone-tab-layout .prediction-mobile-row {
    grid-template-columns: minmax(108px, 1.16fr) minmax(58px, .62fr) minmax(43px, .46fr) minmax(42px, .45fr) minmax(51px, .54fr) !important;
  }
  body.phone-tab-layout .prediction-mobile-row .pred-side { font-size: 16px !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-minute,
  body.phone-tab-layout .prediction-mobile-row .pred-conf,
  body.phone-tab-layout .prediction-mobile-row > span em,
  body.phone-tab-layout .prediction-countdown-value { font-size: 10px !important; }
}

/* Final Settle visibility: open-manual rows gain seven pixels; the page still fits. */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  body.phone-tab-layout .prediction-mobile-row.has-open-manual {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
  }
  body.phone-tab-layout .prediction-mobile-row.has-open-manual .prediction-mobile-action-stack {
    grid-template-rows: minmax(29px, 1fr) 14px !important;
  }
}

/* ========================================================================== 
   DPX v0.5.1 SAME-NAME PATCH 13-17 — phone Settle, fee-aware manual layout,
   full landscape fit, compact account header and complete ledger text.
   ========================================================================== */

/* Remove hidden spacing from the historical table and keep every declared
   width deterministic so the first scrolling column begins immediately after
   Entry/Exit. */
#ledgerTable {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
}
#ledgerTable th,
#ledgerTable td {
  box-sizing: border-box !important;
  margin: 0 !important;
}
#ledgerTable .ledger-col-tradeCount { width: 78px !important; min-width: 78px !important; max-width: 78px !important; }
#ledgerTable .ledger-col-side { width: 46px !important; min-width: 46px !important; max-width: 46px !important; }
#ledgerTable .ledger-col-entryExit,
#ledgerTable .entry-exit-cell { width: 108px !important; min-width: 108px !important; max-width: 108px !important; }
#ledgerTable .ledger-col-origAdjSl,
#ledgerTable .orig-adj-sl-cell,
#ledgerTable .ledger-col-stopLoss,
#ledgerTable .stop-loss-cell { width: 120px !important; min-width: 120px !important; max-width: 120px !important; }
#ledgerTable .ledger-col-origAdjTarget,
#ledgerTable .orig-adj-target-cell,
#ledgerTable .ledger-col-targetExit,
#ledgerTable .target-exit-cell { width: 124px !important; min-width: 124px !important; max-width: 124px !important; }
/* The date/time value is 19 characters including AM/PM. This is the only
   column intentionally widened by this patch. */
#ledgerTable .ledger-col-createdSettled,
#ledgerTable .created-settled-cell { width: 158px !important; min-width: 158px !important; max-width: 158px !important; }
#ledgerTable .ledger-col-duration { width: 72px !important; min-width: 72px !important; max-width: 72px !important; }
#ledgerTable .ledger-col-pnl { width: 76px !important; min-width: 76px !important; max-width: 76px !important; }
#ledgerTable .ledger-col-closeReason,
#ledgerTable .reason-cell { width: 146px !important; min-width: 146px !important; max-width: 146px !important; }
#ledgerTable .ledger-col-stake { width: 72px !important; min-width: 72px !important; max-width: 72px !important; }
#ledgerTable .ledger-col-symbol { width: 86px !important; min-width: 86px !important; max-width: 86px !important; }
#ledgerTable th[class*="ledger-col-pred"],
#ledgerTable td.prediction-combined-cell { width: 94px !important; min-width: 94px !important; max-width: 94px !important; }
#ledgerTable .created-settled-cell .ledger-stack-line em {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

/* Phone account row: name, shortened ID, caret and balance always share one
   aligned row. */
body.phone-tab-layout .session-bar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 4px !important;
  overflow: visible !important;
}
body.phone-tab-layout .session-account-slot,
body.phone-tab-layout .session-account-slot .account-bar,
body.phone-tab-layout .session-account-slot .account-menu-wrap {
  min-width: 0 !important;
  width: 100% !important;
}
body.phone-tab-layout #accountMenuBtn {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 4px !important;
  overflow: hidden !important;
}
body.phone-tab-layout #accountMenuBtn > span:nth-child(2) {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
body.phone-tab-layout .session-balance-slot,
body.phone-tab-layout .session-balance-slot .balance-row {
  min-width: max-content !important;
  width: max-content !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

/* Four phone parameters remain on one baseline with narrow, balanced inputs. */
body.phone-tab-layout .prediction-order-row {
  grid-template-columns: minmax(56px, 1.05fr) minmax(44px, .75fr) minmax(44px, .75fr) minmax(54px, .92fr) !important;
  align-items: end !important;
  column-gap: 2px !important;
}
body.phone-tab-layout .prediction-order-row > div {
  min-width: 0 !important;
  align-self: end !important;
}
body.phone-tab-layout .prediction-order-row input,
body.phone-tab-layout .prediction-order-row select {
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body.phone-tab-layout .prediction-order-row .field-label {
  white-space: nowrap !important;
  text-overflow: clip !important;
}

/* Settle is a compact button immediately LEFT of the matching prediction.
   Only the row with an open manual trade gives up prediction-button width. */
body.phone-tab-layout .prediction-mobile-action-stack {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 1fr !important;
  align-items: stretch !important;
  gap: 2px !important;
  min-width: 0 !important;
  height: 100% !important;
}
body.phone-tab-layout .prediction-mobile-row.has-open-manual .prediction-mobile-action-stack {
  grid-template-columns: 34px minmax(0, 1fr) !important;
  grid-template-rows: 1fr !important;
}
body.phone-tab-layout .prediction-mobile-action-stack .mobile-settle {
  grid-column: 1 !important;
  grid-row: 1 !important;
  position: static !important;
  box-sizing: border-box !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 100% !important;
  min-height: 28px !important;
  padding: 1px 2px !important;
  border-radius: 4px !important;
  font-size: 7.8px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  writing-mode: horizontal-tb !important;
  color: #fff !important;
  background: linear-gradient(180deg, #61788e 0%, #34495e 100%) !important;
  touch-action: manipulation !important;
  cursor: pointer !important;
  z-index: 4 !important;
}
body.phone-tab-layout .prediction-mobile-row.has-open-manual .prediction-action-cell {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  width: 100% !important;
}
body.phone-tab-layout .prediction-mobile-row:not(.has-open-manual) .prediction-action-cell {
  grid-column: 1 !important;
  width: 100% !important;
}
body.phone-tab-layout .prediction-mobile-row.has-open-manual {
  height: 39px !important;
  min-height: 39px !important;
  max-height: 39px !important;
}

/* Phone ledger remains compact, but all values are readable and the Created /
   Settled values are never clipped. */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  body.phone-tab-layout #ledgerTable .ledger-col-tradeCount { width: 74px !important; min-width: 74px !important; max-width: 74px !important; }
  body.phone-tab-layout #ledgerTable .ledger-col-side { width: 44px !important; min-width: 44px !important; max-width: 44px !important; }
  body.phone-tab-layout #ledgerTable .ledger-col-entryExit,
  body.phone-tab-layout #ledgerTable .entry-exit-cell { width: 104px !important; min-width: 104px !important; max-width: 104px !important; }
  body.phone-tab-layout #ledgerTable .ledger-col-stopLoss,
  body.phone-tab-layout #ledgerTable .stop-loss-cell,
  body.phone-tab-layout #ledgerTable .ledger-col-origAdjSl,
  body.phone-tab-layout #ledgerTable .orig-adj-sl-cell { width: 116px !important; min-width: 116px !important; max-width: 116px !important; }
  body.phone-tab-layout #ledgerTable .ledger-col-targetExit,
  body.phone-tab-layout #ledgerTable .target-exit-cell,
  body.phone-tab-layout #ledgerTable .ledger-col-origAdjTarget,
  body.phone-tab-layout #ledgerTable .orig-adj-target-cell { width: 120px !important; min-width: 120px !important; max-width: 120px !important; }
  body.phone-tab-layout #ledgerTable .ledger-col-createdSettled,
  body.phone-tab-layout #ledgerTable .created-settled-cell { width: 154px !important; min-width: 154px !important; max-width: 154px !important; }
}

/* Phone landscape previously received the phone DOM layout but not the compact
   phone CSS because its width exceeds 760px. Apply a dedicated, full-viewport
   landscape shell for 844x390 / 932x430 and similar devices. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html, body {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout {
    width: 100vw !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .app-shell {
    box-sizing: border-box !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 2px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .hero {
    flex: 0 0 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 2px 6px !important;
    grid-template-columns: minmax(120px, 1fr) auto auto !important;
    grid-template-areas: "brand status price" !important;
    align-items: center !important;
    gap: 5px !important;
  }
  body.phone-tab-layout .brand-block { grid-area: brand !important; }
  body.phone-tab-layout .brand-block h1 { font-size: 23px !important; line-height: 1 !important; }
  body.phone-tab-layout .app-version { font-size: 9px !important; }
  body.phone-tab-layout .hero .status-box {
    grid-area: status !important;
    width: auto !important;
    min-width: 150px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 2px 6px !important;
    justify-self: end !important;
  }
  body.phone-tab-layout .status-box strong { font-size: 10px !important; }
  body.phone-tab-layout .status-box small { display: none !important; }
  body.phone-tab-layout .hero-market-slot {
    grid-area: price !important;
    min-width: 138px !important;
    justify-self: end !important;
  }
  body.phone-tab-layout .hero .market-price-panel {
    min-width: 138px !important;
    width: 138px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 1px 5px !important;
  }
  body.phone-tab-layout #livePrice { font-size: 18px !important; }
  body.phone-tab-layout .session-bar {
    flex: 0 0 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding: 1px 5px !important;
  }
  body.phone-tab-layout #accountMenuBtn {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    font-size: 10.5px !important;
    padding: 1px 5px !important;
  }
  body.phone-tab-layout .balance-row { font-size: 10px !important; }
  body.phone-tab-layout .demo-layout {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  body.phone-tab-layout .trade-card {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 2px 4px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .trade-heading {
    min-height: 25px !important;
    max-height: 25px !important;
    margin: 0 !important;
  }
  body.phone-tab-layout .trade-market-row {
    min-height: 27px !important;
    max-height: 27px !important;
    margin: 0 !important;
  }
  body.phone-tab-layout .trade-symbol-control .field-label { display: none !important; }
  body.phone-tab-layout #symbolSelect { height: 25px !important; min-height: 25px !important; font-size: 10px !important; }
  body.phone-tab-layout .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: 250px minmax(0, 1fr) !important;
    grid-template-areas: "parameters predictions" "execution predictions" !important;
    gap: 2px 4px !important;
    padding: 1px 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .prediction-order-row {
    grid-area: parameters !important;
    grid-template-columns: minmax(58px,1.05fr) minmax(44px,.75fr) minmax(44px,.75fr) minmax(54px,.92fr) !important;
    gap: 2px !important;
  }
  body.phone-tab-layout .prediction-order-row > div { grid-template-rows: 8px 23px !important; }
  body.phone-tab-layout .prediction-order-row .field-label { height: 8px !important; font-size: 6.5px !important; }
  body.phone-tab-layout .prediction-order-row input,
  body.phone-tab-layout .prediction-order-row select { height: 23px !important; min-height: 23px !important; font-size: 9px !important; }
  body.phone-tab-layout .phone-auto-execution-slot {
    grid-area: execution !important;
    height: 29px !important;
    min-height: 29px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot .chart-auto-execution-panel,
  body.phone-tab-layout .phone-auto-execution-slot .auto-output-box {
    height: 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    margin: 0 !important;
    padding: 2px 4px !important;
    overflow: hidden !important;
    font-size: 7px !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot .log-panel-header { display: none !important; }
  body.phone-tab-layout .prediction-panel { grid-area: predictions !important; padding: 0 !important; overflow: hidden !important; }
  body.phone-tab-layout .prediction-mobile-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2px !important;
  }
  body.phone-tab-layout .prediction-mobile-row {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    grid-template-columns: minmax(112px,1.2fr) minmax(58px,.62fr) minmax(43px,.46fr) minmax(40px,.42fr) minmax(50px,.52fr) !important;
    gap: 1px !important;
    padding: 1px !important;
  }
  body.phone-tab-layout .prediction-mobile-row.has-open-manual { height: 34px !important; min-height: 34px !important; max-height: 34px !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-side { font-size: 14px !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-minute,
  body.phone-tab-layout .prediction-mobile-row .pred-conf,
  body.phone-tab-layout .prediction-mobile-row > span em,
  body.phone-tab-layout .prediction-countdown-value { font-size: 9px !important; }
  body.phone-tab-layout .prediction-mobile-row > span b { font-size: 6.5px !important; }
  body.phone-tab-layout .phone-bottom-tabs {
    flex: 0 0 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    margin: 1px 0 0 !important;
  }
  body.phone-tab-layout .phone-bottom-tab { min-height: 27px !important; max-height: 27px !important; padding: 1px 5px !important; font-size: 10px !important; }
  body.phone-tab-layout .phone-tab-panels {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .phone-tab-panels > [aria-hidden="false"] {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout #phoneHistoryPanel[aria-hidden="false"] { display: flex !important; flex-direction: column !important; padding: 3px !important; }
  body.phone-tab-layout #phoneHistoryPanel #ledgerTableWrap { flex: 1 1 auto !important; min-height: 0 !important; }
  body.phone-tab-layout #phoneChartPanel[aria-hidden="false"] { display: flex !important; flex-direction: column !important; padding: 3px !important; }
  body.phone-tab-layout #phoneChartPanel .candle-title-row { min-height: 29px !important; margin: 0 !important; }
  body.phone-tab-layout #tvChart,
  body.phone-tab-layout .canvas-fallback { flex: 1 1 auto !important; min-height: 80px !important; height: auto !important; }
}

/* Final phone alignment refinement: all four parameter controls use one
   identical label/input grid, and the shortened prediction button keeps side,
   horizon and confidence readable beside Settle. */
body.phone-tab-layout .prediction-order-row {
  height: 41px !important;
  min-height: 41px !important;
  max-height: 41px !important;
  align-items: stretch !important;
}
body.phone-tab-layout .prediction-order-row > div {
  height: 41px !important;
  min-height: 41px !important;
  max-height: 41px !important;
  display: grid !important;
  grid-template-rows: 12px 29px !important;
  align-items: stretch !important;
}
body.phone-tab-layout .prediction-order-row .field-label {
  box-sizing: border-box !important;
  height: 12px !important;
  min-height: 12px !important;
  max-height: 12px !important;
  line-height: 12px !important;
  margin: 0 !important;
  overflow: hidden !important;
}
body.phone-tab-layout .prediction-order-row input,
body.phone-tab-layout .prediction-order-row select,
body.phone-tab-layout #presetPercentSelect {
  height: 29px !important;
  min-height: 29px !important;
  max-height: 29px !important;
  align-self: stretch !important;
}
body.phone-tab-layout .prediction-mobile-row.has-open-manual .prediction-action-cell {
  grid-template-columns: minmax(36px, 1fr) 22px 25px !important;
  padding-left: 3px !important;
  padding-right: 3px !important;
  column-gap: 1px !important;
}
body.phone-tab-layout .prediction-mobile-row.has-open-manual .pred-side { font-size: 14px !important; }
body.phone-tab-layout .prediction-mobile-row.has-open-manual .pred-minute,
body.phone-tab-layout .prediction-mobile-row.has-open-manual .pred-conf { font-size: 9px !important; }

/* Landscape phone must override the older desktop/tablet grid rules that also
   match widths above 760px. Keep the phone trade card in normal document flow
   so the tabs and selected lower panel remain inside the viewport. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout .demo-layout,
  body.phone-tab-layout .demo-layout .trade-card {
    display: block !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
  }
  body.phone-tab-layout .demo-layout .trade-card {
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .trade-heading,
  body.phone-tab-layout .trade-market-row,
  body.phone-tab-layout .prediction-workbench {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }
  body.phone-tab-layout .trade-heading {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  body.phone-tab-layout .trade-market-row {
    display: block !important;
  }
  body.phone-tab-layout .prediction-workbench {
    min-height: 0 !important;
    max-height: 112px !important;
  }
}

/* Final orientation pass. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout .desktop-bottom-tabs,
  body.phone-tab-layout .desktop-tab-panels {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .prediction-mobile-row {
    grid-template-columns: minmax(100px,1.12fr) minmax(50px,.56fr) minmax(36px,.40fr) minmax(34px,.38fr) minmax(42px,.46fr) !important;
  }
  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell {
    grid-template-columns: minmax(38px,1fr) 21px 24px !important;
    padding-inline: 3px !important;
  }
  body.phone-tab-layout .prediction-mobile-row .pred-side { font-size: 13px !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-minute,
  body.phone-tab-layout .prediction-mobile-row .pred-conf,
  body.phone-tab-layout .prediction-mobile-row > span em,
  body.phone-tab-layout .prediction-countdown-value { font-size: 8.3px !important; }
  body.phone-tab-layout .prediction-mobile-row > span b { font-size: 5.8px !important; }
}

/* Tablet landscape: retain the approved two-panel workspace, but compact the
   upper cards enough that Historical Orders / Auto Trade Setup remain visible
   in the same 768-820px viewport. */
@media (min-width: 761px) and (max-width: 1200px) and (orientation: landscape) {
  .app-shell {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100dvh !important;
    padding: 5px 7px 7px !important;
    gap: 3px !important;
  }
  .hero {
    min-height: 68px !important;
    max-height: 68px !important;
    height: 68px !important;
    padding: 6px 10px !important;
    grid-template-columns: minmax(220px,1fr) 250px 245px !important;
  }
  .hero h1 { font-size: 32px !important; }
  .hero .status-box,
  .hero .market-price-panel { min-height: 42px !important; height: 42px !important; }
  .hero #livePrice { font-size: 22px !important; }
  .session-bar {
    min-height: 38px !important;
    max-height: 38px !important;
    height: 38px !important;
    padding: 3px 9px !important;
  }
  #accountMenuBtn { min-height: 30px !important; height: 30px !important; padding: 4px 8px !important; font-size: 12px !important; }
  .session-balance-slot .balance-row { font-size: 13px !important; }
  .demo-layout {
    height: 318px !important;
    min-height: 318px !important;
    max-height: 318px !important;
    align-items: stretch !important;
  }
  .demo-layout .market-card,
  .demo-layout .trade-card {
    box-sizing: border-box !important;
    height: 318px !important;
    min-height: 318px !important;
    max-height: 318px !important;
    padding: 5px !important;
    overflow: hidden !important;
  }
  .market-card .candle-title-row { min-height: 28px !important; height: 28px !important; }
  .market-card .tv-chart,
  .market-card .canvas-fallback { height: 198px !important; min-height: 198px !important; max-height: 198px !important; }
  .chart-auto-execution-panel { height: 72px !important; min-height: 72px !important; max-height: 72px !important; }
  .chart-auto-execution-panel .auto-output-box { min-height: 40px !important; max-height: 40px !important; }
  .trade-card .trade-heading { min-height: 30px !important; height: 30px !important; margin-bottom: 2px !important; }
  .trade-card .trade-market-row { min-height: 28px !important; height: 28px !important; margin-bottom: 2px !important; }
  .trade-card #symbolSelect { min-height: 28px !important; height: 28px !important; }
  .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: 126px minmax(0,1fr) !important;
    grid-template-areas: "parameters predictions" !important;
    align-items: start !important;
    gap: 4px !important;
    height: 244px !important;
    min-height: 244px !important;
    max-height: 244px !important;
    overflow: hidden !important;
  }
  .trade-card .prediction-order-row {
    grid-area: parameters !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(4, 48px) !important;
    gap: 3px !important;
    align-content: start !important;
  }
  .trade-card .prediction-order-row > div {
    display: grid !important;
    grid-template-rows: 13px 35px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
  }
  .trade-card .prediction-order-row .field-label { height: 13px !important; line-height: 13px !important; font-size: 8px !important; }
  .trade-card .prediction-order-row input,
  .trade-card .prediction-order-row select { height: 35px !important; min-height: 35px !important; max-height: 35px !important; font-size: 11px !important; }
  .trade-card .prediction-panel {
    grid-area: predictions !important;
    min-width: 0 !important;
    height: 244px !important;
    max-height: 244px !important;
    overflow: hidden !important;
    padding: 2px !important;
  }
  .trade-card .prediction-table-layout {
    grid-template-columns: minmax(154px,1.2fr) minmax(78px,.60fr) minmax(48px,.38fr) minmax(45px,.36fr) minmax(58px,.44fr) !important;
    column-gap: 3px !important;
    row-gap: 2px !important;
  }
  .trade-card .prediction-action-cell { min-height: 31px !important; height: 31px !important; }
  .trade-card .prediction-info-cell { min-height: 31px !important; height: 31px !important; font-size: 9.5px !important; }
  .desktop-bottom-tabs {
    display: block !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
  }
  .desktop-bottom-tab { min-height: 32px !important; height: 32px !important; padding: 5px 10px !important; font-size: 12px !important; }
  .desktop-tab-panels {
    display: block !important;
    height: 245px !important;
    min-height: 245px !important;
    max-height: 245px !important;
    overflow: hidden !important;
  }
  .desktop-tab-panels .ledger-card,
  .desktop-tab-panels .auto-trading-card {
    height: 245px !important;
    min-height: 245px !important;
    max-height: 245px !important;
  }
  .desktop-tab-panels .table-wrap { max-height: 195px !important; }
}

/* Final phone-landscape fit: the inherited desktop demo height left an empty
   block below the compact trade card and pushed the tabs out of view. Match the
   demo container to the real compact card, then use the remaining viewport for
   the selected lower tab. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout .demo-layout {
    height: 204px !important;
    min-height: 204px !important;
    max-height: 204px !important;
    flex: 0 0 204px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .demo-layout .trade-card {
    height: 204px !important;
    min-height: 204px !important;
    max-height: 204px !important;
  }
  body.phone-tab-layout .phone-bottom-tabs {
    display: flex !important;
    visibility: visible !important;
    flex: 0 0 29px !important;
  }
  body.phone-tab-layout .phone-tab-panels {
    display: block !important;
    visibility: visible !important;
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 58px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .phone-tab-panels > [aria-hidden="false"] {
    height: 100% !important;
    min-height: 58px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout #phoneChartPanel .candle-title-row {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
  }
  body.phone-tab-layout #phoneChartPanel #tvChart,
  body.phone-tab-layout #phoneChartPanel .canvas-fallback {
    min-height: 34px !important;
  }
}

/* ========================================================================== 
   DPX v0.5.1 SAME-NAME NEXT PATCH — exact PC ledger widths, full phone ID,
   one-column phone landscape, viewport-fit phone tabs, and laptop-style tablets.
   ========================================================================== */

/* Scrollbar tracks stay invisible while wheel, touch, trackpad, keyboard and
   programmatic horizontal scrolling remain available. */
#ledgerTableWrap,
#ledgerTableWrap.no-h-scroll,
.desktop-tab-panels .table-wrap,
.phone-tab-panels .table-wrap {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
#ledgerTableWrap::-webkit-scrollbar,
#ledgerTableWrap.no-h-scroll::-webkit-scrollbar,
.desktop-tab-panels .table-wrap::-webkit-scrollbar,
.phone-tab-panels .table-wrap::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/* Desktop/laptop Market Price: no unused left space. Live market status remains
   a separate panel immediately to its left; Market Price stays flush right. */
@media (min-width: 1201px) {
  .hero {
    grid-template-columns: minmax(320px, 1fr) max-content max-content !important;
    grid-template-areas: "brand status price" !important;
    align-items: center !important;
    column-gap: 10px !important;
  }
  .hero .brand-block { grid-area: brand !important; }
  .hero .status-box {
    grid-area: status !important;
    width: max-content !important;
    min-width: 230px !important;
    max-width: 280px !important;
    justify-self: end !important;
  }
  .hero .hero-market-slot {
    grid-area: price !important;
    min-width: 0 !important;
    width: max-content !important;
    margin: 0 !important;
    justify-self: end !important;
  }
  .hero .hero-market-slot .market-price-panel {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: max-content max-content !important;
    align-items: center !important;
    justify-content: end !important;
    gap: 10px !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 50px !important;
    min-height: 50px !important;
    padding: 7px 10px 7px 12px !important;
  }
  .hero .hero-market-slot .market-price-label {
    display: inline !important;
    white-space: nowrap !important;
  }
  .hero .hero-market-slot #livePrice {
    justify-self: end !important;
    text-align: right !important;
    white-space: nowrap !important;
    margin: 0 !important;
  }
}

/* Administrator Historical Orders on desktop/laptop: preserve natural column
   widths instead of squeezing 17 columns into the viewport. */
@media (min-width: 1201px) {
  body.user-admin:not(.phone-tab-layout) #ledgerTable,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable {
    width: 2510px !important;
    min-width: 2510px !important;
    max-width: none !important;
    table-layout: fixed !important;
  }
  body.user-admin:not(.phone-tab-layout) #ledgerTable th,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable th {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    vertical-align: middle !important;
  }
  body.user-admin:not(.phone-tab-layout) #ledgerTable td,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable td {
    overflow: visible !important;
    text-overflow: clip !important;
    vertical-align: top !important;
  }
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-tradeCount,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-tradeCount { width: 94px !important; min-width: 94px !important; max-width: 94px !important; }
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-side,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-side { width: 68px !important; min-width: 68px !important; max-width: 68px !important; }
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-entryExit,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .entry-exit-cell,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-entryExit,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .entry-exit-cell { width: 166px !important; min-width: 166px !important; max-width: 166px !important; }
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-origAdjSl,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .orig-adj-sl-cell,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-origAdjSl,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .orig-adj-sl-cell { width: 232px !important; min-width: 232px !important; max-width: 232px !important; }
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-origAdjTarget,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .orig-adj-target-cell,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-origAdjTarget,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .orig-adj-target-cell { width: 246px !important; min-width: 246px !important; max-width: 246px !important; }
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-createdSettled,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .created-settled-cell,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-createdSettled,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .created-settled-cell { width: 220px !important; min-width: 220px !important; max-width: 220px !important; }
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-duration,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-duration { width: 104px !important; min-width: 104px !important; max-width: 104px !important; }
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-pnl,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-pnl { width: 112px !important; min-width: 112px !important; max-width: 112px !important; }
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-closeReason,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .reason-cell,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-closeReason,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .reason-cell { width: 230px !important; min-width: 230px !important; max-width: 230px !important; white-space: normal !important; overflow-wrap: anywhere !important; }
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-stake,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-stake { width: 104px !important; min-width: 104px !important; max-width: 104px !important; }
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-symbol,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-symbol { width: 108px !important; min-width: 108px !important; max-width: 108px !important; }
  body.user-admin:not(.phone-tab-layout) #ledgerTable th[class*="ledger-col-pred"],
  body.user-admin:not(.phone-tab-layout) #ledgerTable td.prediction-combined-cell,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable th[class*="ledger-col-pred"],
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable td.prediction-combined-cell { width: 138px !important; min-width: 138px !important; max-width: 138px !important; }
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-stack-line em,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .risk-value-stack span,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-stack-line em,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .risk-value-stack span {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
}

/* Full account identity on phones. Remove the old ellipsis rule and use the
   available row width efficiently while keeping Balance on the same line. */
body.phone-tab-layout .session-bar {
  grid-template-columns: minmax(0, 1fr) max-content !important;
  gap: 2px !important;
  padding-left: 2px !important;
  padding-right: 3px !important;
}
body.phone-tab-layout .session-account-slot,
body.phone-tab-layout .session-account-slot .account-bar,
body.phone-tab-layout .session-account-slot .account-menu-wrap {
  min-width: 0 !important;
  width: 100% !important;
  margin-left: 0 !important;
}
body.phone-tab-layout #accountMenuBtn {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: 20px minmax(0, 1fr) 10px !important;
  gap: 2px !important;
  padding-left: 1px !important;
  padding-right: 1px !important;
  overflow: visible !important;
}
body.phone-tab-layout #accountMenuBtn > span:nth-child(2) {
  min-width: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  letter-spacing: -0.02em !important;
}
body.phone-tab-layout .session-balance-slot,
body.phone-tab-layout .session-balance-slot .balance-row {
  min-width: max-content !important;
  width: max-content !important;
  margin: 0 !important;
  white-space: nowrap !important;
}
@media (max-width: 430px) and (orientation: portrait) {
  body.phone-tab-layout #accountMenuBtn { font-size: 9.2px !important; }
  body.phone-tab-layout #accountMenuBtn .avatar-dot { font-size: 15px !important; }
  body.phone-tab-layout .session-balance-slot .balance-row { font-size: 9.2px !important; }
}
@media (min-width: 431px) and (max-width: 600px) and (orientation: portrait) {
  body.phone-tab-layout #accountMenuBtn { font-size: 10px !important; }
  body.phone-tab-layout .session-balance-slot .balance-row { font-size: 10px !important; }
}

/* All phone pages stay inside one viewport. Historical and Trend consume only
   the flexible lower-panel space; the page itself never scrolls. */
body.phone-tab-layout,
body.phone-tab-layout .app-shell {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}
body.phone-tab-layout .app-shell {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}
body.phone-tab-layout .phone-tab-panels {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
body.phone-tab-layout .phone-tab-panels > [aria-hidden="false"] {
  box-sizing: border-box !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow: hidden !important;
}
body.phone-tab-layout #phoneHistoryPanel[aria-hidden="false"],
body.phone-tab-layout #phoneChartPanel[aria-hidden="false"] {
  display: flex !important;
  flex-direction: column !important;
}
body.phone-tab-layout #phoneHistoryPanel #ledgerTableWrap {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}
body.phone-tab-layout #phoneChartPanel .tv-chart,
body.phone-tab-layout #phoneChartPanel .canvas-fallback {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

/* Phone landscape: one readable prediction column, full-width trade area, and
   enough lower-panel space for Historical or Trend at 844x390 and 932x430. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html, body { width: 100% !important; height: 100% !important; overflow: hidden !important; }
  body.phone-tab-layout .app-shell { padding: 1px 2px !important; gap: 1px !important; }
  body.phone-tab-layout .hero {
    flex: 0 0 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 1px 5px !important;
    grid-template-columns: minmax(120px, 1fr) max-content max-content !important;
    grid-template-areas: "brand status price" !important;
    gap: 4px !important;
  }
  body.phone-tab-layout .brand-block h1 { font-size: 21px !important; }
  body.phone-tab-layout .hero .status-box {
    min-width: 130px !important;
    width: max-content !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 1px 5px !important;
  }
  body.phone-tab-layout .hero-market-slot { min-width: 0 !important; width: max-content !important; }
  body.phone-tab-layout .hero .market-price-panel {
    width: max-content !important;
    min-width: 122px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 1px 5px !important;
  }
  body.phone-tab-layout #livePrice { font-size: 16px !important; }
  body.phone-tab-layout .session-bar {
    flex: 0 0 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  body.phone-tab-layout #accountMenuBtn {
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    font-size: 10px !important;
  }
  body.phone-tab-layout .session-balance-slot .balance-row { font-size: 9.5px !important; }
  body.phone-tab-layout .demo-layout {
    flex: 0 0 190px !important;
    height: 190px !important;
    min-height: 190px !important;
    max-height: 190px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .demo-layout .trade-card {
    box-sizing: border-box !important;
    height: 190px !important;
    min-height: 190px !important;
    max-height: 190px !important;
    padding: 2px 4px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .trade-heading {
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    margin: 0 !important;
  }
  body.phone-tab-layout .trade-title-status,
  body.phone-tab-layout .trade-heading { min-width: 0 !important; }
  body.phone-tab-layout .trade-market-row {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    margin: 0 !important;
  }
  body.phone-tab-layout #symbolSelect {
    height: 23px !important;
    min-height: 23px !important;
    max-height: 23px !important;
    font-size: 9px !important;
  }
  body.phone-tab-layout .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: 220px minmax(0, 1fr) !important;
    grid-template-areas: "parameters predictions" "execution predictions" !important;
    grid-template-rows: 39px 91px !important;
    gap: 2px 4px !important;
    height: 132px !important;
    min-height: 132px !important;
    max-height: 132px !important;
    padding: 1px 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .prediction-order-row {
    grid-area: parameters !important;
    height: 39px !important;
    min-height: 39px !important;
    max-height: 39px !important;
    grid-template-columns: minmax(55px,1fr) minmax(42px,.72fr) minmax(42px,.72fr) minmax(52px,.9fr) !important;
    gap: 2px !important;
  }
  body.phone-tab-layout .prediction-order-row > div {
    height: 39px !important;
    min-height: 39px !important;
    max-height: 39px !important;
    grid-template-rows: 10px 29px !important;
  }
  body.phone-tab-layout .prediction-order-row .field-label { height: 10px !important; line-height: 10px !important; font-size: 6.2px !important; }
  body.phone-tab-layout .prediction-order-row input,
  body.phone-tab-layout .prediction-order-row select,
  body.phone-tab-layout #presetPercentSelect { height: 29px !important; min-height: 29px !important; max-height: 29px !important; font-size: 8.5px !important; }
  body.phone-tab-layout .phone-auto-execution-slot {
    grid-area: execution !important;
    height: 91px !important;
    min-height: 91px !important;
    max-height: 91px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot .chart-auto-execution-panel {
    height: 91px !important;
    min-height: 91px !important;
    max-height: 91px !important;
    margin: 0 !important;
    padding: 3px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot .log-panel-header {
    display: flex !important;
    min-height: 18px !important;
    font-size: 8px !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot .auto-output-box {
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    padding: 2px 3px !important;
    font-size: 7.5px !important;
    overflow-y: auto !important;
  }
  body.phone-tab-layout .prediction-panel {
    grid-area: predictions !important;
    height: 132px !important;
    min-height: 132px !important;
    max-height: 132px !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .prediction-mobile-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: repeat(6, 20px) !important;
    gap: 2px !important;
    height: 132px !important;
    min-height: 132px !important;
    max-height: 132px !important;
  }
  body.phone-tab-layout .prediction-mobile-row,
  body.phone-tab-layout .prediction-mobile-row.has-open-manual {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    grid-template-columns: minmax(126px, 1.35fr) minmax(76px,.78fr) minmax(64px,.66fr) minmax(52px,.54fr) minmax(62px,.62fr) !important;
    gap: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .prediction-mobile-action-stack,
  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell {
    min-height: 19px !important;
    height: 19px !important;
    max-height: 19px !important;
  }
  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell {
    padding: 0 3px !important;
    border-radius: 3px !important;
  }
  body.phone-tab-layout .prediction-mobile-row .pred-side { font-size: 11px !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-minute,
  body.phone-tab-layout .prediction-mobile-row .pred-conf,
  body.phone-tab-layout .prediction-mobile-row > span em,
  body.phone-tab-layout .prediction-countdown-value { font-size: 7.6px !important; }
  body.phone-tab-layout .prediction-mobile-row > span b { font-size: 5.2px !important; line-height: 6px !important; }
  body.phone-tab-layout .prediction-mobile-row > span {
    min-height: 19px !important;
    height: 19px !important;
    max-height: 19px !important;
    padding: 0 2px !important;
    grid-template-rows: 6px 12px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .prediction-mobile-row.has-open-manual .prediction-mobile-action-stack {
    grid-template-columns: 32px minmax(0, 1fr) !important;
  }
  body.phone-tab-layout .prediction-mobile-action-stack .mobile-settle {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 19px !important;
    height: 19px !important;
    font-size: 6.8px !important;
  }
  body.phone-tab-layout .phone-bottom-tabs {
    flex: 0 0 25px !important;
    height: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    margin: 0 !important;
  }
  body.phone-tab-layout .phone-bottom-tab {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding: 1px 4px !important;
    font-size: 9px !important;
  }
  body.phone-tab-layout .phone-tab-panels {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout #phoneHistoryPanel[aria-hidden="false"],
  body.phone-tab-layout #phoneChartPanel[aria-hidden="false"] { padding: 2px !important; }
  body.phone-tab-layout #phoneHistoryPanel .ledger-header {
    min-height: 25px !important;
    max-height: 25px !important;
    margin: 0 !important;
  }
  body.phone-tab-layout #phoneHistoryPanel .daily-pnl-totals,
  body.phone-tab-layout #phoneHistoryPanel .toolbar { font-size: 7px !important; }
  body.phone-tab-layout #phoneChartPanel .candle-title-row {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    margin: 0 !important;
  }
  body.phone-tab-layout #phoneChartPanel .tv-chart,
  body.phone-tab-layout #phoneChartPanel .canvas-fallback { min-height: 38px !important; }
}

/* Tablet portrait and landscape use the approved laptop structure: top header,
   account row, chart left, trading right, execution below chart, and lower tabs. */
@media (min-width: 601px) and (max-width: 1200px) and (min-height: 601px) {
  html, body { width: 100% !important; height: 100% !important; overflow: hidden !important; }
  body.desktop-tab-layout .app-shell {
    box-sizing: border-box !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 5px 7px 7px !important;
    gap: 3px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout .hero {
    flex: 0 0 64px !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    padding: 5px 8px !important;
    display: grid !important;
    grid-template-columns: minmax(190px,1fr) 210px 185px !important;
    grid-template-areas: "brand status price" !important;
    gap: 6px !important;
    align-items: center !important;
  }
  body.desktop-tab-layout .hero .brand-block { grid-area: brand !important; }
  body.desktop-tab-layout .hero .status-box {
    grid-area: status !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 4px 7px !important;
  }
  body.desktop-tab-layout .hero .status-box strong { font-size: 11px !important; }
  body.desktop-tab-layout .hero .status-box small { font-size: 8px !important; }
  body.desktop-tab-layout .hero-market-slot {
    grid-area: price !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  body.desktop-tab-layout .hero-market-slot .market-price-panel {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 4px 7px !important;
  }
  body.desktop-tab-layout .hero #livePrice { font-size: 21px !important; }
  body.desktop-tab-layout .hero h1 { font-size: 30px !important; }
  body.desktop-tab-layout .session-bar {
    flex: 0 0 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 2px 7px !important;
  }
  body.desktop-tab-layout #accountMenuBtn { height: 29px !important; min-height: 29px !important; font-size: 11px !important; }
  body.desktop-tab-layout .session-balance-slot .balance-row { font-size: 12px !important; }
  body.desktop-tab-layout .demo-layout {
    flex: 0 0 var(--dpx-tablet-demo-height, 318px) !important;
    height: var(--dpx-tablet-demo-height, 318px) !important;
    min-height: var(--dpx-tablet-demo-height, 318px) !important;
    max-height: var(--dpx-tablet-demo-height, 318px) !important;
    display: grid !important;
    grid-template-columns: minmax(0, .48fr) minmax(0, .52fr) !important;
    grid-template-rows: 1fr !important;
    gap: 4px !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout .demo-layout .chart-zone {
    display: flex !important;
    flex-direction: column !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  body.desktop-tab-layout .demo-layout .trade-card {
    display: grid !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
  body.desktop-tab-layout .demo-layout .layout-tools { display: none !important; }
  body.desktop-tab-layout .demo-layout .market-card,
  body.desktop-tab-layout .demo-layout .trade-card {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    padding: 5px !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout .market-card .candle-title-row {
    flex: 0 0 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    margin: 0 !important;
  }
  body.desktop-tab-layout .market-card .tv-chart,
  body.desktop-tab-layout .market-card .canvas-fallback {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
  }
  body.desktop-tab-layout .chart-hover-info { display: none !important; }
  body.desktop-tab-layout .chart-auto-execution-panel {
    flex: 0 0 74px !important;
    height: 74px !important;
    min-height: 74px !important;
    max-height: 74px !important;
    margin-top: 3px !important;
    padding: 3px 5px !important;
  }
  body.desktop-tab-layout .chart-auto-execution-panel .auto-output-box {
    min-height: 44px !important;
    max-height: 44px !important;
    overflow-y: auto !important;
    font-size: 8px !important;
  }
  body.desktop-tab-layout .trade-card .trade-heading {
    min-height: 28px !important;
    height: 28px !important;
    max-height: 28px !important;
    margin: 0 !important;
  }
  body.desktop-tab-layout .trade-card .trade-market-row {
    min-height: 27px !important;
    height: 27px !important;
    max-height: 27px !important;
    margin: 0 !important;
  }
  body.desktop-tab-layout .trade-card .trade-symbol-control .field-label { display: none !important; }
  body.desktop-tab-layout .trade-card #symbolSelect { height: 26px !important; min-height: 26px !important; font-size: 9px !important; }
  body.desktop-tab-layout .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: 112px minmax(0,1fr) !important;
    grid-template-areas: "parameters predictions" !important;
    gap: 4px !important;
    min-height: 0 !important;
    height: calc(100% - 59px) !important;
    max-height: calc(100% - 59px) !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout .trade-card .prediction-order-row {
    grid-area: parameters !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(4, minmax(0,1fr)) !important;
    gap: 3px !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout .trade-card .prediction-order-row > div {
    min-height: 0 !important;
    height: auto !important;
    display: grid !important;
    grid-template-rows: 12px minmax(25px,1fr) !important;
  }
  body.desktop-tab-layout .trade-card .prediction-order-row .field-label { height: 12px !important; line-height: 12px !important; font-size: 7px !important; }
  body.desktop-tab-layout .trade-card .prediction-order-row input,
  body.desktop-tab-layout .trade-card .prediction-order-row select { height: 100% !important; min-height: 25px !important; font-size: 9px !important; }
  body.desktop-tab-layout .trade-card .prediction-panel {
    grid-area: predictions !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    padding: 2px !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout .trade-card .prediction-table-layout {
    grid-template-columns: minmax(118px,1.22fr) minmax(68px,.68fr) minmax(45px,.46fr) minmax(43px,.44fr) minmax(52px,.54fr) !important;
    grid-template-rows: 24px repeat(6, minmax(28px,1fr)) !important;
    column-gap: 2px !important;
    row-gap: 2px !important;
    height: 100% !important;
    min-height: 0 !important;
  }
  body.desktop-tab-layout .trade-card .prediction-table-head { min-height: 24px !important; font-size: 8px !important; }
  body.desktop-tab-layout .trade-card .prediction-action-cell,
  body.desktop-tab-layout .trade-card .prediction-info-cell { height: 100% !important; min-height: 28px !important; max-height: none !important; font-size: 8.5px !important; }
  body.desktop-tab-layout .desktop-bottom-tabs {
    display: block !important;
    flex: 0 0 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    margin: 0 !important;
  }
  body.desktop-tab-layout .desktop-bottom-tab { height: 31px !important; min-height: 31px !important; padding: 4px 10px !important; font-size: 11px !important; }
  body.desktop-tab-layout .desktop-tab-panels {
    display: block !important;
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout .desktop-tab-panels > .ledger-card,
  body.desktop-tab-layout .desktop-tab-panels > .auto-trading-card {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout .desktop-tab-panels .ledger-card {
    display: flex !important;
    flex-direction: column !important;
    padding: 4px !important;
  }
  body.desktop-tab-layout .desktop-tab-panels .ledger-header {
    flex: 0 0 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    margin: 0 !important;
  }
  body.desktop-tab-layout .desktop-tab-panels .table-wrap {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
  }
  body.desktop-tab-layout .desktop-tab-panels .auto-trading-card { overflow: auto !important; padding: 6px !important; }
  body.desktop-tab-layout #ledgerTable { min-width: 1810px !important; width: 1810px !important; }
}

@media (min-width: 601px) and (max-width: 900px) and (orientation: portrait) and (min-height: 601px) {
  body.desktop-tab-layout { --dpx-tablet-demo-height: 390px; }
  body.desktop-tab-layout .hero {
    grid-template-columns: minmax(170px,1fr) 195px 170px !important;
  }
  body.desktop-tab-layout .hero h1 { font-size: 27px !important; }
  body.desktop-tab-layout .trade-card .prediction-workbench { grid-template-columns: 104px minmax(0,1fr) !important; }
  body.desktop-tab-layout .trade-card .prediction-table-layout {
    grid-template-columns: minmax(108px,1.18fr) minmax(62px,.66fr) minmax(42px,.44fr) minmax(40px,.42fr) minmax(49px,.50fr) !important;
  }
}

/* Final tablet and phone-landscape corrections after rendered Chromium review. */
@media (min-width: 601px) and (max-width: 1200px) and (min-height: 601px) and (orientation: landscape) {
  body.desktop-tab-layout .trade-card .prediction-table-layout {
    grid-template-rows: 18px repeat(6, 24px) !important;
    row-gap: 1px !important;
    align-content: start !important;
  }
  body.desktop-tab-layout .trade-card .prediction-table-head {
    min-height: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    font-size: 7.5px !important;
  }
  body.desktop-tab-layout .trade-card .prediction-action-cell,
  body.desktop-tab-layout .trade-card .prediction-action-wrap,
  body.desktop-tab-layout .trade-card .prediction-info-cell {
    min-height: 24px !important;
    height: 24px !important;
    max-height: 24px !important;
  }
  body.desktop-tab-layout .trade-card .prediction-action-cell button,
  body.desktop-tab-layout .trade-card .prediction-action-wrap button {
    min-height: 24px !important;
    height: 24px !important;
    max-height: 24px !important;
  }
}

@media (min-width: 601px) and (max-width: 900px) and (orientation: portrait) and (min-height: 601px) {
  body.desktop-tab-layout .market-card .candle-title-row {
    display: grid !important;
    grid-template-columns: max-content minmax(0,1fr) !important;
    gap: 4px !important;
    align-items: center !important;
  }
  body.desktop-tab-layout .market-card .candle-title-row > .eyebrow {
    font-size: 12px !important;
    letter-spacing: .08em !important;
    white-space: nowrap !important;
  }
  body.desktop-tab-layout .market-card .candle-toolbar {
    min-width: 0 !important;
    gap: 3px !important;
    justify-content: end !important;
  }
  body.desktop-tab-layout .market-card .horizon-inline > span { display: none !important; }
  body.desktop-tab-layout .market-card #horizonSelect {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    height: 25px !important;
    min-height: 25px !important;
    padding: 2px 15px 2px 5px !important;
    font-size: 9px !important;
  }
  body.desktop-tab-layout .market-card #candleCountdown {
    font-size: 8px !important;
    white-space: nowrap !important;
  }
  body.desktop-tab-layout .market-card #refreshBtn {
    height: 25px !important;
    min-height: 25px !important;
    padding: 3px 7px !important;
    font-size: 9px !important;
  }

  body.desktop-tab-layout .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    grid-template-rows: 51px minmax(0,1fr) !important;
    grid-template-areas: "parameters" "predictions" !important;
    gap: 3px !important;
    height: calc(100% - 59px) !important;
    min-height: 0 !important;
    max-height: calc(100% - 59px) !important;
  }
  body.desktop-tab-layout .trade-card .prediction-order-row {
    grid-area: parameters !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0,1fr)) !important;
    grid-template-rows: 51px !important;
    gap: 3px !important;
    width: 100% !important;
    height: 51px !important;
    min-height: 51px !important;
    max-height: 51px !important;
    overflow: visible !important;
  }
  body.desktop-tab-layout .trade-card .prediction-order-row > div {
    display: grid !important;
    grid-template-rows: 14px 34px !important;
    height: 51px !important;
    min-height: 51px !important;
    max-height: 51px !important;
    min-width: 0 !important;
  }
  body.desktop-tab-layout .trade-card .prediction-order-row .field-label {
    height: 14px !important;
    line-height: 14px !important;
    font-size: 7.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  body.desktop-tab-layout .trade-card .prediction-order-row input,
  body.desktop-tab-layout .trade-card .prediction-order-row select {
    width: 100% !important;
    min-width: 0 !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    font-size: 10px !important;
  }
  body.desktop-tab-layout .trade-card .prediction-panel {
    grid-area: predictions !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout .trade-card .prediction-table-layout {
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(105px,1.20fr) minmax(62px,.70fr) minmax(42px,.47fr) minmax(40px,.45fr) minmax(49px,.55fr) !important;
    grid-template-rows: 20px repeat(6, minmax(25px,1fr)) !important;
    column-gap: 2px !important;
    row-gap: 1px !important;
  }
  body.desktop-tab-layout .trade-card .prediction-table-head {
    height: 20px !important;
    min-height: 20px !important;
    font-size: 7.5px !important;
  }
  body.desktop-tab-layout .trade-card .prediction-action-cell,
  body.desktop-tab-layout .trade-card .prediction-action-wrap,
  body.desktop-tab-layout .trade-card .prediction-info-cell {
    height: 100% !important;
    min-height: 25px !important;
    font-size: 8px !important;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout .phone-tab-panels {
    box-sizing: border-box !important;
    flex: 1 1 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .phone-tab-panels > [aria-hidden="false"] {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout #phoneHistoryPanel[aria-hidden="false"] {
    display: flex !important;
    flex-direction: column !important;
  }
  body.phone-tab-layout #phoneHistoryPanel .ledger-header {
    flex: 0 0 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
  }
  body.phone-tab-layout #phoneHistoryPanel #ledgerTableWrap {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
  }
  body.phone-tab-layout #phoneChartPanel[aria-hidden="false"] {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* Tablet controls need their grid placement reset because legacy breakpoint
   rules assigned specific columns to individual fields. */
@media (min-width: 601px) and (max-width: 900px) and (orientation: portrait) and (min-height: 601px) {
  body.desktop-tab-layout .trade-card .prediction-order-row > .preset-field,
  body.desktop-tab-layout .trade-card .prediction-order-row > .fee-field,
  body.desktop-tab-layout .trade-card .prediction-order-row > .risk-field,
  body.desktop-tab-layout .trade-card .prediction-order-row > .trades-day-field {
    position: static !important;
    inset: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }
  body.desktop-tab-layout .trade-card .prediction-table-layout {
    grid-template-rows: 16px repeat(6, 23px) !important;
    row-gap: 1px !important;
    align-content: start !important;
  }
  body.desktop-tab-layout .trade-card .prediction-table-head {
    height: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    line-height: 16px !important;
  }
  body.desktop-tab-layout .trade-card .prediction-action-cell,
  body.desktop-tab-layout .trade-card .prediction-action-wrap,
  body.desktop-tab-layout .trade-card .prediction-info-cell,
  body.desktop-tab-layout .trade-card .prediction-action-cell button,
  body.desktop-tab-layout .trade-card .prediction-action-wrap button {
    min-height: 23px !important;
    height: 23px !important;
    max-height: 23px !important;
  }
}

@media (min-width: 901px) and (max-width: 1200px) and (min-height: 601px) and (orientation: landscape) {
  body.desktop-tab-layout .trade-card .prediction-table-layout {
    grid-template-rows: 14px repeat(6, 21px) !important;
    row-gap: 1px !important;
    align-content: start !important;
  }
  body.desktop-tab-layout .trade-card .prediction-table-head {
    min-height: 14px !important;
    height: 14px !important;
    max-height: 14px !important;
    line-height: 14px !important;
  }
  body.desktop-tab-layout .trade-card .prediction-action-cell,
  body.desktop-tab-layout .trade-card .prediction-action-wrap,
  body.desktop-tab-layout .trade-card .prediction-info-cell,
  body.desktop-tab-layout .trade-card .prediction-action-cell button,
  body.desktop-tab-layout .trade-card .prediction-action-wrap button {
    min-height: 21px !important;
    height: 21px !important;
    max-height: 21px !important;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout #phoneHistoryPanel {
    box-sizing: border-box !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
  }
}

@media (min-width: 601px) and (max-width: 1200px) and (min-height: 601px) {
  body.desktop-tab-layout .trade-card #predictions.prediction-strip {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
}

/* Final fit from the 844x390 and 768x1024 Chromium screenshots. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout .trade-card .prediction-workbench {
    grid-template-rows: 39px 66px !important;
    height: 107px !important;
    min-height: 107px !important;
    max-height: 107px !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot,
  body.phone-tab-layout .phone-auto-execution-slot .chart-auto-execution-panel {
    height: 66px !important;
    min-height: 66px !important;
    max-height: 66px !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot .auto-output-box {
    height: 39px !important;
    min-height: 39px !important;
    max-height: 39px !important;
  }
  body.phone-tab-layout .prediction-panel,
  body.phone-tab-layout .prediction-mobile-list {
    height: 107px !important;
    min-height: 107px !important;
    max-height: 107px !important;
  }
  body.phone-tab-layout .prediction-mobile-list {
    grid-template-rows: repeat(6, 17px) !important;
    gap: 1px !important;
  }
  body.phone-tab-layout .prediction-mobile-row,
  body.phone-tab-layout .prediction-mobile-row.has-open-manual {
    height: 17px !important;
    min-height: 17px !important;
    max-height: 17px !important;
  }
  body.phone-tab-layout .prediction-mobile-action-stack,
  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell,
  body.phone-tab-layout .prediction-mobile-row > span,
  body.phone-tab-layout .prediction-mobile-action-stack .mobile-settle {
    height: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
  }
  body.phone-tab-layout .prediction-mobile-row .pred-side { font-size: 9px !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-minute,
  body.phone-tab-layout .prediction-mobile-row .pred-conf,
  body.phone-tab-layout .prediction-mobile-row > span em,
  body.phone-tab-layout .prediction-countdown-value { font-size: 6.7px !important; }
  body.phone-tab-layout .prediction-mobile-row > span b { font-size: 4.7px !important; line-height: 5px !important; }
  body.phone-tab-layout .prediction-mobile-row > span { grid-template-rows: 5px 10px !important; }
  body.phone-tab-layout .prediction-mobile-action-stack .mobile-settle { font-size: 6px !important; }
}

@media (min-width: 601px) and (max-width: 900px) and (orientation: portrait) and (min-height: 601px) {
  body.desktop-tab-layout { --dpx-tablet-demo-height: 415px; }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout .trade-card .prediction-workbench,
  body.phone-tab-layout .prediction-panel,
  body.phone-tab-layout .prediction-mobile-list {
    height: 105px !important;
    min-height: 105px !important;
    max-height: 105px !important;
  }
  body.phone-tab-layout .trade-card .prediction-workbench { grid-template-rows: 39px 64px !important; }
  body.phone-tab-layout .phone-auto-execution-slot,
  body.phone-tab-layout .phone-auto-execution-slot .chart-auto-execution-panel {
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot .auto-output-box {
    height: 37px !important;
    min-height: 37px !important;
    max-height: 37px !important;
  }
  body.phone-tab-layout .prediction-mobile-list { grid-template-rows: repeat(6, 16.5px) !important; }
  body.phone-tab-layout .prediction-mobile-row,
  body.phone-tab-layout .prediction-mobile-row.has-open-manual {
    height: 16.5px !important;
    min-height: 16.5px !important;
    max-height: 16.5px !important;
  }
  body.phone-tab-layout .prediction-mobile-action-stack,
  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell,
  body.phone-tab-layout .prediction-mobile-row > span,
  body.phone-tab-layout .prediction-mobile-action-stack .mobile-settle {
    height: 15.5px !important;
    min-height: 15.5px !important;
    max-height: 15.5px !important;
  }
}

@media (min-width: 601px) and (max-width: 900px) and (orientation: portrait) and (min-height: 601px) {
  body.desktop-tab-layout { --dpx-tablet-demo-height: 432px; }
}

/* Eliminate the last few pixels of tablet prediction overflow measured in
   Chromium at 768x1024, 820x1180, and 1180x820. */
@media (min-width: 601px) and (max-width: 900px) and (orientation: portrait) and (min-height: 601px) {
  body.desktop-tab-layout .trade-card .prediction-table-layout {
    grid-template-rows: 14px repeat(6, 21.5px) !important;
  }
  body.desktop-tab-layout .trade-card .prediction-table-head {
    height: 14px !important;
    min-height: 14px !important;
    max-height: 14px !important;
    line-height: 14px !important;
  }
  body.desktop-tab-layout .trade-card .prediction-action-cell,
  body.desktop-tab-layout .trade-card .prediction-action-wrap,
  body.desktop-tab-layout .trade-card .prediction-info-cell,
  body.desktop-tab-layout .trade-card .prediction-action-cell button,
  body.desktop-tab-layout .trade-card .prediction-action-wrap button {
    min-height: 21.5px !important;
    height: 21.5px !important;
    max-height: 21.5px !important;
  }
}
@media (min-width: 901px) and (max-width: 1200px) and (min-height: 601px) and (orientation: landscape) {
  body.desktop-tab-layout .trade-card .prediction-table-layout {
    grid-template-rows: 14px repeat(6, 20px) !important;
  }
  body.desktop-tab-layout .trade-card .prediction-action-cell,
  body.desktop-tab-layout .trade-card .prediction-action-wrap,
  body.desktop-tab-layout .trade-card .prediction-info-cell,
  body.desktop-tab-layout .trade-card .prediction-action-cell button,
  body.desktop-tab-layout .trade-card .prediction-action-wrap button {
    min-height: 20px !important;
    height: 20px !important;
    max-height: 20px !important;
  }
}

/* PC/laptop administrator prediction snapshots need a few more pixels so the
   full confidence/estimated-percent/price-difference string never clips. */
@media (min-width: 1201px) {
  body.user-admin:not(.phone-tab-layout) #ledgerTable,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable {
    width: 2600px !important;
    min-width: 2600px !important;
  }
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-pred1,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-pred2,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-pred5,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-pred10,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-pred30,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-pred60,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-pred1,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-pred2,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-pred5,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-pred10,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-pred30,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-pred60 {
    width: 152px !important;
    min-width: 152px !important;
    max-width: 152px !important;
    white-space: nowrap !important;
  }
}
@media (min-width: 1201px) {
  body.user-admin:not(.phone-tab-layout) #ledgerTable th[class*="ledger-col-pred"],
  body.user-admin:not(.phone-tab-layout) #ledgerTable td.prediction-combined-cell,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable th[class*="ledger-col-pred"],
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable td.prediction-combined-cell {
    width: 152px !important;
    min-width: 152px !important;
    max-width: 152px !important;
    white-space: nowrap !important;
  }
}

/* ========================================================================== 
   DPX v0.5.1 SAME-NAME PATCH — requested corrections only
   1) Remove unused PC/laptop administrator Historical Orders spacing.
   2) Correct phone-landscape readability and fit.
   ========================================================================== */

/* Patch 1: compact only the oversized administrator Historical Orders columns.
   Values remain single-line/readable; table scrolling and all other layouts are
   unchanged. */
@media (min-width: 1201px) {
  body.user-admin:not(.phone-tab-layout) #ledgerTable,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable {
    width: 2352px !important;
    min-width: 2352px !important;
  }

  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-entryExit,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .entry-exit-cell,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-entryExit,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .entry-exit-cell {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
  }

  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-origAdjSl,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .orig-adj-sl-cell,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-origAdjSl,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .orig-adj-sl-cell {
    width: 198px !important;
    min-width: 198px !important;
    max-width: 198px !important;
  }

  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-origAdjTarget,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .orig-adj-target-cell,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-origAdjTarget,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .orig-adj-target-cell {
    width: 208px !important;
    min-width: 208px !important;
    max-width: 208px !important;
  }

  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-createdSettled,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .created-settled-cell,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-createdSettled,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .created-settled-cell {
    width: 184px !important;
    min-width: 184px !important;
    max-width: 184px !important;
  }

  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-duration,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-duration {
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
  }

  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-pnl,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-pnl {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
  }

  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-closeReason,
  body.user-admin:not(.phone-tab-layout) #ledgerTable .reason-cell,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-closeReason,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .reason-cell {
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
  }

  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-stake,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-stake {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
  }

  body.user-admin:not(.phone-tab-layout) #ledgerTable .ledger-col-symbol,
  body.admin-unlocked:not(.phone-tab-layout) #ledgerTable .ledger-col-symbol {
    width: 98px !important;
    min-width: 98px !important;
    max-width: 98px !important;
  }
}

/* Patch 2: phone landscape only. Reclaim the unused header gap and give each
   prediction row enough height for separate labels and values. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout .hero {
    margin-bottom: 1px !important;
  }

  body.phone-tab-layout .demo-layout,
  body.phone-tab-layout .demo-layout .trade-card {
    flex-basis: 220px !important;
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
  }

  body.phone-tab-layout .trade-card .prediction-workbench {
    grid-template-columns: 205px minmax(0, 1fr) !important;
    grid-template-areas: "parameters predictions" "execution predictions" !important;
    grid-template-rows: 40px 93px !important;
    gap: 2px 4px !important;
    height: 135px !important;
    min-height: 135px !important;
    max-height: 135px !important;
    margin-top: 1px !important;
  }

  body.phone-tab-layout .prediction-order-row {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
  }

  body.phone-tab-layout .prediction-order-row > div {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    grid-template-rows: 11px 29px !important;
  }

  body.phone-tab-layout .prediction-order-row .field-label {
    height: 11px !important;
    line-height: 11px !important;
    font-size: 6.5px !important;
  }

  body.phone-tab-layout .prediction-order-row input,
  body.phone-tab-layout .prediction-order-row select,
  body.phone-tab-layout #presetPercentSelect {
    height: 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    font-size: 9px !important;
  }

  body.phone-tab-layout .phone-auto-execution-slot,
  body.phone-tab-layout .phone-auto-execution-slot .chart-auto-execution-panel {
    height: 93px !important;
    min-height: 93px !important;
    max-height: 93px !important;
  }

  body.phone-tab-layout .phone-auto-execution-slot .auto-output-box {
    height: 65px !important;
    min-height: 65px !important;
    max-height: 65px !important;
  }

  body.phone-tab-layout .prediction-panel,
  body.phone-tab-layout .prediction-mobile-list,
  body.phone-tab-layout #predictions.prediction-strip {
    height: 135px !important;
    min-height: 135px !important;
    max-height: 135px !important;
  }

  body.phone-tab-layout .prediction-mobile-list {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: repeat(6, 21.5px) !important;
    gap: 1px !important;
  }

  body.phone-tab-layout .prediction-mobile-row,
  body.phone-tab-layout .prediction-mobile-row.has-open-manual {
    grid-template-columns: minmax(150px, 1.45fr) minmax(82px, .82fr) minmax(70px, .70fr) minmax(58px, .58fr) minmax(68px, .68fr) !important;
    height: 21.5px !important;
    min-height: 21.5px !important;
    max-height: 21.5px !important;
  }

  body.phone-tab-layout .prediction-mobile-action-stack,
  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell,
  body.phone-tab-layout .prediction-mobile-row > span,
  body.phone-tab-layout .prediction-mobile-action-stack .mobile-settle {
    height: 20.5px !important;
    min-height: 20.5px !important;
    max-height: 20.5px !important;
  }

  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell {
    padding: 0 4px !important;
  }

  body.phone-tab-layout .prediction-mobile-row .pred-side {
    font-size: 12px !important;
    line-height: 20px !important;
  }

  body.phone-tab-layout .prediction-mobile-row .pred-minute,
  body.phone-tab-layout .prediction-mobile-row .pred-conf {
    font-size: 8.8px !important;
    line-height: 20px !important;
  }

  body.phone-tab-layout .prediction-mobile-row > span {
    grid-template-rows: 7px 13px !important;
    padding: 0 2px !important;
  }

  body.phone-tab-layout .prediction-mobile-row > span b {
    font-size: 6.2px !important;
    line-height: 7px !important;
  }

  body.phone-tab-layout .prediction-mobile-row > span em,
  body.phone-tab-layout .prediction-countdown-value {
    font-size: 8.2px !important;
    line-height: 13px !important;
  }

  body.phone-tab-layout .prediction-mobile-action-stack .mobile-settle {
    font-size: 6.8px !important;
    line-height: 20px !important;
  }

  body.phone-tab-layout .phone-tab-panels {
    min-height: 0 !important;
  }
}

/* Phone-landscape metric cell fit: override the countdown cell's older padded
   two-row rule so its value remains visible below the label. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout .trade-card .prediction-workbench {
    grid-template-rows: 39px 92px !important;
  }

  body.phone-tab-layout .prediction-order-row,
  body.phone-tab-layout .prediction-order-row > div {
    height: 39px !important;
    min-height: 39px !important;
    max-height: 39px !important;
  }

  body.phone-tab-layout .phone-auto-execution-slot,
  body.phone-tab-layout .phone-auto-execution-slot .chart-auto-execution-panel {
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
  }

  body.phone-tab-layout .prediction-panel,
  body.phone-tab-layout #predictions.prediction-strip {
    box-sizing: border-box !important;
    height: 135px !important;
    min-height: 135px !important;
    max-height: 135px !important;
    padding: 0 !important;
  }

  body.phone-tab-layout .prediction-mobile-list {
    box-sizing: border-box !important;
    height: 133px !important;
    min-height: 133px !important;
    max-height: 133px !important;
    grid-template-rows: repeat(6, 21.25px) !important;
  }

  body.phone-tab-layout .prediction-mobile-row,
  body.phone-tab-layout .prediction-mobile-row.has-open-manual {
    height: 21.25px !important;
    min-height: 21.25px !important;
    max-height: 21.25px !important;
  }

  body.phone-tab-layout .prediction-mobile-action-stack,
  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell,
  body.phone-tab-layout .prediction-mobile-row > span,
  body.phone-tab-layout .prediction-mobile-action-stack .mobile-settle {
    height: 20.25px !important;
    min-height: 20.25px !important;
    max-height: 20.25px !important;
  }

  body.phone-tab-layout .prediction-mobile-row .mobile-pred-countdown {
    display: grid !important;
    grid-template-rows: 7px 13px !important;
    align-items: center !important;
    justify-items: center !important;
    padding: 0 2px !important;
    border-radius: 3px !important;
  }

  body.phone-tab-layout .prediction-mobile-row .mobile-pred-countdown b {
    font-size: 6.2px !important;
    line-height: 7px !important;
    align-self: center !important;
  }

  body.phone-tab-layout .prediction-mobile-row .mobile-pred-countdown em,
  body.phone-tab-layout .prediction-mobile-row .mobile-pred-countdown .prediction-countdown-value {
    font-size: 8.2px !important;
    line-height: 13px !important;
    align-self: center !important;
  }
}

/* ========================================================================== 
   DPX v0.5.1 M5 consolidated responsive/authentication/UI corrections
   ========================================================================== */
.layout-tools,
#autoHideSetupBtn,
.ledger-card .ledger-header .toolbar {
  display: none !important;
}

/* Historical actions are intentionally available from the administrator menu. */
body.user-normal #desktopSetupTab,
body.user-normal #autoTradingCard,
body.user-normal #phoneEntryTab,
body.user-normal #phoneAdjustTab,
body.user-normal #phoneSettingTab {
  display: none !important;
}

.hero-market-slot { justify-self: start !important; text-align: left !important; }
.session-balance-slot { margin-left: auto !important; justify-content: flex-end !important; }
.session-account-slot { min-width: 0 !important; }
#sessionAccountSlot .account-menu-btn span:nth-child(2) {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.trade-card .trade-market-row {
  align-items: end !important;
  grid-template-columns: minmax(230px, 1fr) max-content !important;
}
.trade-card .trade-symbol-control { min-width: 0 !important; }
.trade-card .prediction-panel { min-width: 0 !important; }
.trade-card .prediction-table-layout { width: 100% !important; }

.auto-setting-inputs {
  align-content: start !important;
  grid-template-columns: repeat(2, minmax(190px, 1fr)) !important;
}
.auto-setting-inputs > label { min-width: 0 !important; }
.auto-setting-inputs .param-projected-profit { order: 3; }
.auto-setting-inputs .param-net-pnl { order: 4; }

/* Large accessible confirmations and account dialogs. */
.dpx-info-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  padding: 24px !important;
  overflow: auto !important;
  display: grid !important;
  place-items: center !important;
}
.dpx-info-dialog,
.dpx-confirm-dialog,
.dpx-form-dialog {
  width: min(700px, 94vw) !important;
  min-height: 260px !important;
  padding: clamp(22px, 4vw, 40px) !important;
  border-radius: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 18px !important;
}
.dpx-info-title { font-size: clamp(24px, 4vw, 34px) !important; line-height: 1.15 !important; }
.dpx-info-body,
.dpx-form-label,
.dpx-form-message { font-size: clamp(16px, 2.1vw, 21px) !important; line-height: 1.5 !important; }
.dpx-info-actions button { min-width: 130px !important; min-height: 48px !important; font-size: 17px !important; }
.dpx-form-dialog .password-wrap { width: 100% !important; display: grid !important; grid-template-columns: 1fr 46px !important; }
.dpx-form-dialog .password-wrap input { min-width: 0 !important; }

/* Registration must always expose the confirmation fields and Register button. */
.auth-panel {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: max(12px, env(safe-area-inset-top)) 12px max(30px, env(safe-area-inset-bottom)) !important;
}
.auth-card.auth-window {
  flex: 0 0 auto !important;
  max-height: none !important;
  height: auto !important;
  margin: auto 0 !important;
}
.auth-paper,
.auth-form,
.auth-form-grid {
  max-height: none !important;
  overflow: visible !important;
}
.auth-form-grid { padding-bottom: 6px !important; }
#authRegisterForm .auth-primary { margin-top: 4px !important; min-height: 48px !important; }

/* Stable chart sizing on first render and after orientation changes. */
#tvChart,
#sparkline,
.canvas-fallback {
  width: 100% !important;
  min-width: 0 !important;
}
.chart-zone { min-width: 0 !important; }

/* One mobile prediction header; labels are not repeated in every row. */
.prediction-mobile-list { display: grid !important; }
.prediction-mobile-head {
  display: grid !important;
  grid-template-columns: minmax(108px, 1.16fr) minmax(62px, .66fr) minmax(45px, .47fr) minmax(40px, .42fr) minmax(55px, .55fr) !important;
  gap: 2px !important;
  align-items: end !important;
  font-size: 7px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  letter-spacing: .02em !important;
  min-height: 10px !important;
}
.prediction-mobile-row > span > b { display: none !important; }
.prediction-mobile-row > span { grid-template-rows: 1fr !important; align-items: center !important; }

#ledgerTable { border-collapse: separate !important; border-spacing: 0 !important; }
#ledgerTable th { vertical-align: middle !important; }
#ledgerTable td { vertical-align: middle !important; }

@media (max-width: 600px) {
  .auth-panel { padding-left: 8px !important; padding-right: 8px !important; }
  .auth-card.auth-window {
    width: min(420px, 98vw) !important;
    padding: 14px 12px 24px !important;
    border-radius: 22px !important;
    margin: 0 auto !important;
  }
  .auth-logo { font-size: 30px !important; }
  .auth-window h2 { font-size: 26px !important; margin-bottom: 10px !important; }
  .auth-paper { padding: 12px !important; }
  .auth-form-grid { gap: 9px !important; }
  .auth-field input { min-height: 42px !important; }
  #sessionAccountSlot .account-menu-btn {
    max-width: min(56vw, 205px) !important;
    font-size: 10px !important;
    gap: 4px !important;
    padding-inline: 7px !important;
  }
  .session-balance-slot { min-width: max-content !important; }
  .session-balance-slot .balance-row { font-size: 11px !important; }
  .trade-card .trade-market-row { grid-template-columns: 1fr !important; }
  .auto-setting-inputs { grid-template-columns: 1fr !important; }
  .dpx-info-modal { padding: 8px !important; align-items: start !important; }
  .dpx-info-dialog,
  .dpx-confirm-dialog,
  .dpx-form-dialog {
    width: 98vw !important;
    min-height: min(390px, 88dvh) !important;
    margin: max(8px, env(safe-area-inset-top)) auto !important;
    padding: 20px 16px !important;
  }
  .dpx-info-actions { flex-wrap: wrap !important; }
  .dpx-info-actions button { flex: 1 1 130px !important; }
  body.phone-tab-layout .prediction-mobile-list {
    grid-template-rows: 10px repeat(6, minmax(0, 1fr)) !important;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  .auth-panel { padding-block: 6px 20px !important; }
  .auth-card.auth-window { margin: 0 auto !important; }
  #sessionAccountSlot .account-menu-btn { max-width: 190px !important; font-size: 9.5px !important; }
  body.phone-tab-layout .prediction-mobile-head {
    grid-template-columns: minmax(108px, 1.16fr) minmax(62px, .66fr) minmax(45px, .47fr) minmax(40px, .42fr) minmax(55px, .55fr) !important;
    font-size: 6px !important;
  }
  body.phone-tab-layout .prediction-mobile-list {
    grid-template-rows: 8px repeat(6, minmax(0, 1fr)) !important;
  }
}

/* M5 final rendered-layout corrections: preserve readable prediction controls,
   keep tablet Historical Orders column widths stable, and reclaim the phone-
   landscape header space without changing trading behavior. */
@media (min-width: 601px) and (max-width: 900px) and (orientation: portrait) and (min-height: 601px) {
  body.desktop-tab-layout .trade-card .prediction-action-cell {
    grid-template-columns: minmax(0, 1fr) 24px 28px !important;
    gap: 2px !important;
    padding: 2px 4px !important;
  }
  body.desktop-tab-layout .trade-card .prediction-action-cell .pred-side {
    min-width: 0 !important;
    font-size: 12px !important;
  }
  body.desktop-tab-layout .trade-card .prediction-action-cell .pred-minute,
  body.desktop-tab-layout .trade-card .prediction-action-cell .pred-conf {
    min-width: 0 !important;
    font-size: 9px !important;
  }
}

@media (min-width: 601px) and (max-width: 1100px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap {
    overflow-x: auto !important;
    overflow-y: auto !important;
    touch-action: pan-x pan-y !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap table#ledgerTable {
    width: 1060px !important;
    min-width: 1060px !important;
    max-width: none !important;
    table-layout: fixed !important;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout .demo-layout,
  body.phone-tab-layout .demo-layout .trade-card {
    flex-basis: 182px !important;
    height: 182px !important;
    min-height: 182px !important;
    max-height: 182px !important;
  }
  body.phone-tab-layout .demo-layout .trade-card {
    position: relative !important;
  }
  body.phone-tab-layout .trade-card .trade-heading {
    position: absolute !important;
    z-index: 20 !important;
    top: 3px !important;
    right: 4px !important;
    width: auto !important;
    min-width: 0 !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }
  body.phone-tab-layout .trade-card .trade-heading .eyebrow,
  body.phone-tab-layout .trade-card .trade-heading .balance-row {
    display: none !important;
  }
  body.phone-tab-layout .trade-card .trade-heading .trade-title-status {
    height: 30px !important;
    min-height: 30px !important;
    gap: 4px !important;
  }
  body.phone-tab-layout .trade-card .trade-market-row {
    box-sizing: border-box !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding-right: 194px !important;
    margin: 0 !important;
  }
  body.phone-tab-layout .trade-card .trade-symbol-control {
    width: 100% !important;
    max-width: none !important;
  }
}

/* ========================================================================== 
   DPX v0.5.1 NEXT PATCH — authoritative responsive/profile corrections.
   ========================================================================== */
.account-menu-btn .avatar-dot,
.profile-avatar-preview {
  overflow: hidden !important;
  flex: 0 0 auto !important;
}
.account-avatar-image {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
}
.avatar-fallback {
  display: grid !important;
  width: 100% !important;
  height: 100% !important;
  place-items: center !important;
  line-height: 1 !important;
}
#sessionAccountSlot .account-menu-btn .avatar-dot {
  width: 25px !important;
  height: 25px !important;
  min-width: 25px !important;
  border: 1px solid rgba(255,255,255,.55) !important;
  background: rgba(255,255,255,.12) !important;
  font-size: 15px !important;
}

/* Account Information and Users Management target design. */
.dpx-profile-dialog,
.dpx-users-redesign .dpx-users-dialog {
  justify-content: flex-start !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 2px !important;
  border: 2px solid #d9edf5 !important;
  background: #075670 !important;
  color: #fff !important;
  box-shadow: 0 20px 70px rgba(0,0,0,.55) !important;
}
.dpx-profile-dialog { width: min(620px, 96vw) !important; }
.dpx-users-redesign .dpx-users-dialog { width: min(1120px, 97vw) !important; max-width: 1120px !important; }
.dpx-profile-title {
  padding: 12px 16px !important;
  background: #050505 !important;
  color: #fff !important;
  font-size: clamp(24px, 3vw, 34px) !important;
  font-weight: 400 !important;
  line-height: 1.05 !important;
  border-bottom: 2px solid #e7edf0 !important;
}
.dpx-profile-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 110px !important;
  gap: 10px !important;
  padding: 22px 20px 12px !important;
}
.dpx-profile-form,
.users-edit-fields {
  display: grid !important;
  gap: 13px !important;
}
.dpx-profile-form label,
.users-edit-fields label,
.users-search-form label {
  display: grid !important;
  grid-template-columns: 135px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
  font-weight: 800 !important;
  color: #fff !important;
}
.dpx-profile-form label > span,
.users-edit-fields label > span,
.users-search-form label > span { text-align: right !important; }
.dpx-profile-form input,
.dpx-profile-form select,
.users-edit-fields input,
.users-search-form input {
  min-height: 39px !important;
  border-radius: 7px !important;
  border: 1px solid #aeb7bd !important;
  background: #eef0f2 !important;
  color: #111 !important;
  font-size: 15px !important;
}
.dpx-profile-form input[readonly],
.users-edit-fields input[readonly] { background: #dfe3e6 !important; }
.dpx-profile-avatar-column {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
}
.profile-avatar-button {
  border: 0 !important;
  background: transparent !important;
  color: #d9f6ff !important;
  display: grid !important;
  justify-items: center !important;
  gap: 7px !important;
  cursor: pointer !important;
  padding: 0 !important;
}
.profile-avatar-preview {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255,255,255,.8) !important;
  background: #b8c0c5 !important;
  font-size: 38px !important;
}
.profile-avatar-help { font-size: 11px !important; font-weight: 800 !important; }
.dpx-profile-dialog .dpx-users-message,
.dpx-users-redesign .dpx-users-message {
  min-height: 22px !important;
  padding: 2px 20px 8px !important;
  color: #d8fbff !important;
}
.dpx-profile-dialog .dpx-info-actions,
.dpx-users-redesign .dpx-info-actions {
  padding: 10px 18px 18px !important;
  justify-content: flex-end !important;
}
.dpx-profile-dialog .dpx-info-actions button,
.dpx-users-redesign button {
  min-height: 42px !important;
}
.users-management-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr) !important;
  min-height: 530px !important;
}
.users-search-pane,
.users-edit-pane { padding: 18px !important; }
.users-search-pane { border-right: 2px solid #d7e8ee !important; }
.users-search-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 58px !important;
  gap: 10px 12px !important;
  align-items: center !important;
}
.users-search-form label { grid-column: 1 !important; grid-template-columns: 120px minmax(0, 1fr) !important; }
.users-search-button {
  grid-column: 2 !important;
  grid-row: 1 / span 3 !important;
  width: 54px !important;
  height: 54px !important;
  align-self: center !important;
  border-radius: 8px !important;
  border: 2px solid #101010 !important;
  background: linear-gradient(#666,#222) !important;
  color: #fff !important;
  font-size: 35px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}
.users-results-wrap {
  margin-top: 26px !important;
  max-height: 350px !important;
  overflow: auto !important;
  border: 2px solid #d7edf4 !important;
  background: #dfe5e9 !important;
}
.users-results-table { width: 100% !important; border-collapse: collapse !important; table-layout: fixed !important; }
.users-results-table th {
  position: sticky !important;
  top: 0 !important;
  background: #1b7190 !important;
  color: #fff !important;
  padding: 8px 6px !important;
  border: 1px solid #fff !important;
  font-size: 15px !important;
}
.users-results-table td {
  height: 36px !important;
  padding: 6px !important;
  background: #d7dde1 !important;
  color: #12202a !important;
  border: 1px solid #fff !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.users-results-table tr[data-user-id] { cursor: pointer !important; }
.users-results-table tr[data-user-id]:hover td,
.users-results-table tr.selected td { background: #b8e6f3 !important; }
.users-edit-content {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 90px !important;
  gap: 10px !important;
}
.users-edit-fields { gap: 11px !important; }
.users-edit-fields label { grid-template-columns: 112px minmax(0, 1fr) !important; }
.users-check-label { grid-template-columns: 112px 42px minmax(0, 1fr) !important; }
.users-check-label input { width: 30px !important; height: 30px !important; min-height: 30px !important; }
.users-check-label small { font-size: 12px !important; color: #d8f5ff !important; }
.users-edit-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-top: 20px !important;
}
.users-close-actions { padding-top: 0 !important; }

/* Phone portrait: reduce only User (ID); enlarge Balance. */
@media (max-width: 600px) and (orientation: portrait) {
  body.phone-tab-layout .session-bar {
    display: grid !important;
    grid-template-columns: minmax(0, .56fr) minmax(max-content, .44fr) !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  body.phone-tab-layout .session-account-slot,
  body.phone-tab-layout .session-account-slot .account-bar,
  body.phone-tab-layout .session-account-slot .account-menu-wrap { min-width: 0 !important; width: 100% !important; }
  body.phone-tab-layout #sessionAccountSlot .account-menu-btn {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    font-size: 8.2px !important;
    padding-inline: 4px !important;
    gap: 3px !important;
  }
  body.phone-tab-layout #sessionAccountSlot .account-menu-btn span:nth-child(2) {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  body.phone-tab-layout #sessionAccountSlot .account-menu-btn .avatar-dot {
    width: 21px !important;
    height: 21px !important;
    min-width: 21px !important;
    font-size: 12px !important;
  }
  body.phone-tab-layout .session-balance-slot,
  body.phone-tab-layout .session-balance-slot .balance-row {
    width: auto !important;
    min-width: max-content !important;
    justify-content: flex-end !important;
  }
  body.phone-tab-layout .session-balance-slot .balance-row {
    font-size: 12.5px !important;
    gap: 4px !important;
    padding-inline: 4px !important;
  }
}

/* Phone Entry/Adjustment fields are compact; recovered vertical space is given
   to Auto Trade Execution / trading logs. */
body.phone-tab-layout .phone-auto-panel .auto-rule-details {
  padding: 6px !important;
  margin: 0 !important;
}
body.phone-tab-layout .phone-auto-panel .horizon-param-grid {
  grid-template-columns: 72px repeat(6, minmax(34px, 1fr)) !important;
  column-gap: 3px !important;
  row-gap: 4px !important;
}
body.phone-tab-layout .phone-auto-panel .horizon-param-grid input {
  width: 100% !important;
  min-width: 0 !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 2px 3px !important;
  font-size: 10px !important;
}
body.phone-tab-layout .phone-auto-panel .horizon-row-label,
body.phone-tab-layout .phone-auto-panel .horizon-grid-head { font-size: 8px !important; }
body.phone-tab-layout .phone-auto-panel .logic-field textarea {
  min-height: 76px !important;
  max-height: 118px !important;
  font-size: 9px !important;
}
body.phone-tab-layout .phone-auto-execution-slot {
  min-width: 0 !important;
  flex: 1 1 38% !important;
}
body.phone-tab-layout .phone-auto-execution-slot .chart-auto-execution-panel {
  height: 100% !important;
  min-height: 82px !important;
  max-height: none !important;
}
body.phone-tab-layout .phone-auto-execution-slot .auto-output-box,
body.phone-tab-layout #autoSkippedLog {
  min-height: 58px !important;
  max-height: none !important;
  overflow-y: auto !important;
  font-size: 8.5px !important;
  line-height: 1.35 !important;
}

/* Real iPhone 14 / Galaxy A10 landscape: never scale a fixed desktop canvas. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html, body {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  body.phone-tab-layout .app-shell,
  body.phone-tab-layout .hero,
  body.phone-tab-layout .session-bar,
  body.phone-tab-layout .demo-layout,
  body.phone-tab-layout .phone-bottom-tabs,
  body.phone-tab-layout .phone-tab-panels,
  body.phone-tab-layout .card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  body.phone-tab-layout .app-shell { padding: 2px !important; gap: 2px !important; }
  body.phone-tab-layout .hero { min-height: 0 !important; height: auto !important; padding: 2px 5px !important; }
  body.phone-tab-layout .session-bar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    gap: 5px !important;
    min-height: 30px !important;
    height: 30px !important;
    padding: 2px 5px !important;
  }
  body.phone-tab-layout #sessionAccountSlot .account-menu-btn {
    width: min(44vw, 270px) !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 9px !important;
  }
  body.phone-tab-layout .session-balance-slot .balance-row {
    font-size: 11px !important;
    min-width: max-content !important;
  }
  body.phone-tab-layout .demo-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    height: auto !important;
    min-height: 176px !important;
    max-height: none !important;
    flex-basis: auto !important;
  }
  body.phone-tab-layout .demo-layout .trade-card {
    width: 100% !important;
    height: 176px !important;
    min-height: 176px !important;
    max-height: 176px !important;
    flex-basis: auto !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .trade-card .trade-market-row {
    width: 100% !important;
    min-width: 0 !important;
    padding-right: min(38vw, 210px) !important;
  }
  body.phone-tab-layout .trade-card .prediction-panel,
  body.phone-tab-layout .trade-card .prediction-strip,
  body.phone-tab-layout .prediction-mobile-list { min-width: 0 !important; width: 100% !important; }
  body.phone-tab-layout .phone-auto-execution-slot { min-width: 125px !important; }
  body.phone-tab-layout .phone-auto-execution-slot .chart-auto-execution-panel { min-height: 112px !important; }
  body.phone-tab-layout #autoSkippedLog { min-height: 84px !important; font-size: 8px !important; }
  body.phone-tab-layout .phone-bottom-tabs { overflow-x: auto !important; }
  body.phone-tab-layout .phone-tab-list { min-width: max-content !important; }
  body.phone-tab-layout .phone-tab-panels { min-height: 0 !important; overflow: visible !important; }
  body.phone-tab-layout .table-wrap { max-width: 100vw !important; }
}

/* Mobile versions of the redesigned dialogs remain usable without a shrunken canvas. */
@media (max-width: 760px), (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  .dpx-profile-dialog,
  .dpx-users-redesign .dpx-users-dialog {
    width: min(98vw, 760px) !important;
    max-height: calc(100dvh - 12px) !important;
    overflow-y: auto !important;
  }
  .dpx-profile-body { grid-template-columns: minmax(0, 1fr) 74px !important; padding: 14px 10px 8px !important; }
  .dpx-profile-form label { grid-template-columns: 104px minmax(0, 1fr) !important; gap: 7px !important; font-size: 12px !important; }
  .profile-avatar-preview { width: 58px !important; height: 58px !important; font-size: 28px !important; }
  .users-management-grid { grid-template-columns: 1fr !important; min-height: 0 !important; }
  .users-search-pane { border-right: 0 !important; border-bottom: 2px solid #d7e8ee !important; }
  .users-search-pane, .users-edit-pane { padding: 10px !important; }
  .users-results-wrap { max-height: 180px !important; margin-top: 12px !important; }
  .users-edit-content { grid-template-columns: minmax(0, 1fr) 66px !important; }
  .users-edit-fields label { grid-template-columns: 92px minmax(0, 1fr) !important; gap: 6px !important; font-size: 11px !important; }
  .users-check-label { grid-template-columns: 92px 34px minmax(0, 1fr) !important; }
}

/* Next patch: authentication must remain above the responsive phone shell.
   Several phone-layout rules intentionally use display:flex !important; this
   stronger locked-state rule prevents the trading app from covering the
   registration confirmation fields and Register button in landscape. */
body.auth-locked .app-shell { display: none !important; }
body.auth-locked { overflow: hidden !important; }
.auth-panel { z-index: 100000 !important; }

/* Users Management uses a compact three-column result table. The application
   ledger has a global 1120px table minimum, so explicitly remove it here. */
.users-results-table { min-width: 0 !important; }
.users-management-grid { min-height: 470px !important; }
.dpx-users-redesign .dpx-users-dialog {
  max-height: calc(100dvh - 20px) !important;
  overflow-y: auto !important;
}

/* Next patch: on phones, reduce the four compact entry controls and give the
   Auto Trade Execution log nearly half of the available upper-row width. */
body.phone-tab-layout .trade-card .prediction-workbench {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr) !important;
}
body.phone-tab-layout .trade-card .prediction-workbench .prediction-order-row {
  gap: 1px !important;
}
body.phone-tab-layout .trade-card .prediction-workbench .prediction-order-row .field-label {
  font-size: 6.5px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body.phone-tab-layout .trade-card .prediction-workbench .prediction-order-row .text-input,
body.phone-tab-layout .trade-card .prediction-workbench .prediction-order-row .select-input,
body.phone-tab-layout .trade-card .prediction-workbench .prediction-order-row #presetPercentSelect {
  min-width: 0 !important;
  padding-left: 3px !important;
  padding-right: 3px !important;
  font-size: 8.5px !important;
}
body.phone-tab-layout .phone-auto-execution-slot {
  width: 100% !important;
  max-width: none !important;
}


/* ========================================================================== 
   DPX v0.5.1 CURRENT PATCH CYCLE — targeted phone viewport corrections
   ========================================================================== */
#phoneChartPanel,
#phoneChartPanel #tvChart,
#phoneChartPanel #sparkline,
#phoneChartPanel .tv-chart,
#phoneChartPanel .canvas-fallback {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
#phoneChartPanel #tvChart > div,
#phoneChartPanel #tvChart canvas {
  max-width: 100% !important;
}

/* iPhone 14 Historical Orders: vertical and horizontal scrolling stay inside
   the ledger in both orientations, with a sticky header and aligned rows. */
@media (max-width: 600px), (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout #phoneHistoryPanel[aria-hidden="false"] {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout #phoneHistoryPanel #ledgerTableWrap {
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 92px !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    overscroll-behavior: contain !important;
  }
  body.phone-tab-layout #ledgerTable thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 9 !important;
  }
}

/* iPhone 14 portrait chart must occupy the panel instead of retaining a stale,
   narrow first-login canvas width. */
@media (max-width: 600px) and (orientation: portrait) {
  body.phone-tab-layout.phone-tab-chart .phone-tab-panels,
  body.phone-tab-layout.phone-tab-chart #phoneChartPanel[aria-hidden="false"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  body.phone-tab-layout.phone-tab-chart #phoneChartPanel[aria-hidden="false"] {
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-tab-chart #phoneChartPanel #tvChart,
  body.phone-tab-layout.phone-tab-chart #phoneChartPanel #sparkline {
    flex: 1 1 auto !important;
    min-height: 250px !important;
    height: min(52dvh, 430px) !important;
  }
}

/* Galaxy A10 / iPhone landscape target: real one-row trading workbench rather
   than a scaled desktop canvas. The tabs and lower panel remain reachable. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html, body {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 100% !important;
    overflow-x: hidden !important;
  }
  body.phone-tab-layout .app-shell {
    width: 100% !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 1px 2px !important;
    gap: 1px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .hero {
    flex: 0 0 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding: 1px 4px !important;
  }
  body.phone-tab-layout .brand-block h1 { font-size: 18px !important; }
  body.phone-tab-layout .hero .status-box,
  body.phone-tab-layout .hero .market-price-panel {
    height: 22px !important;
    min-height: 22px !important;
    padding: 1px 4px !important;
  }
  body.phone-tab-layout .hero .status-box small,
  body.phone-tab-layout .hero .market-price-label { display: none !important; }
  body.phone-tab-layout #livePrice { font-size: 14px !important; }
  body.phone-tab-layout .session-bar {
    flex: 0 0 25px !important;
    height: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    padding: 1px 4px !important;
  }
  body.phone-tab-layout #sessionAccountSlot .account-menu-btn {
    height: 23px !important;
    min-height: 23px !important;
    font-size: 9px !important;
  }
  body.phone-tab-layout .session-balance-slot .balance-row { font-size: 10px !important; }
  body.phone-tab-layout .demo-layout {
    flex: 0 0 168px !important;
    height: 168px !important;
    min-height: 168px !important;
    max-height: 168px !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .demo-layout .trade-card {
    position: relative !important;
    width: 100% !important;
    height: 168px !important;
    min-height: 168px !important;
    max-height: 168px !important;
    padding: 2px 4px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .trade-card .trade-heading {
    position: static !important;
    width: 100% !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding: 0 !important;
  }
  body.phone-tab-layout .trade-card .trade-heading .eyebrow,
  body.phone-tab-layout .trade-card .trade-heading .balance-row { display: none !important; }
  body.phone-tab-layout .trade-title-status {
    display: grid !important;
    grid-template-columns: max-content minmax(0, max-content) max-content !important;
    justify-content: end !important;
    gap: 4px !important;
    height: 24px !important;
  }
  body.phone-tab-layout #autoStatusPill,
  body.phone-tab-layout #autoRunToggleBtn {
    height: 23px !important;
    min-height: 23px !important;
    max-height: 23px !important;
    padding: 1px 7px !important;
    font-size: 9px !important;
    white-space: nowrap !important;
  }
  body.phone-tab-layout .trade-card .trade-market-row {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: calc(100% - min(42vw, 280px)) !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding: 0 !important;
    margin: -24px 0 1px 0 !important;
  }
  body.phone-tab-layout .trade-card .trade-symbol-control { width: 100% !important; }
  body.phone-tab-layout .trade-card .trade-symbol-control .field-label,
  body.phone-tab-layout .market-price-panel { display: none !important; }
  body.phone-tab-layout #symbolSelect {
    width: 100% !important;
    height: 23px !important;
    min-height: 23px !important;
    font-size: 9px !important;
    padding-block: 0 !important;
  }
  body.phone-tab-layout .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: minmax(155px, 23%) minmax(170px, 27%) minmax(0, 1fr) !important;
    grid-template-areas: "parameters execution predictions" !important;
    grid-template-rows: 116px !important;
    width: 100% !important;
    height: 116px !important;
    min-height: 116px !important;
    max-height: 116px !important;
    gap: 3px !important;
    margin: 1px 0 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .prediction-order-row {
    grid-area: parameters !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    gap: 2px !important;
    width: 100% !important;
    height: 116px !important;
    min-height: 116px !important;
    max-height: 116px !important;
  }
  body.phone-tab-layout .prediction-order-row > div {
    height: 57px !important;
    min-height: 57px !important;
    max-height: 57px !important;
    grid-template-rows: 15px 40px !important;
  }
  body.phone-tab-layout .prediction-order-row .field-label {
    display: block !important;
    height: 15px !important;
    line-height: 15px !important;
    font-size: 7px !important;
    white-space: normal !important;
  }
  body.phone-tab-layout .prediction-order-row input,
  body.phone-tab-layout .prediction-order-row select,
  body.phone-tab-layout #presetPercentSelect {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    font-size: 11px !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot {
    grid-area: execution !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 116px !important;
    min-height: 116px !important;
    max-height: 116px !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot .chart-auto-execution-panel {
    width: 100% !important;
    height: 116px !important;
    min-height: 116px !important;
    max-height: 116px !important;
    padding: 3px !important;
    margin: 0 !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot .log-panel-header {
    min-height: 18px !important;
    font-size: 8px !important;
  }
  body.phone-tab-layout .phone-auto-execution-slot .auto-output-box {
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
    overflow-y: auto !important;
    font-size: 8px !important;
    line-height: 1.25 !important;
  }
  body.phone-tab-layout .prediction-panel,
  body.phone-tab-layout #predictions.prediction-strip {
    grid-area: predictions !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 116px !important;
    min-height: 116px !important;
    max-height: 116px !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .prediction-mobile-head { display: grid !important; height: 10px !important; min-height: 10px !important; }
  body.phone-tab-layout .prediction-mobile-list {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 116px !important;
    min-height: 116px !important;
    max-height: 116px !important;
    padding: 0 !important;
    overflow: hidden !important;
    grid-template-rows: 10px repeat(6, 16px) !important;
    gap: 1px !important;
  }
  body.phone-tab-layout .prediction-mobile-row,
  body.phone-tab-layout .prediction-mobile-row.has-open-manual {
    width: 100% !important;
    height: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    grid-template-columns: minmax(100px, 1.3fr) minmax(60px,.72fr) minmax(52px,.62fr) minmax(46px,.54fr) minmax(52px,.60fr) !important;
  }
  body.phone-tab-layout .prediction-mobile-action-stack,
  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell,
  body.phone-tab-layout .prediction-mobile-row > span {
    height: 15px !important;
    min-height: 15px !important;
    max-height: 15px !important;
  }
  body.phone-tab-layout .prediction-mobile-row .pred-side { font-size: 9.5px !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-minute,
  body.phone-tab-layout .prediction-mobile-row .pred-conf,
  body.phone-tab-layout .prediction-mobile-row > span em,
  body.phone-tab-layout .prediction-countdown-value { font-size: 6.5px !important; }
  body.phone-tab-layout .prediction-mobile-row > span { grid-template-rows: 5px 10px !important; }
  body.phone-tab-layout .prediction-mobile-row > span b { font-size: 4.8px !important; line-height: 5px !important; }
  body.phone-tab-layout .phone-bottom-tabs {
    flex: 0 0 23px !important;
    height: 23px !important;
    min-height: 23px !important;
    max-height: 23px !important;
    overflow-x: auto !important;
  }
  body.phone-tab-layout .phone-bottom-tab {
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    padding: 1px 8px !important;
    font-size: 8.5px !important;
  }
  body.phone-tab-layout .phone-tab-panels {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout #phoneChartPanel[aria-hidden="false"] {
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout #phoneChartPanel #tvChart,
  body.phone-tab-layout #phoneChartPanel #sparkline {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 70px !important;
  }
}

/* ========================================================================== 
   DPX v0.5.1 PHONE-LANDSCAPE COMPLETE REDESIGN
   Applies to all phones in landscape, including Galaxy A10 and iPhone 14.
   ========================================================================== */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html, body,
  body.phone-landscape-redesign {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    overflow: hidden !important;
  }
  body.phone-landscape-redesign .app-shell {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 1px 2px max(1px, env(safe-area-inset-bottom)) !important;
    gap: 1px !important;
    overflow: hidden !important;
  }
  body.phone-landscape-redesign .hero {
    flex: 0 0 23px !important;
    height: 23px !important;
    min-height: 23px !important;
    max-height: 23px !important;
    padding: 0 5px !important;
    border-radius: 3px !important;
  }
  body.phone-landscape-redesign .brand-block h1 { font-size: 15px !important; line-height: 21px !important; }
  body.phone-landscape-redesign .app-version { font-size: 8px !important; }
  body.phone-landscape-redesign .hero .status-box {
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    padding: 0 5px !important;
    font-size: 8px !important;
  }
  body.phone-landscape-redesign .hero .status-box small,
  body.phone-landscape-redesign .hero-market-slot { display: none !important; }

  body.phone-landscape-redesign .session-bar {
    flex: 0 0 23px !important;
    height: 23px !important;
    min-height: 23px !important;
    max-height: 23px !important;
    padding: 0 5px !important;
    border-radius: 3px !important;
  }
  body.phone-landscape-redesign #sessionAccountSlot .account-menu-btn {
    height: 21px !important;
    min-height: 21px !important;
    max-height: 21px !important;
    max-width: min(47vw, 330px) !important;
    padding: 0 5px !important;
    gap: 3px !important;
    font-size: 8.5px !important;
  }
  body.phone-landscape-redesign #sessionAccountSlot .account-avatar,
  body.phone-landscape-redesign #sessionAccountSlot .account-avatar img {
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
  }
  body.phone-landscape-redesign .session-balance-slot .balance-row {
    font-size: 9px !important;
    line-height: 20px !important;
  }

  body.phone-landscape-redesign .demo-layout {
    flex: 0 0 205px !important;
    display: block !important;
    width: 100% !important;
    height: 205px !important;
    min-height: 205px !important;
    max-height: 205px !important;
    overflow: hidden !important;
  }
  body.phone-landscape-redesign .demo-layout .trade-card {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-rows: 22px 24px minmax(0, 1fr) !important;
    width: 100% !important;
    height: 205px !important;
    min-height: 205px !important;
    max-height: 205px !important;
    padding: 1px 4px 2px !important;
    gap: 1px !important;
    overflow: hidden !important;
    border-radius: 3px !important;
  }
  body.phone-landscape-redesign .trade-card .trade-heading {
    display: block !important;
    position: relative !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.phone-landscape-redesign .trade-card .trade-heading .eyebrow,
  body.phone-landscape-redesign .trade-card .trade-heading .balance-row { display: none !important; }
  body.phone-landscape-redesign .trade-title-status {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 3px !important;
    height: 22px !important;
  }
  body.phone-landscape-redesign #autoStatusPill,
  body.phone-landscape-redesign #autoRunToggleBtn {
    box-sizing: border-box !important;
    height: 21px !important;
    min-height: 21px !important;
    max-height: 21px !important;
    padding: 0 6px !important;
    font-size: 8px !important;
    line-height: 19px !important;
    white-space: nowrap !important;
  }

  body.phone-landscape-redesign .trade-card .trade-market-row {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: calc(100% - min(43vw, 330px)) !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    margin: -23px 0 0 !important;
    padding: 0 !important;
    align-self: start !important;
  }
  body.phone-landscape-redesign .trade-symbol-control,
  body.phone-landscape-redesign #symbolSelect {
    width: 100% !important;
    min-width: 0 !important;
  }
  body.phone-landscape-redesign .trade-symbol-control .field-label,
  body.phone-landscape-redesign .trade-market-row .market-price-panel { display: none !important; }
  body.phone-landscape-redesign #symbolSelect {
    box-sizing: border-box !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    padding: 0 20px 0 6px !important;
    font-size: 8.5px !important;
    line-height: 20px !important;
  }

  body.phone-landscape-redesign .trade-card .prediction-workbench {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 56%) minmax(0, 44%) !important;
    grid-template-rows: 28px minmax(0, 1fr) !important;
    grid-template-areas:
      "parameters parameters"
      "chart predictions" !important;
    width: 100% !important;
    height: 156px !important;
    min-height: 156px !important;
    max-height: 156px !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 2px 3px !important;
    overflow: hidden !important;
  }

  /* Four entry parameters in one single compact line immediately under symbol. */
  body.phone-landscape-redesign .prediction-order-row {
    grid-area: parameters !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: 26px !important;
    width: min(66%, 540px) !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    gap: 3px !important;
    padding: 0 !important;
    margin: 0 !important;
    align-self: start !important;
  }
  body.phone-landscape-redesign .prediction-order-row > div {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr) !important;
    grid-template-rows: 24px !important;
    align-items: center !important;
    width: 100% !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    gap: 2px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body.phone-landscape-redesign .prediction-order-row .field-label {
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    font-size: 6.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
  body.phone-landscape-redesign .prediction-order-row .field-label::after { content: none !important; }
  body.phone-landscape-redesign .prediction-order-row input,
  body.phone-landscape-redesign .prediction-order-row select,
  body.phone-landscape-redesign #presetPercentSelect {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 23px !important;
    min-height: 23px !important;
    max-height: 23px !important;
    padding: 0 3px !important;
    font-size: 8px !important;
    line-height: 21px !important;
    border-radius: 5px !important;
  }

  /* Live chart replaces the former execution-log area. */
  body.phone-landscape-redesign .phone-auto-execution-slot {
    grid-area: chart !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-rows: 20px minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 126px !important;
    min-height: 126px !important;
    max-height: 126px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 1px solid rgba(91, 180, 220, .22) !important;
    border-radius: 5px !important;
    background: rgba(8, 18, 34, .72) !important;
  }
  body.phone-landscape-redesign .phone-auto-execution-slot .candle-title-row {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    margin: 0 !important;
    padding: 0 3px !important;
    overflow: hidden !important;
  }
  body.phone-landscape-redesign .phone-auto-execution-slot .candle-title-row .eyebrow {
    display: block !important;
    margin: 0 !important;
    font-size: 7.5px !important;
    line-height: 18px !important;
    white-space: nowrap !important;
  }
  body.phone-landscape-redesign .phone-auto-execution-slot .candle-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 3px !important;
    min-width: 0 !important;
  }
  body.phone-landscape-redesign .phone-auto-execution-slot .horizon-inline > span { display: none !important; }
  body.phone-landscape-redesign .phone-auto-execution-slot #horizonSelect,
  body.phone-landscape-redesign .phone-auto-execution-slot #refreshBtn {
    box-sizing: border-box !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    padding: 0 4px !important;
    font-size: 6.5px !important;
    line-height: 16px !important;
  }
  body.phone-landscape-redesign .phone-auto-execution-slot #candleCountdown {
    font-size: 6.5px !important;
    line-height: 18px !important;
    white-space: nowrap !important;
  }
  body.phone-landscape-redesign .phone-auto-execution-slot #tvChart,
  body.phone-landscape-redesign .phone-auto-execution-slot #sparkline {
    grid-row: 2 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 104px !important;
    min-height: 104px !important;
    max-height: 104px !important;
    margin: 0 !important;
  }
  body.phone-landscape-redesign .phone-auto-execution-slot #chartHoverInfo { display: none !important; }

  /* Prediction phone area compressed to the maximum while retaining all six rows. */
  body.phone-landscape-redesign .prediction-panel,
  body.phone-landscape-redesign #predictions.prediction-strip {
    grid-area: predictions !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 126px !important;
    min-height: 126px !important;
    max-height: 126px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  body.phone-landscape-redesign .prediction-mobile-list {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-rows: 8px repeat(6, 18.5px) !important;
    width: 100% !important;
    height: 126px !important;
    min-height: 126px !important;
    max-height: 126px !important;
    padding: 0 !important;
    gap: 1px !important;
    overflow: hidden !important;
  }
  body.phone-landscape-redesign .prediction-mobile-head,
  body.phone-landscape-redesign .prediction-mobile-row {
    grid-template-columns: minmax(82px, 1.22fr) minmax(52px, .72fr) minmax(42px, .54fr) minmax(38px, .48fr) minmax(46px, .57fr) !important;
    column-gap: 1px !important;
  }
  body.phone-landscape-redesign .prediction-mobile-head {
    height: 8px !important;
    min-height: 8px !important;
    max-height: 8px !important;
    font-size: 4.8px !important;
    line-height: 7px !important;
  }
  body.phone-landscape-redesign .prediction-mobile-row,
  body.phone-landscape-redesign .prediction-mobile-row.has-open-manual {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 18.5px !important;
    min-height: 18.5px !important;
    max-height: 18.5px !important;
  }
  body.phone-landscape-redesign .prediction-mobile-action-stack,
  body.phone-landscape-redesign .prediction-mobile-row .prediction-action-cell,
  body.phone-landscape-redesign .prediction-mobile-row > span,
  body.phone-landscape-redesign .prediction-mobile-action-stack .mobile-settle {
    height: 17.5px !important;
    min-height: 17.5px !important;
    max-height: 17.5px !important;
    padding: 0 2px !important;
  }
  body.phone-landscape-redesign .prediction-mobile-row .prediction-action-cell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content max-content !important;
    gap: 1px !important;
  }
  body.phone-landscape-redesign .prediction-mobile-row .pred-side { font-size: 8.5px !important; line-height: 16px !important; }
  body.phone-landscape-redesign .prediction-mobile-row .pred-minute,
  body.phone-landscape-redesign .prediction-mobile-row .pred-conf,
  body.phone-landscape-redesign .prediction-mobile-row > span em,
  body.phone-landscape-redesign .prediction-countdown-value {
    font-size: 5.7px !important;
    line-height: 16px !important;
  }
  body.phone-landscape-redesign .prediction-mobile-row > span { display: flex !important; align-items: center !important; justify-content: center !important; }
  body.phone-landscape-redesign .prediction-mobile-row > span b { display: none !important; }

  body.phone-landscape-redesign .phone-bottom-tabs {
    flex: 0 0 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
  body.phone-landscape-redesign .phone-tab-list { min-height: 22px !important; }
  body.phone-landscape-redesign .phone-bottom-tab {
    height: 21px !important;
    min-height: 21px !important;
    max-height: 21px !important;
    padding: 0 10px !important;
    font-size: 7.5px !important;
    line-height: 20px !important;
  }
  body.phone-landscape-redesign .phone-tab-panels {
    flex: 1 1 auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.phone-landscape-redesign .phone-tab-panels > [aria-hidden="true"] { display: none !important; }
  body.phone-landscape-redesign .phone-tab-panels > [aria-hidden="false"] {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: auto !important;
  }

  /* The former Trend panel now exposes the execution log after the chart is
     promoted to the upper workbench. */
  body.phone-landscape-redesign #phoneChartPanel.landscape-log-panel {
    padding: 2px 4px !important;
    background: var(--panel, #14243a) !important;
  }
  body.phone-landscape-redesign #phoneChartPanel.landscape-log-panel .chart-auto-execution-panel {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 3px !important;
  }
  body.phone-landscape-redesign #phoneChartPanel.landscape-log-panel .auto-output-box {
    height: calc(100% - 22px) !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    font-size: 8px !important;
    line-height: 1.25 !important;
  }
}

@media (orientation: landscape) and (max-height: 430px) and (max-width: 760px) {
  body.phone-landscape-redesign .demo-layout,
  body.phone-landscape-redesign .demo-layout .trade-card {
    flex-basis: 198px !important;
    height: 198px !important;
    min-height: 198px !important;
    max-height: 198px !important;
  }
  body.phone-landscape-redesign .trade-card .prediction-workbench {
    height: 149px !important;
    min-height: 149px !important;
    max-height: 149px !important;
    grid-template-rows: 26px minmax(0, 1fr) !important;
  }
  body.phone-landscape-redesign .phone-auto-execution-slot,
  body.phone-landscape-redesign .prediction-panel,
  body.phone-landscape-redesign #predictions.prediction-strip,
  body.phone-landscape-redesign .prediction-mobile-list {
    height: 121px !important;
    min-height: 121px !important;
    max-height: 121px !important;
  }
  body.phone-landscape-redesign .phone-auto-execution-slot #tvChart,
  body.phone-landscape-redesign .phone-auto-execution-slot #sparkline {
    height: 99px !important;
    min-height: 99px !important;
    max-height: 99px !important;
  }
  body.phone-landscape-redesign .prediction-mobile-list {
    grid-template-rows: 8px repeat(6, 17.7px) !important;
  }
  body.phone-landscape-redesign .prediction-mobile-row,
  body.phone-landscape-redesign .prediction-mobile-row.has-open-manual {
    height: 17.7px !important;
    min-height: 17.7px !important;
    max-height: 17.7px !important;
  }
  body.phone-landscape-redesign .prediction-mobile-action-stack,
  body.phone-landscape-redesign .prediction-mobile-row .prediction-action-cell,
  body.phone-landscape-redesign .prediction-mobile-row > span,
  body.phone-landscape-redesign .prediction-mobile-action-stack .mobile-settle {
    height: 16.7px !important;
    min-height: 16.7px !important;
    max-height: 16.7px !important;
  }
}

/* Final specificity guard for the phone-landscape redesign. The legacy file
   contains several older phone patches with deeper selectors; these rules
   intentionally win without changing portrait, tablet, or desktop layouts. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout.phone-landscape-redesign .demo-layout .trade-card {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 22px 24px minmax(0, 1fr) !important;
    grid-template-areas: "heading" "market" "workbench" !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-heading {
    grid-area: heading !important;
    width: 100% !important;
    min-width: 0 !important;
    left: 0 !important;
    top: 0 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row {
    grid-area: market !important;
    width: calc(100% - min(43vw, 330px)) !important;
    min-width: 0 !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    margin: -23px 0 0 !important;
    align-self: start !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row #symbolSelect {
    width: 100% !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench {
    grid-area: workbench !important;
    display: grid !important;
    grid-template-columns: minmax(0, 56%) minmax(0, 44%) !important;
    grid-template-rows: 28px minmax(0, 1fr) !important;
    grid-template-areas: "parameters parameters" "chart predictions" !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 156px !important;
    min-height: 156px !important;
    max-height: 156px !important;
    gap: 2px 3px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench .prediction-order-row {
    grid-area: parameters !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: 26px !important;
    width: min(66%, 540px) !important;
    min-width: 0 !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    gap: 3px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench .prediction-order-row > div {
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr) !important;
    grid-template-rows: 24px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench #phoneAutoExecutionSlot {
    grid-area: chart !important;
    display: grid !important;
    grid-template-rows: 20px minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 126px !important;
    min-height: 126px !important;
    max-height: 126px !important;
    flex: none !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench .prediction-panel {
    grid-area: predictions !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 126px !important;
    min-height: 126px !important;
    max-height: 126px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench #predictions.prediction-strip {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 126px !important;
    min-height: 126px !important;
    max-height: 126px !important;
  }
}
@media (orientation: landscape) and (max-height: 430px) and (max-width: 760px) {
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench {
    height: 149px !important;
    min-height: 149px !important;
    max-height: 149px !important;
    grid-template-rows: 26px minmax(0, 1fr) !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench #phoneAutoExecutionSlot,
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench .prediction-panel,
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench #predictions.prediction-strip {
    height: 121px !important;
    min-height: 121px !important;
    max-height: 121px !important;
  }
}
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row #symbolSelect {
    padding-top: 1px !important;
    padding-bottom: 1px !important;
    line-height: normal !important;
    vertical-align: middle !important;
  }
}
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-landscape-redesign .app-shell {
    padding-left: max(2px, env(safe-area-inset-left)) !important;
    padding-right: max(2px, env(safe-area-inset-right)) !important;
  }
}


/* ========================================================================== 
   DPX v0.5.1 TARGETED PATCH — compact phone portrait predictions
   and one-line phone-landscape symbol/entry controls.
   ========================================================================== */
@media (orientation: portrait) and (max-width: 600px) {
  body.phone-tab-layout .prediction-mobile-list {
    height: 121px !important;
    min-height: 121px !important;
    max-height: 121px !important;
    grid-template-rows: 9px repeat(6, 18px) !important;
    gap: 1px !important;
  }
  body.phone-tab-layout .prediction-mobile-head {
    height: 9px !important;
    min-height: 9px !important;
    max-height: 9px !important;
    font-size: 5.5px !important;
    line-height: 8px !important;
  }
  body.phone-tab-layout .prediction-mobile-row,
  body.phone-tab-layout .prediction-mobile-row.has-open-manual {
    box-sizing: border-box !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    padding: 1px !important;
    grid-template-columns: minmax(128px, 1.24fr) minmax(66px, .66fr) minmax(50px, .48fr) minmax(45px, .44fr) minmax(56px, .55fr) !important;
    align-items: center !important;
  }
  body.phone-tab-layout .prediction-mobile-action-stack,
  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell,
  body.phone-tab-layout .prediction-mobile-action-stack .mobile-settle {
    box-sizing: border-box !important;
    height: 15px !important;
    min-height: 15px !important;
    max-height: 15px !important;
    padding: 0 4px !important;
    border-radius: 3px !important;
  }
  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content max-content !important;
    gap: 2px !important;
    align-items: center !important;
  }
  body.phone-tab-layout .prediction-mobile-row .pred-side {
    font-size: 11.5px !important;
    line-height: 13px !important;
  }
  body.phone-tab-layout .prediction-mobile-row .pred-minute,
  body.phone-tab-layout .prediction-mobile-row .pred-conf {
    font-size: 7px !important;
    line-height: 13px !important;
  }
  body.phone-tab-layout .prediction-mobile-row > span {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    padding: 0 2px !important;
    grid-template-rows: none !important;
  }
  body.phone-tab-layout .prediction-mobile-row > span b {
    display: none !important;
  }
  body.phone-tab-layout .prediction-mobile-row > span em,
  body.phone-tab-layout .prediction-mobile-row .prediction-countdown-value {
    font-size: 9.5px !important;
    line-height: 15px !important;
    font-weight: 800 !important;
  }
  body.phone-tab-layout .prediction-panel,
  body.phone-tab-layout #predictions.prediction-strip {
    height: 121px !important;
    min-height: 121px !important;
    max-height: 121px !important;
  }
  body.phone-tab-layout .demo-layout,
  body.phone-tab-layout .demo-layout .trade-card {
    height: auto !important;
    min-height: 0 !important;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout.phone-landscape-redesign .demo-layout .trade-card {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 22px 30px minmax(0, 1fr) !important;
    grid-template-areas: "heading" "market" "workbench" !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row {
    grid-area: market !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(150px, 1.45fr) minmax(0, 3.55fr) !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 4px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-symbol-control {
    display: grid !important;
    grid-template-rows: 8px 21px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    gap: 0 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-symbol-control .field-label {
    display: block !important;
    height: 8px !important;
    min-height: 8px !important;
    max-height: 8px !important;
    margin: 0 !important;
    padding: 0 2px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-size: 6px !important;
    line-height: 8px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row #symbolSelect {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 21px !important;
    min-height: 21px !important;
    max-height: 21px !important;
    padding: 0 18px 0 5px !important;
    font-size: 8px !important;
    line-height: 19px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row > .prediction-order-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: 29px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 3px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row > .prediction-order-row > div {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 8px 21px !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row > .prediction-order-row .field-label {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 8px !important;
    min-height: 8px !important;
    max-height: 8px !important;
    margin: 0 !important;
    padding: 0 1px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-size: 5.8px !important;
    line-height: 8px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row > .prediction-order-row input,
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row > .prediction-order-row select {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 21px !important;
    min-height: 21px !important;
    max-height: 21px !important;
    margin: 0 !important;
    padding: 0 4px !important;
    font-size: 8px !important;
    line-height: 19px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench {
    grid-area: workbench !important;
    grid-template-columns: minmax(0, 56%) minmax(0, 44%) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    grid-template-areas: "chart predictions" !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 151px !important;
    min-height: 151px !important;
    max-height: 151px !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 2px 3px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench > .prediction-order-row {
    display: none !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench #phoneAutoExecutionSlot,
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench .prediction-panel,
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench #predictions.prediction-strip {
    height: 151px !important;
    min-height: 151px !important;
    max-height: 151px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench #phoneAutoExecutionSlot {
    grid-template-rows: 20px minmax(0, 1fr) !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench #phoneAutoExecutionSlot #tvChart,
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench #phoneAutoExecutionSlot #sparkline {
    height: 129px !important;
    min-height: 129px !important;
    max-height: 129px !important;
  }
}

@media (orientation: landscape) and (max-height: 430px) and (max-width: 760px) {
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench,
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench #phoneAutoExecutionSlot,
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench .prediction-panel,
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench #predictions.prediction-strip {
    height: 144px !important;
    min-height: 144px !important;
    max-height: 144px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench #phoneAutoExecutionSlot #tvChart,
  body.phone-tab-layout.phone-landscape-redesign .trade-card .prediction-workbench #phoneAutoExecutionSlot #sparkline {
    height: 122px !important;
    min-height: 122px !important;
    max-height: 122px !important;
  }
}

/* Correct inherited named grid-area from the former workbench placement after
   moving the parameter row beside the symbol in phone landscape. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row > .trade-symbol-control {
    grid-column: 1 !important;
    grid-row: 1 !important;
    grid-area: auto !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row > .prediction-order-row {
    grid-column: 2 !important;
    grid-row: 1 !important;
    grid-area: auto !important;
    align-self: stretch !important;
  }
}
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row > .trade-symbol-control {
    grid-area: 1 / 1 / 2 / 2 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .trade-card .trade-market-row > .prediction-order-row {
    grid-area: 1 / 2 / 2 / 3 !important;
  }
}

/* ========================================================================== 
   DPX v0.5.1 PHONE-LANDSCAPE TAB-STAGE PATCH
   Current patch only: one compact top row, fixed predictions, and tab content
   displayed in the former chart/log workspace.
   ========================================================================== */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .app-shell {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 1px 2px max(1px, env(safe-area-inset-bottom)) !important;
    gap: 1px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .hero {
    flex: 0 0 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    padding: 0 4px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .brand-block h1 { font-size: 14px !important; line-height: 20px !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .hero .status-box {
    height: 19px !important;
    min-height: 19px !important;
    max-height: 19px !important;
    padding: 0 4px !important;
    font-size: 7.5px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .hero .status-box small,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .hero-market-slot { display: none !important; }

  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .session-bar {
    flex: 0 0 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    padding: 0 4px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #sessionAccountSlot .account-menu-btn {
    box-sizing: border-box !important;
    width: auto !important;
    max-width: min(52vw, 350px) !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    padding: 0 4px !important;
    gap: 2px !important;
    font-size: 8.5px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #sessionAccountSlot .account-menu-btn .avatar-dot,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #sessionAccountSlot .account-menu-btn .account-avatar-image,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #sessionAccountSlot .account-menu-btn .avatar-fallback {
    box-sizing: border-box !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    max-width: 14px !important;
    font-size: 10px !important;
    line-height: 14px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #sessionAccountSlot .account-menu-btn span:nth-child(2) {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .session-balance-slot .balance-row { font-size: 9px !important; line-height: 19px !important; }

  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .demo-layout {
    flex: 1 1 auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .demo-layout > #phoneChartPanel { display: none !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .demo-layout .trade-card {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 28px minmax(0, 1fr) 21px !important;
    grid-template-areas: "topbar" "workbench" "tabs" !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 1px 3px !important;
    gap: 1px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card > .trade-heading,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card > .trade-market-row { display: none !important; }

  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar {
    grid-area: topbar !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(135px, 1.35fr) minmax(260px, 2.7fr) max-content !important;
    align-items: end !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    gap: 3px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar .trade-symbol-control {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-rows: 7px 20px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 27px !important;
    gap: 0 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar .trade-symbol-control .field-label,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar .prediction-order-row .field-label {
    display: block !important;
    box-sizing: border-box !important;
    height: 7px !important;
    min-height: 7px !important;
    max-height: 7px !important;
    margin: 0 !important;
    padding: 0 1px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-size: 5.5px !important;
    line-height: 7px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar #symbolSelect {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    padding: 0 17px 0 4px !important;
    font-size: 7.5px !important;
    line-height: 18px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar .prediction-order-row {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: 27px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 27px !important;
    min-height: 27px !important;
    max-height: 27px !important;
    gap: 2px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar .prediction-order-row > div {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 7px 20px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 27px !important;
    min-height: 27px !important;
    max-height: 27px !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar .prediction-order-row input,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar .prediction-order-row select {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    padding: 0 3px !important;
    font-size: 7.5px !important;
    line-height: 18px !important;
    border-radius: 4px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar .trade-title-status {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    gap: 2px !important;
    height: 27px !important;
    min-width: 0 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar .trade-title-status .eyebrow { display: none !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar #autoStatusPill,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar #autoRunToggleBtn {
    box-sizing: border-box !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    padding: 0 5px !important;
    font-size: 7px !important;
    line-height: 18px !important;
    white-space: nowrap !important;
  }

  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench {
    grid-area: workbench !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 58%) minmax(0, 42%) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    grid-template-areas: "stage predictions" !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 3px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench > .prediction-order-row,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .phone-auto-execution-slot { display: none !important; }

  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .phone-tab-panels {
    grid-area: stage !important;
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
    border: 1px solid rgba(91, 180, 220, .24) !important;
    border-radius: 4px !important;
    background: rgba(8, 18, 34, .72) !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .phone-tab-panels > [aria-hidden="true"] { display: none !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .phone-tab-panels > [aria-hidden="false"] {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 2px !important;
    overflow: auto !important;
  }

  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel[aria-hidden="false"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 18px minmax(0, 1fr) 44px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel .candle-title-row {
    grid-row: 1 !important;
    box-sizing: border-box !important;
    display: flex !important;
    width: 100% !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    margin: 0 !important;
    padding: 0 2px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel .candle-title-row .eyebrow { font-size: 6.5px !important; line-height: 16px !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel .candle-toolbar { gap: 2px !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel .horizon-inline > span { display: none !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel #horizonSelect,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel #refreshBtn {
    height: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    padding: 0 3px !important;
    font-size: 6px !important;
    line-height: 14px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel #candleCountdown { font-size: 6px !important; line-height: 16px !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel #tvChart,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel #sparkline {
    grid-row: 2 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 42px !important;
    max-height: none !important;
    margin: 0 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel #chartHoverInfo { display: none !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel .chart-auto-execution-panel {
    grid-row: 3 !important;
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    padding: 2px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel .log-panel-header {
    min-height: 13px !important;
    height: 13px !important;
    font-size: 6.5px !important;
    line-height: 12px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel .log-actions button {
    height: 12px !important;
    min-height: 12px !important;
    padding: 0 3px !important;
    font-size: 5.5px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneChartPanel .auto-output-box {
    height: 27px !important;
    min-height: 27px !important;
    max-height: 27px !important;
    overflow-y: auto !important;
    font-size: 6.5px !important;
    line-height: 1.15 !important;
  }

  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneHistoryPanel[aria-hidden="false"] { overflow: hidden !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneHistoryPanel .ledger-header {
    flex: 0 0 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    padding: 0 2px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneHistoryPanel .ledger-title-line .eyebrow,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneHistoryPanel .daily-pnl-totals { font-size: 6.5px !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneHistoryPanel .toolbar button {
    height: 17px !important;
    min-height: 17px !important;
    padding: 0 3px !important;
    font-size: 5.5px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #phoneHistoryPanel #ledgerTableWrap {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
  }

  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .phone-auto-panel[aria-hidden="false"] {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .phone-auto-panel .auto-rule-details {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-panel,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage #predictions.prediction-strip {
    grid-area: predictions !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-list {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-rows: 9px repeat(6, minmax(0, 1fr)) !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    padding: 0 !important;
    gap: 1px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-head,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-row {
    grid-template-columns: minmax(76px, 1.18fr) minmax(49px, .72fr) minmax(40px, .55fr) minmax(38px, .51fr) minmax(46px, .61fr) !important;
    column-gap: 1px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-head {
    height: 9px !important;
    min-height: 9px !important;
    max-height: 9px !important;
    font-size: 5px !important;
    line-height: 8px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-row,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-row.has-open-manual {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-action-stack,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-row .prediction-action-cell,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-row > span,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-action-stack .mobile-settle {
    box-sizing: border-box !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 2px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-row .pred-side { font-size: 9px !important; line-height: 1 !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-row .pred-minute,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-row .pred-conf { font-size: 6.2px !important; line-height: 1 !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-row > span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-row > span b { display: none !important; }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-row > span em,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-countdown-value {
    font-size: 7.2px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
  }

  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card > .phone-bottom-tabs {
    grid-area: tabs !important;
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 21px !important;
    min-height: 21px !important;
    max-height: 21px !important;
    margin: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .phone-tab-list {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 21px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .phone-bottom-tab {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    padding: 0 3px !important;
    font-size: 7.5px !important;
    line-height: 19px !important;
  }
}

@media (orientation: landscape) and (max-height: 410px) and (max-width: 760px) {
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar {
    grid-template-columns: minmax(115px, 1.2fr) minmax(235px, 2.6fr) max-content !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar #autoStatusPill,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar #autoRunToggleBtn {
    padding-inline: 4px !important;
    font-size: 6.5px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench {
    grid-template-columns: minmax(0, 56%) minmax(0, 44%) !important;
  }
}


@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .demo-layout .trade-card {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 28px minmax(0, 1fr) 21px !important;
    grid-template-areas: "topbar" "workbench" "tabs" !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar {
    grid-area: topbar !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar > .trade-symbol-control,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar > .prediction-order-row,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar > .trade-title-status {
    grid-area: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    align-self: end !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench {
    grid-template-columns: minmax(0, 58%) minmax(0, 42%) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    grid-template-areas: "stage predictions" !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench > .phone-tab-panels {
    grid-area: stage !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench > .prediction-panel {
    grid-area: predictions !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card > .phone-bottom-tabs {
    grid-area: tabs !important;
  }
}

/* Final containment for the phone-landscape tab stage. Explicit grid lines
   prevent inherited legacy named areas from creating hidden implicit rows. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar > .trade-symbol-control {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar > .prediction-order-row {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .landscape-trade-topbar > .trade-title-status {
    grid-column: 3 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench {
    grid-template-columns: minmax(0, 58%) minmax(0, 42%) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    grid-auto-columns: 0 !important;
    grid-auto-rows: 0 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench > #phoneAutoExecutionSlot {
    display: none !important;
    grid-area: auto !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench > .phone-tab-panels {
    grid-area: 1 / 1 / 2 / 2 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: stretch !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench > .prediction-panel {
    grid-area: 1 / 2 / 2 / 3 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: stretch !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench > .prediction-panel > #predictions.prediction-strip,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench > .prediction-panel .prediction-mobile-list {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-mobile-row > span em,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .prediction-countdown-value {
    font-size: 7.8px !important;
  }
}

/* ========================================================================== 
   DPX v0.5.1 SAME-NAME PATCH — requested phone-landscape readability only
   - Enlarge and shift the 1M / confidence text inside prediction buttons.
   - Enlarge prediction price/value text slightly.
   - Reveal the complete first scrollable Historical Orders price column.
   ========================================================================== */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .prediction-action-cell {
    grid-template-columns: minmax(0, 1fr) 23px 27px !important;
    column-gap: 1px !important;
    justify-items: start !important;
    padding: 0 1px 0 2px !important;
  }

  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-minute,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-conf {
    font-size: 8px !important;
    line-height: 1 !important;
    text-align: left !important;
    transform: translateX(-2px) !important;
  }

  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row > span em,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-countdown-value {
    font-size: 8.6px !important;
    line-height: 1 !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
  }

  /* Reduce only the three fixed phone-landscape columns so the first
     scrollable price column begins fully inside the visible ledger stage. */
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-tradeCount {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-side {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-entryExit,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .entry-exit-cell {
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-origAdjSl,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .orig-adj-sl-cell {
    width: 128px !important;
    min-width: 128px !important;
    max-width: 128px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-origAdjTarget,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .orig-adj-target-cell {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTableWrap {
    scroll-padding-inline-start: 184px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-stack-line em,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .stack-value,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .risk-value-stack span {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
}

/* ========================================================================== 
   DPX v0.5.1 SAME-NAME PATCH — 2026-07-16 20:13
   Phone-landscape readability corrections requested from Galaxy A10 photo:
   - prevent PUT from covering the timeframe/confidence;
   - enlarge prediction prices;
   - enlarge phone-landscape tab labels;
   - give the Historical stage enough width for the next scrollable columns;
   - allow the final ledger columns to scroll fully clear of the sticky columns.
   ========================================================================== */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  /* Give Historical/other tab content more room while retaining a complete
     prediction area on 720px-wide Galaxy A10 landscape screens. */
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .trade-card .prediction-workbench {
    grid-template-columns: minmax(0, 63%) minmax(0, 37%) !important;
  }

  /* Keep PUT/CALL, timeframe and confidence in separate visible cells. */
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .prediction-action-cell {
    grid-template-columns: minmax(30px, 1fr) 24px 29px !important;
    column-gap: 1px !important;
    padding: 0 1px 0 2px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-side {
    min-width: 0 !important;
    padding-right: 1px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-minute,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-conf {
    font-size: 8.5px !important;
    line-height: 1 !important;
    justify-self: center !important;
    text-align: center !important;
    transform: translateX(2px) !important;
  }

  /* Slightly larger numeric values in the prediction price area. */
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row > span em,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-countdown-value {
    font-size: 9.4px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    letter-spacing: -0.02em !important;
    white-space: nowrap !important;
  }

  /* Larger labels for Historical, Trend, Entry, Adjust and Setting. */
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .phone-bottom-tab {
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
  }

  /* Compact the first three scrollable ledger columns so Orig/Adj SL,
     Orig/Adj Target and Created/Settled can be exposed without collision. */
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-origAdjSl,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .orig-adj-sl-cell {
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-origAdjTarget,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .orig-adj-target-cell {
    width: 94px !important;
    min-width: 94px !important;
    max-width: 94px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-createdSettled,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .created-settled-cell {
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
  }

  /* Extra trailing scroll space lets every later Historical column move fully
     into the non-sticky viewport instead of remaining underneath the locked
     Count, Side and Entry/Exit columns. */
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTable {
    margin-right: 184px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTableWrap {
    scroll-padding-inline-start: 184px !important;
    scroll-padding-inline-end: 184px !important;
    overscroll-behavior-inline: contain !important;
  }
}

/* ========================================================================== 
   DPX v0.5.1 SAME-NAME PATCH — 2026-07-16 20:28
   Targeted Galaxy A10 / phone-landscape corrections:
   - prevent Historical Orders values from spilling into adjacent columns;
   - keep the first three Historical columns frozen with opaque backgrounds;
   - keep Settle + CALL/PUT + timeframe + confidence fully visible;
   - enlarge the compact entry-field labels.
   ========================================================================== */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  /* Slightly more room for Historical while retaining the complete prediction area. */
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .trade-card .prediction-workbench {
    grid-template-columns: minmax(0, 64%) minmax(0, 36%) !important;
  }

  /* Entry labels were too small on the real Galaxy A10. */
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .landscape-trade-topbar .trade-symbol-control .field-label,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .landscape-trade-topbar .prediction-order-row .field-label {
    height: 8px !important;
    min-height: 8px !important;
    max-height: 8px !important;
    font-size: 6.7px !important;
    line-height: 8px !important;
    font-weight: 800 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .landscape-trade-topbar .trade-symbol-control,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .landscape-trade-topbar .prediction-order-row > div {
    grid-template-rows: 8px 19px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .landscape-trade-topbar #symbolSelect,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .landscape-trade-topbar .prediction-order-row input,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .landscape-trade-topbar .prediction-order-row select {
    height: 19px !important;
    min-height: 19px !important;
    max-height: 19px !important;
    line-height: 17px !important;
  }

  /* Open manual row: reserve a small fixed Settle cell and leave enough width
     for CALL/PUT, 1M and 94% inside the prediction button. */
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row.has-open-manual .prediction-mobile-action-stack {
    grid-template-columns: 24px minmax(0, 1fr) !important;
    grid-template-rows: 1fr !important;
    gap: 1px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-action-stack .mobile-settle {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    padding: 0 1px !important;
    font-size: 5.6px !important;
    line-height: 1 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row.has-open-manual .prediction-action-cell,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row:not(.has-open-manual) .prediction-action-cell {
    grid-template-columns: minmax(25px, 1fr) 23px 28px !important;
    column-gap: 1px !important;
    padding: 0 1px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-side {
    min-width: 0 !important;
    font-size: 8.7px !important;
    text-align: left !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-minute,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-conf {
    font-size: 8.4px !important;
    line-height: 1 !important;
    text-align: center !important;
    transform: none !important;
    overflow: visible !important;
  }

  /* Historical table: fixed columns must fully cover anything scrolling under
     them; all scrollable values must remain inside their own cells. */
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTable {
    table-layout: fixed !important;
    margin-right: 220px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTable th,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTable td {
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTable .sticky-col {
    position: sticky !important;
    background: #1d2d43 !important;
    box-shadow: 1px 0 0 rgba(255,255,255,.12) !important;
    z-index: 8 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTable thead .sticky-col {
    background: #20324a !important;
    z-index: 14 !important;
  }

  /* Compact, non-overlapping widths. */
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-tradeCount {
    width: 58px !important; min-width: 58px !important; max-width: 58px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-side {
    width: 36px !important; min-width: 36px !important; max-width: 36px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-entryExit,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .entry-exit-cell {
    width: 86px !important; min-width: 86px !important; max-width: 86px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-origAdjSl,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .orig-adj-sl-cell {
    width: 116px !important; min-width: 116px !important; max-width: 116px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-origAdjTarget,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .orig-adj-target-cell {
    width: 122px !important; min-width: 122px !important; max-width: 122px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .ledger-col-createdSettled,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #ledgerTable .created-settled-cell {
    width: 104px !important; min-width: 104px !important; max-width: 104px !important;
  }

  /* Values may wrap within a cell, but can never bleed into the next column. */
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTable .ledger-stack-line {
    grid-template-columns: 22px minmax(0, 1fr) !important;
    gap: 1px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTable .ledger-stack-line b {
    font-size: 6.2px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTable .ledger-stack-line em,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTable .stack-value,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTable .risk-value-stack span {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    font-size: 6.8px !important;
    line-height: 1.02 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTable th {
    white-space: normal !important;
    line-height: 1.05 !important;
    font-size: 6.7px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTable td {
    height: 42px !important;
    padding: 2px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  #phoneHistoryPanel #ledgerTableWrap {
    scroll-padding-inline-start: 180px !important;
    scroll-padding-inline-end: 220px !important;
  }
}

/* Final refinement for an OPEN manual prediction row: keep Settle on its own
   compact line so it never consumes the horizontal space needed by 1M / 94%. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row.has-open-manual .prediction-mobile-action-stack {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 9px minmax(0, 1fr) !important;
    gap: 1px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row.has-open-manual .prediction-mobile-action-stack .mobile-settle {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    width: 31px !important;
    min-width: 31px !important;
    max-width: 31px !important;
    height: 9px !important;
    min-height: 9px !important;
    max-height: 9px !important;
    padding: 0 1px !important;
    font-size: 5.4px !important;
    line-height: 8px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row.has-open-manual .prediction-action-cell {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(24px, 1fr) 20px 25px !important;
    column-gap: 1px !important;
    padding: 0 1px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row:not(.has-open-manual) .prediction-action-cell {
    grid-template-columns: minmax(24px, 1fr) 20px 25px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-minute,
  body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-conf {
    font-size: 8px !important;
  }
}

/* ========================================================================== 
   DPX v0.5.2 FINAL PATCH — responsive history and enlarged phone workspace.
   ========================================================================== */
.dpx-admin-config-note { margin-top: 8px; font-size: 12px; color: #526174; line-height: 1.4; }
#effectiveTradeSettings { font-size: 11px; font-weight: 700; color: #42546b; white-space: nowrap; }
.account-menu .account-menu-group { margin-top: 5px; padding-top: 7px; border-top: 1px solid rgba(95,112,132,.22); }

@media (max-width: 900px) {
  body.phone-tab-layout .trade-card { min-height: calc(var(--dpx-vh, 100vh) - 118px) !important; }
  body.phone-tab-layout .trade-card .prediction-workbench { min-height: 0 !important; }
  body.phone-tab-layout .prediction-panel { flex: 1 1 auto !important; min-height: 220px !important; }
  body.phone-tab-layout .prediction-mobile-list { min-height: 205px !important; align-content: stretch !important; }
  body.phone-tab-layout .prediction-mobile-row { min-height: 38px !important; }
  body.phone-tab-layout .prediction-mobile-row .prediction-action-cell { min-height: 35px !important; height: 35px !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-side { font-size: 15px !important; }
  body.phone-tab-layout .prediction-mobile-row .pred-minute,
  body.phone-tab-layout .prediction-mobile-row .pred-conf { font-size: 10px !important; }
  body.phone-tab-layout .trade-symbol-control .select-input { font-size: 12px !important; }
  body.phone-tab-layout #effectiveTradeSettings { display: block !important; font-size: 9px !important; line-height: 1.15 !important; overflow: hidden !important; text-overflow: ellipsis !important; }

  body.dpx-phone-ledger-user #ledgerTableWrap,
  body.dpx-phone-ledger-user #ledgerTableWrap.no-h-scroll {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-height: min(48vh, 360px) !important;
    scrollbar-width: thin !important;
  }
  body.dpx-phone-ledger-user #ledgerTable {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }
  body.dpx-phone-ledger-user #ledgerTable .sticky-col { position: static !important; left: auto !important; box-shadow: none !important; }
  body.dpx-phone-ledger-user #ledgerTable th,
  body.dpx-phone-ledger-user #ledgerTable td {
    min-width: 0 !important;
    max-width: none !important;
    padding: 3px 2px !important;
    font-size: 7.6px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    vertical-align: middle !important;
  }
  body.dpx-phone-ledger-user #ledgerTable th { font-size: 7px !important; }
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-phoneTrade { width: 13% !important; }
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-phoneInOut { width: 19% !important; }
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-phoneTargetSl { width: 22% !important; }
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-phoneMadeDone { width: 19% !important; }
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-pnl { width: 11% !important; }
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-closeReason { width: 16% !important; }
  body.dpx-phone-ledger-user #ledgerTable .ledger-stack-line,
  body.dpx-phone-ledger-user #ledgerTable .risk-value-stack,
  body.dpx-phone-ledger-user #ledgerTable .phone-ledger-stack {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    gap: 1px !important;
    white-space: normal !important;
  }
  body.dpx-phone-ledger-user #ledgerTable .reason-cell { overflow: hidden !important; text-overflow: ellipsis !important; }

  body.dpx-phone-ledger-admin #ledgerTableWrap,
  body.dpx-phone-ledger-admin #ledgerTableWrap.no-h-scroll {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    max-height: min(48vh, 360px) !important;
    -webkit-overflow-scrolling: touch !important;
  }
  body.dpx-phone-ledger-admin #ledgerTable { min-width: 1380px !important; width: max-content !important; table-layout: auto !important; }
  body.dpx-phone-ledger-admin #ledgerTable th,
  body.dpx-phone-ledger-admin #ledgerTable td { font-size: 8px !important; padding: 4px 5px !important; white-space: nowrap !important; }
  body.dpx-phone-ledger-admin #ledgerTable .ledger-col-phoneTrade.sticky-col {
    position: sticky !important;
    left: 0 !important;
    z-index: 8 !important;
    min-width: 64px !important;
    width: 64px !important;
    background: #fff !important;
    box-shadow: 2px 0 4px rgba(30,45,65,.18) !important;
  }
  body.dpx-phone-ledger-admin #ledgerTable thead .ledger-col-phoneTrade.sticky-col { z-index: 12 !important; }
  .phone-ledger-stack { display: flex; flex-direction: column; gap: 2px; }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout.phone-landscape-redesign .trade-card { min-height: calc(var(--dpx-vh, 100vh) - 76px) !important; }
  body.phone-tab-layout.phone-landscape-redesign .prediction-panel { min-height: 0 !important; height: 100% !important; }
  body.phone-tab-layout.phone-landscape-redesign .prediction-mobile-list { min-height: 0 !important; }
  body.phone-tab-layout.phone-landscape-redesign #phoneHistoryPanel #ledgerTableWrap { max-height: calc(var(--dpx-vh, 100vh) - 168px) !important; }
}

/* v0.5.2 phone normal-user ledger: override all legacy phone min-width rules. */
@media (max-width: 900px) {
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user #ledgerTable,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user #ledgerTableWrap table {
    display: table !important;
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user #ledgerTable th,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user #ledgerTable td {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 3px 1px !important;
    font-size: 7.2px !important;
    line-height: 1.02 !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user #ledgerTable .ledger-col-phoneTrade { width: 13% !important; min-width: 0 !important; max-width: none !important; }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user #ledgerTable .ledger-col-phoneInOut { width: 19% !important; min-width: 0 !important; max-width: none !important; }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user #ledgerTable .ledger-col-phoneTargetSl { width: 22% !important; min-width: 0 !important; max-width: none !important; }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user #ledgerTable .ledger-col-phoneMadeDone { width: 19% !important; min-width: 0 !important; max-width: none !important; }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user #ledgerTable .ledger-col-pnl { width: 11% !important; min-width: 0 !important; max-width: none !important; }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user #ledgerTable .ledger-col-closeReason,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user #ledgerTable .reason-cell { width: 16% !important; min-width: 0 !important; max-width: none !important; }
}

/* ========================================================================== 
   DPX v0.5.2 VERIFIED RESPONSIVE CORRECTIONS
   These rules are intentionally last so the approved v0.5.2 phone/desktop
   acceptance layout wins over older compatibility rules.
   ========================================================================== */

/* Patch 13: longer minute labels must stay inside their button and must never
   collide with the applied Fee / SL / Daily limit line. */
.trade-card .prediction-workbench {
  grid-template-columns: minmax(150px, 160px) minmax(0, 1fr) !important;
  column-gap: 12px !important;
}
.trade-card .prediction-workbench .prediction-order-row {
  min-width: 0 !important;
  overflow: hidden !important;
}
.trade-card .prediction-table-layout {
  grid-template-columns: minmax(205px, 1.05fr) minmax(92px, .54fr) minmax(58px, .30fr) minmax(54px, .28fr) minmax(66px, .34fr) !important;
  column-gap: 8px !important;
}
.trade-card .prediction-action-cell {
  grid-template-columns: minmax(62px, 1fr) minmax(46px, .72fr) minmax(42px, .62fr) !important;
  gap: 4px !important;
  padding-left: 9px !important;
  padding-right: 9px !important;
  overflow: hidden !important;
}
.trade-card .prediction-action-cell .pred-side,
.trade-card .prediction-action-cell .pred-minute,
.trade-card .prediction-action-cell .pred-conf {
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}
#effectiveTradeSettings {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  color: #9fb0c4 !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: normal !important;
}

/* Tablets keep the approved laptop structure, but the narrow right card uses
   its full width instead of allowing the prediction grid to spill outside. */
@media (min-width: 601px) and (max-width: 900px) and (min-height: 601px) {
  body.desktop-tab-layout .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "order" "predictions" !important;
    gap: 5px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout .trade-card .prediction-order-row {
    grid-area: order !important;
    display: grid !important;
    grid-template-columns: 94px minmax(0, 1fr) !important;
    align-items: end !important;
    gap: 8px !important;
    width: 100% !important;
  }
  body.desktop-tab-layout .trade-card .prediction-order-row .preset-field { min-width: 0 !important; }
  body.desktop-tab-layout .trade-card #effectiveTradeSettings {
    align-self: end !important;
    font-size: 8px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }
  body.desktop-tab-layout .trade-card .prediction-panel {
    grid-area: predictions !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 4px !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout .trade-card .prediction-table-layout {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: minmax(144px, 1.12fr) minmax(68px, .55fr) minmax(46px, .37fr) minmax(44px, .35fr) minmax(56px, .44fr) !important;
    column-gap: 3px !important;
    row-gap: 3px !important;
  }
  body.desktop-tab-layout .trade-card .prediction-action-cell {
    grid-template-columns: minmax(48px,1fr) minmax(38px,.72fr) minmax(34px,.62fr) !important;
    gap: 2px !important;
    padding: 3px 5px !important;
  }
  body.desktop-tab-layout .trade-card .pred-side { font-size: 11px !important; }
  body.desktop-tab-layout .trade-card .pred-minute,
  body.desktop-tab-layout .trade-card .pred-conf { font-size: 8px !important; }
  body.desktop-tab-layout .trade-card .prediction-info-cell,
  body.desktop-tab-layout .trade-card .prediction-table-head { font-size: 8px !important; }
}

/* Phone header: give the normal-user selector as much width as possible while
   reserving an explicit non-overlapping balance column. */
@media (max-width: 600px) {
  body.phone-tab-layout .session-bar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 4px !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
  body.phone-tab-layout .session-account-slot,
  body.phone-tab-layout .session-account-slot .account-bar,
  body.phone-tab-layout .session-account-slot .account-menu-wrap {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  body.phone-tab-layout #accountMenuBtn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding-left: 4px !important;
    padding-right: 5px !important;
    gap: 4px !important;
  }
  body.phone-tab-layout #accountMenuBtn > span:nth-child(2) {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    font-size: 9.5px !important;
    letter-spacing: -.18px !important;
  }
  body.phone-tab-layout .session-balance-slot {
    min-width: 145px !important;
    max-width: 145px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .session-balance-slot .balance-row {
    justify-content: flex-end !important;
    white-space: nowrap !important;
    font-size: 9px !important;
  }
}

/* Patch 15 and the approved follow-up screenshots: portrait uses the full width
   for execution logs, then six readable prediction rows, with no dead blank area. */
@media (max-width: 600px) and (orientation: portrait) {
  body.phone-tab-layout .demo-layout,
  body.phone-tab-layout .demo-layout .trade-card,
  body.phone-tab-layout .trade-card {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  body.phone-tab-layout .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "order"
      "execution"
      "predictions" !important;
    gap: 3px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-top: 2px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .trade-card .prediction-order-row {
    grid-area: order !important;
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    align-items: end !important;
    gap: 5px !important;
    min-height: 29px !important;
    height: 29px !important;
    max-height: 29px !important;
    padding: 0 2px !important;
    overflow: visible !important;
  }
  body.phone-tab-layout .trade-card .prediction-order-row .preset-field {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
  }
  body.phone-tab-layout .trade-card .prediction-order-row .field-label {
    font-size: 5.5px !important;
    line-height: 7px !important;
    white-space: nowrap !important;
  }
  body.phone-tab-layout .trade-card #presetPercentSelect {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    font-size: 8px !important;
    padding: 0 3px !important;
  }
  body.phone-tab-layout .trade-card #effectiveTradeSettings {
    align-self: end !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 20px !important;
    min-height: 20px !important;
    line-height: 20px !important;
    font-size: 8px !important;
    letter-spacing: -.12px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    color: #9fb0c4 !important;
  }
  body.phone-tab-layout .trade-card #phoneAutoExecutionSlot {
    grid-area: execution !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .trade-card #phoneAutoExecutionSlot .chart-auto-execution-panel {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    margin: 0 !important;
    padding: 2px 4px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .trade-card #phoneAutoExecutionSlot .log-panel-header {
    min-height: 15px !important;
    height: 15px !important;
    max-height: 15px !important;
    font-size: 7px !important;
  }
  body.phone-tab-layout .trade-card #phoneAutoExecutionSlot .auto-output-box {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 2px 4px !important;
    font-size: 7.3px !important;
    line-height: 1.18 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    white-space: pre-wrap !important;
  }
  body.phone-tab-layout .trade-card .prediction-panel {
    grid-area: predictions !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 146px !important;
    min-height: 146px !important;
    max-height: 146px !important;
    padding: 0 2px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .trade-card .prediction-mobile-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: repeat(6, 23px) !important;
    gap: 1px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 143px !important;
    min-height: 143px !important;
    max-height: 143px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .trade-card .prediction-mobile-row,
  body.phone-tab-layout .trade-card .prediction-mobile-row.has-open-manual {
    display: grid !important;
    grid-template-columns: minmax(128px, 1.42fr) minmax(68px, .72fr) minmax(57px, .61fr) minmax(48px, .52fr) minmax(57px, .61fr) !important;
    gap: 1px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 23px !important;
    min-height: 23px !important;
    max-height: 23px !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .trade-card .prediction-mobile-action-stack,
  body.phone-tab-layout .trade-card .prediction-mobile-row .prediction-action-cell {
    width: 100% !important;
    min-width: 0 !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
  }
  body.phone-tab-layout .trade-card .prediction-mobile-row .prediction-action-cell {
    display: grid !important;
    grid-template-columns: minmax(42px, 1fr) minmax(43px, .82fr) minmax(34px, .66fr) !important;
    gap: 1px !important;
    padding: 0 4px !important;
    border-radius: 3px !important;
  }
  body.phone-tab-layout .trade-card .prediction-mobile-row .pred-side {
    font-size: 11.5px !important;
    letter-spacing: .02em !important;
  }
  body.phone-tab-layout .trade-card .prediction-mobile-row .pred-minute {
    font-size: 7.5px !important;
    letter-spacing: -.1px !important;
  }
  body.phone-tab-layout .trade-card .prediction-mobile-row .pred-conf {
    font-size: 8.5px !important;
    letter-spacing: -.1px !important;
  }
  body.phone-tab-layout .trade-card .prediction-mobile-row > span {
    box-sizing: border-box !important;
    min-width: 0 !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    padding: 0 2px !important;
    grid-template-rows: 7px 14px !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout .trade-card .prediction-mobile-row > span b {
    font-size: 5px !important;
    line-height: 7px !important;
  }
  body.phone-tab-layout .trade-card .prediction-mobile-row > span em,
  body.phone-tab-layout .trade-card .prediction-countdown-value {
    font-size: 7.4px !important;
    line-height: 14px !important;
    white-space: nowrap !important;
  }
}

/* Patch 8: normal-user phone history is a six-column, no-horizontal-scroll
   table. Each cell has explicit compact lines so values cannot overlap. */
@media (max-width: 600px) {
  body.dpx-phone-ledger-user #ledgerTableWrap,
  body.dpx-phone-ledger-user #ledgerTableWrap.no-h-scroll {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  body.dpx-phone-ledger-user #ledgerTable {
    display: table !important;
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
  }
  body.dpx-phone-ledger-user #ledgerTable .sticky-col {
    position: static !important;
    left: auto !important;
    box-shadow: none !important;
  }
  body.dpx-phone-ledger-user #ledgerTable th,
  body.dpx-phone-ledger-user #ledgerTable td {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 3px 2px !important;
    font-size: 7.2px !important;
    line-height: 1.12 !important;
    vertical-align: middle !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    overflow-wrap: normal !important;
  }
  body.dpx-phone-ledger-user #ledgerTable th {
    height: 20px !important;
    font-size: 6.6px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    letter-spacing: -.15px !important;
  }
  body.dpx-phone-ledger-user #ledgerTable tbody tr { min-height: 43px !important; }
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-phoneTrade { width: 14% !important; }
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-phoneInOut { width: 21% !important; }
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-phoneTargetSl { width: 21% !important; }
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-phoneMadeDone { width: 22% !important; }
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-pnl { width: 10% !important; }
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-closeReason { width: 12% !important; }
  body.dpx-phone-ledger-user #ledgerTable .phone-ledger-stack {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  body.dpx-phone-ledger-user #ledgerTable .phone-trade-stack b,
  body.dpx-phone-ledger-user #ledgerTable .phone-trade-stack span {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
  }
  body.dpx-phone-ledger-user #ledgerTable .phone-value-stack > span {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    align-items: baseline !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  body.dpx-phone-ledger-user #ledgerTable .phone-value-stack b {
    color: #62d8e9 !important;
    font-size: 6.4px !important;
    font-style: normal !important;
    white-space: nowrap !important;
  }
  body.dpx-phone-ledger-user #ledgerTable .phone-value-stack em {
    min-width: 0 !important;
    color: inherit !important;
    font-size: 7.1px !important;
    font-style: normal !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-pnl,
  body.dpx-phone-ledger-user #ledgerTable .ledger-col-closeReason {
    text-align: center !important;
    white-space: nowrap !important;
    font-size: 7px !important;
  }
}

/* Patch 9: admin phones freeze only the combined Trade column. Its dark opaque
   background prevents the white/unreadable first-column defect and the rest of
   the numbered columns remain horizontally accessible. */
@media (max-width: 600px) {
  body.dpx-phone-ledger-admin #ledgerTableWrap,
  body.dpx-phone-ledger-admin #ledgerTableWrap.no-h-scroll {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-padding-left: 72px !important;
  }
  body.dpx-phone-ledger-admin #ledgerTable {
    width: max-content !important;
    min-width: 1680px !important;
    max-width: none !important;
    table-layout: auto !important;
  }
  body.dpx-phone-ledger-admin #ledgerTable th,
  body.dpx-phone-ledger-admin #ledgerTable td {
    padding: 4px 5px !important;
    font-size: 7.5px !important;
    line-height: 1.12 !important;
    white-space: nowrap !important;
  }
  body.dpx-phone-ledger-admin #ledgerTable .ledger-col-phoneTrade.sticky-col {
    position: sticky !important;
    left: 0 !important;
    z-index: 8 !important;
    box-sizing: border-box !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    color: #f4f8fc !important;
    background: #1b3049 !important;
    box-shadow: 3px 0 5px rgba(0,0,0,.38) !important;
    overflow: hidden !important;
  }
  body.dpx-phone-ledger-admin #ledgerTable thead .ledger-col-phoneTrade.sticky-col {
    z-index: 12 !important;
    background: #14263b !important;
  }
  body.dpx-phone-ledger-admin #ledgerTable .ledger-col-phoneTrade .phone-ledger-stack,
  body.dpx-phone-ledger-admin #ledgerTable .ledger-col-phoneTrade .phone-ledger-stack b,
  body.dpx-phone-ledger-admin #ledgerTable .ledger-col-phoneTrade .phone-ledger-stack span {
    display: block !important;
    width: 100% !important;
    color: inherit !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
}

/* Landscape keeps the approved split-stage design. The applied settings line
   is given a real column instead of being clipped to a few characters. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout.phone-landscape-redesign .landscape-trade-topbar {
    grid-template-columns: minmax(165px, 1.25fr) 104px minmax(205px, 1.45fr) auto !important;
    gap: 4px !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .landscape-trade-topbar > .prediction-order-row {
    display: contents !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .landscape-trade-topbar .preset-field {
    min-width: 0 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign #effectiveTradeSettings {
    align-self: end !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 18px !important;
    line-height: 18px !important;
    font-size: 6.8px !important;
    letter-spacing: -.16px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    color: #9fb0c4 !important;
  }
  body.phone-tab-layout.phone-landscape-redesign .prediction-mobile-row .prediction-action-cell {
    grid-template-columns: minmax(36px, 1fr) minmax(35px, .8fr) minmax(29px, .66fr) !important;
    gap: 1px !important;
    padding-left: 3px !important;
    padding-right: 3px !important;
  }
}

/* Final cascade lock: explicit direct-child grid placement prevents legacy
   named grid areas from collapsing phone/tablet prediction content. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait .demo-layout .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 29px 64px 146px !important;
    grid-template-areas: none !important;
    gap: 3px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 245px !important;
    min-height: 245px !important;
    max-height: 245px !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .demo-layout .trade-card .prediction-workbench > .prediction-order-row {
    grid-area: auto !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    align-items: end !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 29px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .demo-layout .trade-card .prediction-workbench > #phoneAutoExecutionSlot {
    grid-area: auto !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .demo-layout .trade-card .prediction-workbench > .prediction-panel {
    grid-area: auto !important;
    grid-column: 1 !important;
    grid-row: 3 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 146px !important;
    min-height: 146px !important;
    max-height: 146px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .demo-layout .trade-card .prediction-order-row > .preset-field {
    grid-column: 1 !important;
    min-width: 0 !important;
    max-width: 48px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .demo-layout .trade-card .prediction-order-row > #effectiveTradeSettings {
    grid-column: 2 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 26px !important;
    padding-top: 11px !important;
    font-size: 6.5px !important;
    line-height: 12px !important;
    letter-spacing: -.18px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
}

@media (min-width: 601px) and (max-width: 900px) and (min-height: 601px) {
  html body.desktop-tab-layout .demo-layout .trade-card .prediction-workbench {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    grid-template-areas: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    gap: 5px !important;
    overflow: hidden !important;
  }
  html body.desktop-tab-layout .demo-layout .trade-card .prediction-workbench > .prediction-order-row {
    grid-area: auto !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: 94px minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body.desktop-tab-layout .demo-layout .trade-card .prediction-workbench > .prediction-panel {
    grid-area: auto !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html body.phone-tab-layout.phone-landscape-redesign .landscape-trade-topbar {
    display: grid !important;
    grid-template-columns: minmax(180px, 1fr) minmax(270px, 1.35fr) auto !important;
    align-items: end !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign .landscape-trade-topbar > .prediction-order-row {
    display: grid !important;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    align-items: end !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign .landscape-trade-topbar > .prediction-order-row > .preset-field {
    min-width: 0 !important;
    max-width: 104px !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign .landscape-trade-topbar > .prediction-order-row > #effectiveTradeSettings {
    min-width: 0 !important;
    max-width: 100% !important;
    height: 28px !important;
    padding-top: 11px !important;
    font-size: 6.6px !important;
    line-height: 14px !important;
    letter-spacing: -.16px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
}

/* Phone portrait finishing pass: display the full applied-settings sentence and
   all six prediction rows (header + six rows) inside the fixed trading area. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait .trade-card .prediction-order-row > #effectiveTradeSettings {
    display: flex !important;
    align-items: flex-end !important;
    align-self: end !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    padding: 0 0 2px 0 !important;
    font-size: 6.5px !important;
    line-height: 8px !important;
    color: #aebdce !important;
    opacity: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .trade-card .prediction-panel > #predictions {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 143px !important;
    min-height: 143px !important;
    max-height: 143px !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .trade-card #predictions > .prediction-mobile-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 18px repeat(6, 20px) !important;
    gap: 1px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 143px !important;
    min-height: 143px !important;
    max-height: 143px !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .trade-card #predictions .prediction-mobile-head {
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    font-size: 5.3px !important;
    line-height: 18px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .trade-card #predictions .prediction-mobile-row,
  html body.phone-tab-layout.dpx-phone-portrait .trade-card #predictions .prediction-mobile-row.has-open-manual {
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .trade-card #predictions .prediction-mobile-action-stack,
  html body.phone-tab-layout.dpx-phone-portrait .trade-card #predictions .prediction-mobile-row .prediction-action-cell,
  html body.phone-tab-layout.dpx-phone-portrait .trade-card #predictions .prediction-mobile-row > span {
    height: 19px !important;
    min-height: 19px !important;
    max-height: 19px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .trade-card #predictions .prediction-mobile-row > span {
    grid-template-rows: 6px 12px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .trade-card #predictions .prediction-mobile-row > span b {
    font-size: 4.8px !important;
    line-height: 6px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .trade-card #predictions .prediction-mobile-row > span em,
  html body.phone-tab-layout.dpx-phone-portrait .trade-card #predictions .prediction-countdown-value {
    font-size: 7.2px !important;
    line-height: 12px !important;
  }
}

/* Final visibility corrections discovered during rendered-device inspection. */
@media (min-width: 901px) {
  html body.desktop-tab-layout .trade-card .prediction-workbench {
    grid-template-columns: minmax(178px, 184px) minmax(0, 1fr) !important;
  }
  html body.desktop-tab-layout .trade-card #effectiveTradeSettings {
    font-size: 9px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait .demo-layout .trade-card .prediction-workbench > .prediction-order-row > #effectiveTradeSettings {
    display: block !important;
    box-sizing: border-box !important;
    padding-top: 7px !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    font-size: 6.5px !important;
    line-height: 9px !important;
    color: #b8c6d6 !important;
    opacity: 1 !important;
    vertical-align: bottom !important;
  }
}

@media (min-width: 601px) and (max-width: 900px) and (min-height: 601px) {
  html body.desktop-tab-layout .demo-layout > .trade-card {
    grid-template-columns: minmax(0, 1fr) !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card .prediction-workbench,
  html body.desktop-tab-layout .demo-layout > .trade-card .prediction-order-row,
  html body.desktop-tab-layout .demo-layout > .trade-card .prediction-panel,
  html body.desktop-tab-layout .demo-layout > .trade-card #predictions {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench .landscape-trade-topbar > .prediction-order-row {
    display: grid !important;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    align-items: end !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench .landscape-trade-topbar > .prediction-order-row > .preset-field {
    grid-column: 1 !important;
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card .prediction-workbench .landscape-trade-topbar > .prediction-order-row > #effectiveTradeSettings {
    grid-column: 2 !important;
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 27px !important;
    min-height: 27px !important;
    max-height: 27px !important;
    padding-top: 13px !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    font-size: 6.5px !important;
    line-height: 9px !important;
    letter-spacing: -.16px !important;
    color: #b8c6d6 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
}

/* Exact child sizing: keep the applied settings row inside its 29px track so
   the log panel cannot paint over the text. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait .demo-layout .trade-card .prediction-workbench > .prediction-order-row > .preset-field {
    display: grid !important;
    grid-template-rows: 7px 20px !important;
    align-content: start !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .demo-layout .trade-card .prediction-workbench > .prediction-order-row > .preset-field > .field-label {
    height: 7px !important;
    min-height: 7px !important;
    max-height: 7px !important;
    line-height: 7px !important;
    margin: 0 !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .demo-layout .trade-card .prediction-workbench > .prediction-order-row > .preset-field > #presetPercentSelect {
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    margin: 0 !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait .demo-layout .trade-card .prediction-workbench > .prediction-order-row > #effectiveTradeSettings {
    align-self: start !important;
    margin: 7px 0 0 0 !important;
    padding: 0 !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    line-height: 20px !important;
  }
}

/* Tablet portrait: all status controls and all six prediction rows fit inside
   the right card without clipping. */
@media (min-width: 601px) and (max-width: 900px) and (min-height: 601px) {
  html body.desktop-tab-layout .demo-layout > .trade-card > .trade-heading {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card > .trade-heading > .trade-title-status {
    display: grid !important;
    grid-template-columns: 94px minmax(0, 1fr) 92px !important;
    align-items: center !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card .trade-title-status > .eyebrow {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    font-size: 10px !important;
    letter-spacing: .12em !important;
    white-space: nowrap !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card .trade-title-status > .trading-auto-status {
    grid-column: 2 !important;
    grid-row: 1 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 28px !important;
    padding: 4px 6px !important;
    font-size: 9px !important;
    letter-spacing: .04em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card .trade-title-status > .title-auto-run-toggle {
    grid-column: 3 !important;
    grid-row: 1 !important;
    box-sizing: border-box !important;
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding: 3px 5px !important;
    font-size: 9px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card > .trade-heading > .balance-row {
    display: none !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card .prediction-panel > #predictions {
    display: grid !important;
    grid-template-rows: 18px repeat(6, 20px) !important;
    row-gap: 2px !important;
    height: 150px !important;
    min-height: 150px !important;
    max-height: 150px !important;
    overflow: hidden !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card #predictions > .prediction-table-head {
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    font-size: 7px !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card #predictions > .prediction-action-cell,
  html body.desktop-tab-layout .demo-layout > .trade-card #predictions > .prediction-info-cell {
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    padding-top: 1px !important;
    padding-bottom: 1px !important;
    font-size: 7.5px !important;
  }
}

/* The landscape topbar is a direct child of trade-card after JS relocation. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card > .landscape-trade-topbar > .prediction-order-row {
    display: grid !important;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    align-items: end !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card > .landscape-trade-topbar > .prediction-order-row > .preset-field {
    grid-column: 1 !important;
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 27px !important;
    min-height: 27px !important;
    max-height: 27px !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage .trade-card > .landscape-trade-topbar > .prediction-order-row > #effectiveTradeSettings {
    grid-column: 2 !important;
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 27px !important;
    min-height: 27px !important;
    max-height: 27px !important;
    margin: 0 !important;
    padding: 13px 0 0 0 !important;
    font-size: 6.5px !important;
    line-height: 9px !important;
    color: #b8c6d6 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
}

/* Compact laptop prediction grid: retain all five information columns at
   1024–1400px instead of letting the rightmost columns fall outside the card. */
@media (min-width: 901px) and (max-width: 1400px) {
  html body.desktop-tab-layout .trade-card .prediction-workbench {
    grid-template-columns: minmax(150px, 156px) minmax(0, 1fr) !important;
    column-gap: 8px !important;
  }
  html body.desktop-tab-layout .trade-card #effectiveTradeSettings {
    font-size: 7.5px !important;
    letter-spacing: -.12px !important;
    white-space: nowrap !important;
  }
  html body.desktop-tab-layout .trade-card .prediction-table-layout {
    grid-template-columns: minmax(130px, 1.08fr) minmax(55px, .48fr) minmax(34px, .30fr) minmax(34px, .30fr) minmax(45px, .40fr) !important;
    column-gap: 2px !important;
  }
  html body.desktop-tab-layout .trade-card .prediction-action-cell {
    grid-template-columns: minmax(46px, 1fr) minmax(38px, .72fr) minmax(30px, .58fr) !important;
    gap: 2px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  html body.desktop-tab-layout .trade-card .pred-side { font-size: 12px !important; }
  html body.desktop-tab-layout .trade-card .pred-minute,
  html body.desktop-tab-layout .trade-card .pred-conf { font-size: 8px !important; }
  html body.desktop-tab-layout .trade-card .prediction-table-head,
  html body.desktop-tab-layout .trade-card .prediction-info-cell { font-size: 8px !important; }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html body.phone-tab-layout.phone-landscape-redesign .prediction-mobile-row .prediction-action-cell {
    grid-template-columns: minmax(34px, 1fr) 34px 24px !important;
    gap: 1px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign .prediction-mobile-row .pred-side {
    font-size: 8px !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign .prediction-mobile-row .pred-minute,
  html body.phone-tab-layout.phone-landscape-redesign .prediction-mobile-row .pred-conf {
    font-size: 6.5px !important;
    letter-spacing: -.1px !important;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html body.phone-tab-layout.phone-landscape-redesign .prediction-mobile-row .prediction-action-cell {
    grid-template-columns: minmax(31px, 1fr) 31px 22px !important;
    gap: 2px !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign .prediction-mobile-row .pred-side {
    font-size: 7.5px !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign .prediction-mobile-row .pred-minute {
    font-size: 6px !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign .prediction-mobile-row .pred-conf {
    font-size: 6.2px !important;
  }
}

/* Final DPX v0.5.2 landscape prediction-label lock. The older v0.5.1
   selectors include phone-landscape-tab-stage, so match that specificity and
   reserve independent cells for the full "10 min"/"30 min"/"60 min" text and
   confidence. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row.has-open-manual .prediction-action-cell,
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row:not(.has-open-manual) .prediction-action-cell {
    grid-template-columns: minmax(31px, 1fr) 28px 22px !important;
    column-gap: 1px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-minute,
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-conf {
    box-sizing: border-box !important;
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-align: center !important;
    letter-spacing: -.12px !important;
  }
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-minute { font-size: 6.2px !important; }
  html body.phone-tab-layout.phone-landscape-redesign.phone-landscape-tab-stage
  .prediction-mobile-row .pred-conf { font-size: 6.2px !important; }
}

/* ========================================================================== 
   DPX v0.5.2 INCREMENTAL PATCHES — 18 July 2026
   Only the three items in DPX_v0.5.2_New_Patch are changed below.
   ========================================================================== */

/* New Patch #1: at desktop and laptop widths, move the prediction grid toward
   the left and reserve a complete independent cell for every "N min" label,
   including the row that also contains the manual Settle button. */
@media (min-width: 1401px) {
  html body.desktop-tab-layout .trade-card .prediction-workbench {
    grid-template-columns: minmax(150px, 156px) minmax(0, 1fr) !important;
    column-gap: 8px !important;
  }
  html body.desktop-tab-layout .trade-card .prediction-table-layout {
    grid-template-columns: minmax(250px, 1.18fr) minmax(100px, .48fr) minmax(58px, .28fr) minmax(54px, .26fr) minmax(68px, .32fr) !important;
    column-gap: 6px !important;
  }
  html body.desktop-tab-layout .trade-card .prediction-action-cell,
  html body.desktop-tab-layout .trade-card .prediction-action-wrap.has-open-manual .prediction-action-cell {
    grid-template-columns: minmax(58px, 1fr) minmax(40px, .72fr) minmax(36px, .62fr) !important;
    column-gap: 4px !important;
  }
}

@media (min-width: 901px) and (max-width: 1400px) {
  html body.desktop-tab-layout .trade-card .prediction-workbench {
    grid-template-columns: minmax(130px, 136px) minmax(0, 1fr) !important;
    column-gap: 8px !important;
  }
  html body.desktop-tab-layout .trade-card .prediction-table-layout {
    grid-template-columns: minmax(170px, 1.18fr) minmax(70px, .48fr) minmax(45px, .31fr) minmax(43px, .30fr) minmax(55px, .38fr) !important;
    column-gap: 2px !important;
  }
  html body.desktop-tab-layout .trade-card .prediction-action-cell,
  html body.desktop-tab-layout .trade-card .prediction-action-wrap.has-open-manual .prediction-action-cell {
    grid-template-columns: minmax(38px, 1fr) minmax(34px, .72fr) minmax(28px, .58fr) !important;
    column-gap: 2px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}

@media (min-width: 901px) {
  html body.desktop-tab-layout .trade-card .prediction-action-cell .pred-minute,
  html body.desktop-tab-layout .trade-card .prediction-action-cell .pred-conf {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
}

/* New Patch #2: administrator phone Historical Orders. Column 1 is compact;
   Columns 3 and 4 have enough fixed width for their complete numeric stacks. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .ledger-col-phoneTrade.sticky-col,
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .phone-trade-cell.sticky-col {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
  }
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .ledger-col-phoneTrade,
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .phone-trade-cell,
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .ledger-col-phoneTrade .phone-ledger-stack,
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .phone-trade-cell .phone-ledger-stack,
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .phone-trade-cell .phone-ledger-stack b,
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .phone-trade-cell .phone-ledger-stack span {
    font-size: 6.7px !important;
    line-height: 1.05 !important;
    letter-spacing: -.08px !important;
  }
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .ledger-col-origAdjSl,
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .orig-adj-sl-cell {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
  }
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .ledger-col-origAdjTarget,
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .orig-adj-target-cell {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
  }
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .orig-adj-sl-cell .ledger-stack-line,
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .orig-adj-target-cell .ledger-stack-line {
    grid-template-columns: 25px minmax(0, 1fr) !important;
    column-gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .orig-adj-sl-cell .ledger-stack-line em,
  html body.phone-tab-layout.dpx-phone-ledger-admin #ledgerTable .orig-adj-target-cell .ledger-stack-line em {
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: 7.4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
}

/* New Patch #3: normal-user phone only. Keep NET P&L and the unsorted up/down
   arrow indicator on a single line without changing the data column or any
   administrator/desktop/tablet header. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable th.ledger-col-pnl {
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    font-size: 5.5px !important;
    line-height: 1 !important;
    letter-spacing: -.12px !important;
    word-spacing: .45px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable th.ledger-col-pnl::after {
    content: '↕' !important;
    display: inline !important;
    margin-left: .7px !important;
    font-size: .72em !important;
    line-height: 1 !important;
    vertical-align: baseline !important;
    opacity: .55 !important;
    white-space: nowrap !important;
  }
}

/* ========================================================================== 
   DPX v0.5.3 PATCHES — Users Management and targeted trading-area layouts
   ========================================================================== */

/* Patches 1-5: four search rows, readable status dates, and all actions in one line. */
.dpx-users-redesign .users-search-button {
  grid-row: 1 / span 4 !important;
}
.dpx-users-redesign .users-status-dates {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 2px !important;
  white-space: nowrap !important;
  line-height: 1.15 !important;
}
.dpx-users-redesign .users-edit-actions {
  display: grid !important;
  grid-template-columns: max-content max-content max-content !important;
  justify-content: end !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
}
.dpx-users-redesign .users-edit-actions button {
  margin: 0 !important;
  white-space: nowrap !important;
}

/* Patch 7: phone portrait symbol/log split with larger, easier prediction rows. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .trade-market-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 4px !important;
    align-items: stretch !important;
    width: 100% !important;
    min-height: 58px !important;
    max-height: 58px !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .trade-symbol-control {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 2px !important;
  }
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .trade-symbol-control #symbolSelect {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .trade-market-row > .mini-price-panel {
    display: none !important;
  }
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .trade-market-row > #phoneAutoExecutionSlot {
    display: block !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.v053-phone-trade-split .trade-card #phoneAutoExecutionSlot .chart-auto-execution-panel {
    width: 100% !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    margin: 0 !important;
    padding: 2px 3px !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.v053-phone-trade-split .trade-card #phoneAutoExecutionSlot .log-panel-header {
    height: 13px !important;
    min-height: 13px !important;
    max-height: 13px !important;
    font-size: 6px !important;
  }
  html body.phone-tab-layout.v053-phone-trade-split .trade-card #phoneAutoExecutionSlot .auto-output-box {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 2px 3px !important;
    font-size: 6.5px !important;
    line-height: 1.12 !important;
    overflow-y: auto !important;
  }
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .prediction-workbench {
    grid-template-areas: "order" "predictions" !important;
    grid-template-rows: 28px 181px !important;
    gap: 2px !important;
  }
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .prediction-panel {
    height: 181px !important;
    min-height: 181px !important;
    max-height: 181px !important;
  }
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .prediction-mobile-list {
    grid-template-rows: repeat(6, 29px) !important;
    height: 179px !important;
    min-height: 179px !important;
    max-height: 179px !important;
    gap: 1px !important;
  }
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .prediction-mobile-row,
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .prediction-mobile-row.has-open-manual,
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .prediction-mobile-action-stack,
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .prediction-mobile-row .prediction-action-cell,
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .prediction-mobile-row > span {
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
  }
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .prediction-mobile-row .pred-side {
    font-size: 13px !important;
  }
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .prediction-mobile-row .pred-minute,
  html body.phone-tab-layout.v053-phone-trade-split .trade-card .prediction-mobile-row .pred-conf {
    font-size: 9px !important;
  }
}

/* Patch 8: laptop symbol and Preset stake % share one compact line. */
@media (min-width: 901px) and (max-width: 1400px) and (min-height: 601px) {
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .trade-market-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 104px !important;
    gap: 8px !important;
    align-items: end !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .trade-market-row > .mini-price-panel {
    display: none !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .trade-market-row > .preset-field {
    display: grid !important;
    grid-template-rows: auto 28px !important;
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    margin: 0 !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .trade-market-row > .preset-field .field-label {
    display: block !important;
    font-size: 9px !important;
    line-height: 12px !important;
    white-space: nowrap !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .trade-market-row > .preset-field #presetPercentSelect {
    width: 100% !important;
    min-width: 0 !important;
    height: 28px !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .prediction-workbench {
    grid-template-columns: minmax(92px, 98px) minmax(0, 1fr) !important;
    column-gap: 6px !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .prediction-order-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 760px) {
  .dpx-users-redesign .users-edit-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }
  .dpx-users-redesign .users-edit-actions button {
    min-width: 0 !important;
    padding-inline: 5px !important;
    font-size: 10px !important;
  }
}

/* v0.5.3 Patch 7 final portrait sizing: override the legacy fixed 20px tracks. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .prediction-workbench {
    grid-template-areas: "order" "predictions" !important;
    grid-template-rows: 28px 192px !important;
    height: 222px !important;
    min-height: 222px !important;
    max-height: 222px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .prediction-panel,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .prediction-panel > #predictions,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions > .prediction-mobile-list {
    height: 192px !important;
    min-height: 192px !important;
    max-height: 192px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions > .prediction-mobile-list {
    grid-template-rows: 18px repeat(6, 28px) !important;
    gap: 1px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions > .prediction-mobile-list > .prediction-mobile-row,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions > .prediction-mobile-list > .prediction-mobile-row.has-open-manual {
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card .prediction-workbench > .prediction-panel.prediction-panel {
    grid-area: auto !important;
    grid-row: 2 !important;
    grid-column: 1 !important;
    height: 192px !important;
    min-height: 192px !important;
    max-height: 192px !important;
    align-self: stretch !important;
    overflow: hidden !important;
  }
}

/* ========================================================================== 
   DPX v0.5.3 VIEW CORRECTION — Patch 7 phone portrait and Patch 8 laptop only
   ========================================================================== */

/* Phone portrait: exact two-column client layout.
   Left: complete symbol + preset/effective line. Right: Auto controls + compact LIVE log.
   Prediction buttons use the recovered vertical space and fill each row. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card > .trade-heading {
    display: none !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card > .trade-market-row {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-rows: 34px 30px !important;
    column-gap: 5px !important;
    row-gap: 2px !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 66px !important;
    min-height: 66px !important;
    max-height: 66px !important;
    margin: 0 0 3px 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .trade-symbol-control {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: grid !important;
    grid-template-rows: 8px 25px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-symbol-control .field-label {
    display: block !important;
    height: 8px !important;
    min-height: 8px !important;
    margin: 0 !important;
    padding: 0 2px !important;
    font-size: 6.8px !important;
    line-height: 8px !important;
    white-space: nowrap !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-symbol-control #symbolSelect {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    margin: 0 !important;
    padding: 2px 22px 2px 7px !important;
    font-size: 10.2px !important;
    line-height: 21px !important;
    letter-spacing: -.12px !important;
    text-overflow: ellipsis !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row {
    grid-column: 1 !important;
    grid-row: 2 !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 49px minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 3px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > .preset-field {
    display: grid !important;
    grid-template-rows: 8px 22px !important;
    width: 49px !important;
    min-width: 49px !important;
    max-width: 49px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > .preset-field > .field-label {
    display: block !important;
    height: 8px !important;
    min-height: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 6.6px !important;
    line-height: 8px !important;
    white-space: nowrap !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > .preset-field > #presetPercentSelect {
    box-sizing: border-box !important;
    display: block !important;
    width: 49px !important;
    min-width: 49px !important;
    max-width: 49px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    margin: 0 !important;
    padding: 1px 15px 1px 5px !important;
    font-size: 9px !important;
    line-height: 19px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > #effectiveTradeSettings {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: flex-end !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    margin: 0 !important;
    padding: 0 0 3px 0 !important;
    font-size: 6.15px !important;
    line-height: 8px !important;
    letter-spacing: -.18px !important;
    color: #aebdce !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > #phoneAutoExecutionSlot {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-rows: 29px 35px !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 66px !important;
    min-height: 66px !important;
    max-height: 66px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 55px !important;
    align-items: stretch !important;
    gap: 3px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 29px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls .trading-auto-status {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    margin: 0 !important;
    padding: 4px 4px !important;
    font-size: 7.7px !important;
    line-height: 19px !important;
    letter-spacing: .05em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls .title-auto-run-toggle {
    box-sizing: border-box !important;
    width: 55px !important;
    min-width: 55px !important;
    max-width: 55px !important;
    height: 29px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    margin: 0 !important;
    padding: 3px 4px !important;
    font-size: 10px !important;
    line-height: 21px !important;
    white-space: nowrap !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #phoneAutoExecutionSlot > .chart-auto-execution-panel {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    margin: 0 !important;
    padding: 2px 3px !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #phoneAutoExecutionSlot .log-panel-header {
    display: none !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #phoneAutoExecutionSlot .auto-output-box {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    margin: 0 !important;
    padding: 2px 3px !important;
    font-size: 6.4px !important;
    line-height: 8px !important;
    white-space: pre-wrap !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card > .prediction-workbench {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 209px !important;
    min-height: 209px !important;
    max-height: 209px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .prediction-workbench > .prediction-panel,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .prediction-panel > #predictions {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 209px !important;
    min-height: 209px !important;
    max-height: 209px !important;
    margin: 0 !important;
    padding: 0 2px !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions > .prediction-mobile-list {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 17px repeat(6, 31px) !important;
    gap: 1px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 208px !important;
    min-height: 208px !important;
    max-height: 208px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-head {
    height: 17px !important;
    min-height: 17px !important;
    max-height: 17px !important;
    font-size: 5.7px !important;
    line-height: 17px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row.has-open-manual {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(128px, 1.42fr) minmax(68px, .72fr) minmax(57px, .61fr) minmax(48px, .52fr) minmax(57px, .61fr) !important;
    gap: 1px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-action-stack,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row .prediction-action-cell,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row > span {
    box-sizing: border-box !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row .prediction-action-cell {
    display: grid !important;
    grid-template-columns: minmax(44px, 1fr) minmax(44px, .82fr) minmax(36px, .66fr) !important;
    align-items: center !important;
    gap: 1px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 5px !important;
    border-radius: 3px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row .pred-side {
    font-size: 13.5px !important;
    line-height: 1 !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row .pred-minute,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row .pred-conf {
    font-size: 9.2px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row > span {
    display: grid !important;
    grid-template-rows: 8px 21px !important;
    align-items: center !important;
    padding: 0 2px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row > span b {
    font-size: 5.2px !important;
    line-height: 8px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row > span em,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-countdown-value {
    font-size: 7.7px !important;
    line-height: 20px !important;
    white-space: nowrap !important;
  }
}

/* Laptop: symbol and Preset stake share the same line, and the prediction table
   uses the complete card width rather than leaving a blank preset column. */
@media (min-width: 901px) and (max-width: 1800px) and (max-height: 1000px) and (min-height: 601px) {
  html body.desktop-tab-layout.v053-laptop-inline-preset .demo-layout > .trade-card > .trade-market-row {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 110px !important;
    align-items: end !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .trade-market-row > .trade-symbol-control {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .trade-market-row > .preset-field {
    display: grid !important;
    grid-template-rows: 13px 31px !important;
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .trade-market-row > .preset-field .field-label {
    display: block !important;
    height: 13px !important;
    margin: 0 !important;
    font-size: 9px !important;
    line-height: 13px !important;
    white-space: nowrap !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .trade-market-row > .preset-field #presetPercentSelect {
    box-sizing: border-box !important;
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    margin: 0 !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .trade-market-row > .mini-price-panel {
    display: none !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .prediction-workbench {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 18px minmax(0, 1fr) !important;
    grid-template-areas: none !important;
    gap: 3px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .prediction-workbench > .prediction-order-row {
    grid-area: auto !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .prediction-workbench > .prediction-order-row > .preset-field {
    display: none !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .prediction-workbench > .prediction-order-row > #effectiveTradeSettings {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 8px !important;
    line-height: 18px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .prediction-workbench > #phoneAutoExecutionSlot {
    display: none !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .prediction-workbench > .prediction-panel {
    grid-area: auto !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .prediction-table-layout {
    grid-template-columns: minmax(250px, 1.22fr) minmax(105px, .5fr) minmax(66px, .31fr) minmax(62px, .29fr) minmax(78px, .37fr) !important;
    column-gap: 5px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .prediction-action-cell,
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .prediction-action-wrap.has-open-manual .prediction-action-cell {
    grid-template-columns: minmax(70px, 1fr) minmax(54px, .72fr) minmax(46px, .62fr) !important;
    column-gap: 5px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* Final exact-child lock for the corrected phone design: the button itself,
   not the gap between rows, receives the additional height. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card .prediction-workbench > .prediction-panel.prediction-panel {
    grid-area: auto !important;
    grid-row: auto !important;
    grid-column: auto !important;
    height: 209px !important;
    min-height: 209px !important;
    max-height: 209px !important;
    padding: 0 2px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card .prediction-panel > #predictions > .prediction-mobile-list > .prediction-mobile-row,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card .prediction-panel > #predictions > .prediction-mobile-list > .prediction-mobile-row.has-open-manual {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card .prediction-panel > #predictions > .prediction-mobile-list > .prediction-mobile-row > .prediction-mobile-action-stack,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card .prediction-panel > #predictions > .prediction-mobile-list > .prediction-mobile-row > .prediction-mobile-action-stack > .prediction-action-cell,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card .prediction-panel > #predictions > .prediction-mobile-list > .prediction-mobile-row > span {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls {
    grid-template-columns: minmax(0, 1fr) 55px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls > .trading-auto-status {
    grid-column: 1 !important;
    justify-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-inline: 2px !important;
    font-size: 6.8px !important;
    letter-spacing: .02em !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls > .title-auto-run-toggle {
    grid-column: 2 !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row.has-open-manual > .prediction-mobile-action-stack {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    grid-template-rows: 30px !important;
    gap: 2px !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row.has-open-manual .mobile-settle {
    grid-column: 1 !important;
    grid-row: 1 !important;
    box-sizing: border-box !important;
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    margin: 0 !important;
    padding: 0 1px !important;
    font-size: 6.2px !important;
    line-height: 1 !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row.has-open-manual .prediction-action-cell {
    grid-column: 2 !important;
    grid-row: 1 !important;
    grid-template-columns: minmax(28px, 1fr) 28px 23px !important;
    column-gap: 1px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 2px !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row.has-open-manual .pred-side {
    font-size: 11px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row.has-open-manual .pred-minute,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row.has-open-manual .pred-conf {
    font-size: 7.4px !important;
  }
}

/* v0.5.3 same-version stake visibility and phone value-centering hotfix.
   Scope: only the laptop/PC inline preset field and phone portrait preset/value cells. */
@media (min-width: 901px) and (max-width: 1800px) and (max-height: 1000px) and (min-height: 601px) {
  html body.desktop-tab-layout.v053-laptop-inline-preset .demo-layout > .trade-card > .trade-market-row {
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    overflow: visible !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .trade-market-row > .preset-field {
    grid-template-rows: 15px 35px !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    align-self: end !important;
    overflow: visible !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .trade-market-row > .preset-field .field-label {
    height: 15px !important;
    min-height: 15px !important;
    max-height: 15px !important;
    line-height: 15px !important;
    font-size: 9px !important;
    padding: 0 1px !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .trade-market-row > .preset-field #presetPercentSelect {
    display: block !important;
    box-sizing: border-box !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding: 0 28px 0 11px !important;
    font-size: 13px !important;
    line-height: normal !important;
    overflow: visible !important;
  }
  html body.desktop-tab-layout.v053-laptop-inline-preset .trade-card .prediction-workbench {
    height: calc(100% - 82px) !important;
    max-height: calc(100% - 82px) !important;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row {
    grid-template-columns: 64px minmax(0, 1fr) !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > .preset-field,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > .preset-field > #presetPercentSelect {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > .preset-field > #presetPercentSelect {
    padding: 1px 18px 1px 6px !important;
    font-size: 9.5px !important;
    line-height: normal !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row > span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    grid-template-rows: none !important;
    padding: 0 2px !important;
    text-align: center !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row > span > b {
    display: none !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-mobile-row > span > em,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #predictions .prediction-countdown-value {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    line-height: 1 !important;
    text-align: center !important;
  }
}

/* v0.5.3 same-version phone manual-row confidence alignment hotfix.
   Keep PUT/CALL and minute text intact while moving the percentage slightly left
   whenever the Settle button is present. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row.has-open-manual .prediction-action-cell {
    grid-template-columns: minmax(26px, 1fr) 26px 27px !important;
    column-gap: 1px !important;
    padding-left: 1px !important;
    padding-right: 1px !important;
  }
}

/* v0.5.3 same-version phone confidence alignment correction.
   Move every prediction confidence percentage left, including rows without Settle. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row .pred-conf {
    transform: translateX(-5px) !important;
  }
}

/* ========================================================================== 
   DPX v0.5.5 — targeted Historical Orders and phone readability patches
   ========================================================================== */

/* Laptop/desktop normal user: use the full table width with the same standard
   columns as the administrator table, but without administrator prediction
   columns or horizontal scrolling. */
@media (min-width: 761px) and (max-width: 1800px) {
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap.no-h-scroll {
    overflow-x: hidden !important;
    touch-action: pan-y !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable th,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable td {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 5px 3px !important;
    font-size: 9.5px !important;
    line-height: 1.12 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable th {
    font-size: 9px !important;
    letter-spacing: -.08px !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-col-tradeCount { width: 6.5% !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-col-side { width: 4.5% !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-col-stake { width: 6% !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-col-symbol { width: 7% !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-col-entryExit,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .entry-exit-cell { width: 10.5% !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-col-origAdjSl,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .orig-adj-sl-cell { width: 14% !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-col-origAdjTarget,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .orig-adj-target-cell { width: 14.5% !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-col-createdSettled,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .created-settled-cell { width: 13% !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-col-duration { width: 7% !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-col-pnl { width: 6% !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-col-closeReason,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .reason-cell { width: 11% !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-stack-line {
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 2px !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-stack-line b {
    font-size: 7.5px !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-stack-line em {
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }
}

/* Every standard Historical Orders header uses the approved one-line wording. */
#ledgerTable th.ledger-col-origAdjSl,
#ledgerTable th.ledger-col-origAdjTarget,
#ledgerTable th.ledger-col-pnl {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* Phone portrait: enlarge only the approved trading text while preserving the
   current compact structure and all six prediction rows. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout .session-balance-slot .balance-row,
  html body.phone-tab-layout .balance-row {
    white-space: nowrap !important;
    gap: 4px !important;
  }
  html body.phone-tab-layout .balance-row #accountBalanceLabel {
    font-size: 9px !important;
  }
  html body.phone-tab-layout .balance-row #balanceDisplay {
    font-size: 11.5px !important;
    line-height: 1 !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #effectiveTradeSettings {
    font-size: 7px !important;
    line-height: 8px !important;
    letter-spacing: -.23px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-head {
    font-size: 5.8px !important;
    letter-spacing: -.08px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-info-cell,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-countdown-value {
    font-size: 7.8px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  /* Normal-user phone Historical Orders: six complete columns, all headers on
     one line with one consistent font size. */
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTableWrap,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTableWrap.no-h-scroll {
    overflow-x: hidden !important;
    touch-action: pan-y !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable th,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable td {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 5px 2px !important;
    vertical-align: middle !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable th {
    height: 24px !important;
    font-size: 5.45px !important;
    line-height: 1 !important;
    letter-spacing: -.12px !important;
    word-spacing: 0 !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    text-align: left !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable th::after {
    font-size: .68em !important;
    margin-left: .35px !important;
    vertical-align: baseline !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable td {
    font-size: 6.8px !important;
    line-height: 1.08 !important;
    height: 43px !important;
    white-space: normal !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .ledger-col-phoneTrade,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-trade-cell { width: 16.5% !important; }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .ledger-col-phoneInOut,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-inout-cell { width: 20% !important; }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .ledger-col-phoneTargetSl,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-target-sl-cell { width: 18.5% !important; }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .ledger-col-phoneMadeDone,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-made-done-cell { width: 20.5% !important; }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .ledger-col-pnl { width: 10.5% !important; }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .ledger-col-closeReason,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .reason-cell { width: 14% !important; }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-ledger-stack,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-ledger-stack b,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-ledger-stack span,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-ledger-stack em {
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: 6.35px !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-value-stack > span {
    grid-template-columns: 21px minmax(0, 1fr) !important;
    gap: 1px !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .reason-cell {
    font-size: 6.25px !important;
    line-height: 1.08 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  /* Administrator phone keeps the laptop standard column sequence and can
     scroll horizontally to prediction information. */
  html body.phone-tab-layout.user-admin.dpx-phone-ledger-admin #ledgerTableWrap {
    overflow-x: auto !important;
    touch-action: pan-x pan-y !important;
  }
  html body.phone-tab-layout.user-admin.dpx-phone-ledger-admin #ledgerTable {
    table-layout: fixed !important;
    width: max-content !important;
    min-width: 1810px !important;
    max-width: none !important;
  }
  html body.phone-tab-layout.user-admin.dpx-phone-ledger-admin #ledgerTable th {
    font-size: 7px !important;
    white-space: nowrap !important;
  }
}

/* Final v0.5.5 header lock: every Historical Orders header remains on one line. */
#ledgerTable th {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}
html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable th,
html body.phone-tab-layout.user-admin.dpx-phone-ledger-admin #ledgerTable th {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable th,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable th.ledger-col-pnl {
    font-size: 5.45px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .demo-layout > .trade-card .trade-market-row > .prediction-order-row {
    grid-template-columns: 52px minmax(0, 1fr) !important;
    gap: 3px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .demo-layout > .trade-card .trade-market-row > .prediction-order-row > #effectiveTradeSettings {
    font-size: 7px !important;
    line-height: 8px !important;
    letter-spacing: -.27px !important;
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .demo-layout > .trade-card .trade-market-row > .prediction-order-row > .preset-field {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-target,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-est,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-pct,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-countdown,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-target > em,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-est > em,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-pct > em,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-countdown > em,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row .mobile-countdown-value {
    font-size: 7.8px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}
@media (min-width: 761px) and (max-width: 1800px) {
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .ledger-col-tradeCount { width: 84px !important; min-width: 84px !important; max-width: 84px !important; }
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .ledger-col-side { width: 58px !important; min-width: 58px !important; max-width: 58px !important; }
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .ledger-col-stake { width: 72px !important; min-width: 72px !important; max-width: 72px !important; }
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .ledger-col-symbol { width: 82px !important; min-width: 82px !important; max-width: 82px !important; }
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .ledger-col-entryExit,
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .entry-exit-cell { width: 116px !important; min-width: 116px !important; max-width: 116px !important; }
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .ledger-col-origAdjSl,
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .orig-adj-sl-cell { width: 180px !important; min-width: 180px !important; max-width: 180px !important; }
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .ledger-col-origAdjTarget,
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .orig-adj-target-cell { width: 188px !important; min-width: 188px !important; max-width: 188px !important; }
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .ledger-col-createdSettled,
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .created-settled-cell { width: 160px !important; min-width: 160px !important; max-width: 160px !important; }
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .ledger-col-duration { width: 72px !important; min-width: 72px !important; max-width: 72px !important; }
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .ledger-col-pnl { width: 76px !important; min-width: 76px !important; max-width: 76px !important; }
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .ledger-col-closeReason,
  html body.desktop-tab-layout.user-admin.admin-unlocked #ledgerTable .reason-cell { width: 140px !important; min-width: 140px !important; max-width: 140px !important; }
}
/* v0.5.5 correction: show the approved TRGT label fully in the normal-user phone TARGET/SL cell. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-target-sl-cell .phone-value-stack > span {
    grid-template-columns: 27px minmax(0, 1fr) !important;
  }
}

/* DPX v0.5.7: local-time execution log text must remain accessible on compact phones. */
@media (max-width: 520px) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #phoneAutoExecutionSlot .auto-output-box {
    overflow-y: auto !important;
  }
}

/* DPX v0.5.7 administrator permanent account deletion */
.danger-btn{background:#8f1d2c;color:#fff;border:1px solid #c34b5d}.danger-btn:hover{filter:brightness(1.08)}.danger-btn:disabled{opacity:.55;cursor:not-allowed}

/* ========================================================================== 
   DPX v0.5.8 — Revision 4 normal-user responsive readability
   Scope: normal-user typography only. Preset stake typography is untouched.
   ========================================================================== */

.effective-trade-line { white-space: nowrap; }

/* Normal-user phone portrait: preserve every vital value and maximize readable type. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .demo-layout > .trade-card .trade-market-row > .prediction-order-row > #effectiveTradeSettings {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 0 !important;
    min-width: 0 !important;
    padding: 0 2px !important;
    font-size: 8.8px !important;
    line-height: 9.4px !important;
    letter-spacing: -.08px !important;
    white-space: normal !important;
    overflow: hidden !important;
  }
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  #effectiveTradeSettings .effective-trade-line {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }

  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row .pred-side {
    font-size: 15px !important;
    line-height: 1 !important;
  }
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row .pred-minute,
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row .pred-conf {
    font-size: 9.6px !important;
    line-height: 1 !important;
  }
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-target,
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-est,
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-pct,
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-countdown,
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-target > em,
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-est > em,
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-pct > em,
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row > .mobile-pred-countdown > em,
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row .mobile-countdown-value {
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
  }

  /* Settle occupies its own fixed cell; the prediction button keeps all three texts. */
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row.has-open-manual > .prediction-mobile-action-stack {
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 2px !important;
  }
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row.has-open-manual .mobile-settle {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    font-size: 6.7px !important;
    letter-spacing: -.15px !important;
  }
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row.has-open-manual .prediction-action-cell {
    grid-template-columns: minmax(28px, 1fr) 26px 27px !important;
    column-gap: 1px !important;
    padding-inline: 1px !important;
  }
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row.has-open-manual .pred-side {
    font-size: 11.8px !important;
  }
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row.has-open-manual .pred-minute,
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row.has-open-manual .pred-conf {
    font-size: 7.8px !important;
  }

  /* Keep all six Historical columns/headings; hide only the blue secondary labels. */
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-inout-cell .phone-value-stack b,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-target-sl-cell .phone-value-stack b,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-made-done-cell .phone-value-stack b {
    display: none !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-value-stack > span {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-inout-cell .phone-value-stack em,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-target-sl-cell .phone-value-stack em,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-made-done-cell .phone-value-stack em {
    width: 100% !important;
    font-size: 7.45px !important;
    line-height: 1.12 !important;
    text-align: left !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-trade-cell .phone-trade-stack,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-trade-cell .phone-trade-stack b,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-trade-cell .phone-trade-stack span {
    font-size: 7.35px !important;
    line-height: 1.1 !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable td.ledger-col-pnl {
    font-size: 8.5px !important;
    line-height: 1.08 !important;
    font-weight: 900 !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .reason-cell {
    font-size: 7px !important;
    line-height: 1.1 !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable th,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable th.ledger-col-pnl {
    font-size: 6px !important;
    line-height: 1 !important;
  }
  html body.phone-tab-layout.user-normal #phoneHistoryPanel .daily-pnl-totals {
    font-size: 12px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
  }
  html body.phone-tab-layout.user-normal #phoneHistoryPanel .daily-pnl-totals .pnl-green,
  html body.phone-tab-layout.user-normal #phoneHistoryPanel .daily-pnl-totals .pnl-red {
    font-size: 15px !important;
    font-weight: 950 !important;
  }
  html body.phone-tab-layout.user-normal #phoneHistoryPanel .daily-pnl-totals .daily-win-rate {
    font-size: 12.5px !important;
    font-weight: 900 !important;
  }
}

/* Normal-user tablet: enlarge all affected text while preserving current structure. */
@media (min-width: 601px) and (max-width: 900px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-normal .brand-block h1 { font-size: 30px !important; }
  html body.desktop-tab-layout.user-normal .app-version { font-size: 11px !important; }
  html body.desktop-tab-layout.user-normal #accountMenuBtn,
  html body.desktop-tab-layout.user-normal .balance-row { font-size: 12px !important; }
  html body.desktop-tab-layout.user-normal .trade-title-status .eyebrow,
  html body.desktop-tab-layout.user-normal .chart-title-row .eyebrow { font-size: 13px !important; }
  html body.desktop-tab-layout.user-normal .trade-symbol-control .select-input { font-size: 12px !important; }
  html body.desktop-tab-layout.user-normal #effectiveTradeSettings {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    gap: 0 5px !important;
    font-size: 8.5px !important;
    line-height: 1.1 !important;
  }
  html body.desktop-tab-layout.user-normal .prediction-table-head { font-size: 7.2px !important; }
  html body.desktop-tab-layout.user-normal .prediction-action-cell .pred-side { font-size: 12.5px !important; }
  html body.desktop-tab-layout.user-normal .prediction-action-cell .pred-minute,
  html body.desktop-tab-layout.user-normal .prediction-action-cell .pred-conf { font-size: 8.2px !important; }
  html body.desktop-tab-layout.user-normal .prediction-info-cell,
  html body.desktop-tab-layout.user-normal .prediction-countdown-value { font-size: 8.6px !important; }
  html body.desktop-tab-layout.user-normal .chart-auto-execution-panel .log-panel-header { font-size: 11px !important; }
  html body.desktop-tab-layout.user-normal .chart-auto-execution-panel .auto-output-box { font-size: 8.2px !important; line-height: 1.2 !important; }
  html body.desktop-tab-layout.user-normal .desktop-bottom-tab,
  html body.desktop-tab-layout.user-normal .phone-bottom-tab { font-size: 12px !important; }
  html body.desktop-tab-layout.user-normal .ledger-title-line .eyebrow { font-size: 15px !important; }
  html body.desktop-tab-layout.user-normal .daily-pnl-totals { font-size: 16px !important; }
  html body.desktop-tab-layout.user-normal .daily-pnl-totals .pnl-green,
  html body.desktop-tab-layout.user-normal .daily-pnl-totals .pnl-red { font-size: 17px !important; }
  html body.desktop-tab-layout.user-normal .daily-win-rate { font-size: 13px !important; }
  html body.desktop-tab-layout.user-normal #ledgerTable th { font-size: 7.3px !important; }
  html body.desktop-tab-layout.user-normal #ledgerTable td,
  html body.desktop-tab-layout.user-normal #ledgerTable .ledger-stack,
  html body.desktop-tab-layout.user-normal #ledgerTable .ledger-stack b,
  html body.desktop-tab-layout.user-normal #ledgerTable .ledger-stack em { font-size: 8.4px !important; line-height: 1.12 !important; }
  html body.desktop-tab-layout.user-normal #ledgerTable td.ledger-col-pnl { font-size: 9.5px !important; font-weight: 900 !important; }
}

/* Normal-user laptop: use the available width for substantially larger readable text. */
@media (min-width: 901px) and (max-width: 1800px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-normal #accountMenuBtn,
  html body.desktop-tab-layout.user-normal .balance-row { font-size: 13px !important; }
  html body.desktop-tab-layout.user-normal .trade-title-status .eyebrow,
  html body.desktop-tab-layout.user-normal .chart-title-row .eyebrow { font-size: 15px !important; }
  html body.desktop-tab-layout.user-normal .trade-symbol-control .select-input { font-size: 14px !important; }
  html body.desktop-tab-layout.user-normal #effectiveTradeSettings {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    gap: 0 6px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
  }
  html body.desktop-tab-layout.user-normal .prediction-table-head { font-size: 9px !important; }
  html body.desktop-tab-layout.user-normal .prediction-action-cell .pred-side { font-size: 14px !important; }
  html body.desktop-tab-layout.user-normal .prediction-action-cell .pred-minute,
  html body.desktop-tab-layout.user-normal .prediction-action-cell .pred-conf { font-size: 9.5px !important; }
  html body.desktop-tab-layout.user-normal .prediction-info-cell,
  html body.desktop-tab-layout.user-normal .prediction-countdown-value { font-size: 10.5px !important; }
  html body.desktop-tab-layout.user-normal .chart-auto-execution-panel .log-panel-header { font-size: 14px !important; }
  html body.desktop-tab-layout.user-normal .chart-auto-execution-panel .auto-output-box { font-size: 10px !important; line-height: 1.25 !important; }
  html body.desktop-tab-layout.user-normal .desktop-bottom-tab { font-size: 14px !important; }
  html body.desktop-tab-layout.user-normal .ledger-title-line .eyebrow { font-size: 17px !important; }
  html body.desktop-tab-layout.user-normal .daily-pnl-totals { font-size: 15px !important; }
  html body.desktop-tab-layout.user-normal .daily-pnl-totals .pnl-green,
  html body.desktop-tab-layout.user-normal .daily-pnl-totals .pnl-red { font-size: 18px !important; }
  html body.desktop-tab-layout.user-normal .daily-win-rate { font-size: 14px !important; }
  html body.desktop-tab-layout.user-normal #ledgerTable th { font-size: 9px !important; }
  html body.desktop-tab-layout.user-normal #ledgerTable td,
  html body.desktop-tab-layout.user-normal #ledgerTable .ledger-stack,
  html body.desktop-tab-layout.user-normal #ledgerTable .ledger-stack b,
  html body.desktop-tab-layout.user-normal #ledgerTable .ledger-stack em { font-size: 10px !important; line-height: 1.15 !important; }
  html body.desktop-tab-layout.user-normal #ledgerTable td.ledger-col-pnl { font-size: 11px !important; font-weight: 900 !important; }
}

/* v0.5.8 360px Settle fit correction: preserve every prediction-button word. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row.has-open-manual > .prediction-mobile-action-stack {
    grid-template-columns: 27px minmax(0, 1fr) !important;
  }
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row.has-open-manual .mobile-settle {
    width: 27px !important;
    min-width: 27px !important;
    max-width: 27px !important;
    font-size: 6.1px !important;
    letter-spacing: -.2px !important;
  }
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row.has-open-manual .prediction-action-cell {
    grid-template-columns: minmax(31px, 1fr) 24px 25px !important;
  }
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row.has-open-manual .pred-side {
    font-size: 11.2px !important;
  }
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row.has-open-manual .pred-minute,
  html body.phone-tab-layout.user-normal.dpx-phone-portrait.v053-phone-trade-split
  .trade-card #predictions .prediction-mobile-row.has-open-manual .pred-conf {
    font-size: 7.6px !important;
  }
}

/* v0.5.8 tablet manual-Settle fit: keep CALL/PUT, duration and confidence complete. */
@media (min-width: 601px) and (max-width: 900px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-wrap.has-open-manual {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    column-gap: 4px !important;
  }
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-wrap.has-open-manual .prediction-settle-btn {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    padding: 3px 2px !important;
    font-size: 7px !important;
  }
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-wrap.has-open-manual .prediction-action-cell {
    grid-column: 2 !important;
    grid-row: 1 !important;
    grid-template-columns: minmax(32px, 1fr) 26px 24px !important;
    column-gap: 1px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-wrap.has-open-manual .pred-side {
    font-size: 11.5px !important;
  }
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-wrap.has-open-manual .pred-minute,
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-wrap.has-open-manual .pred-conf {
    font-size: 7.6px !important;
  }
}

/* v0.5.8 final responsive font floors: never reduce v0.5.7 typography. */
@media (min-width: 601px) and (max-width: 900px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-normal .demo-layout > .trade-card #effectiveTradeSettings {
    font-size: 8.5px !important;
    line-height: 1.1 !important;
  }
  html body.desktop-tab-layout.user-normal .demo-layout > .trade-card #predictions > .prediction-info-cell,
  html body.desktop-tab-layout.user-normal .demo-layout > .trade-card #predictions > .prediction-info-cell .prediction-countdown-value {
    font-size: 8.6px !important;
  }
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-cell .pred-side,
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-wrap.has-open-manual .pred-side {
    font-size: 12.5px !important;
  }
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-cell .pred-minute,
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-cell .pred-conf,
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-wrap.has-open-manual .pred-minute,
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-wrap.has-open-manual .pred-conf {
    font-size: 9px !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable th {
    font-size: 9.2px !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable td,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-stack,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-stack em {
    font-size: 9.8px !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable td.ledger-col-pnl {
    font-size: 10.2px !important;
  }
  html body.desktop-tab-layout.user-normal .daily-pnl-totals { font-size: 16px !important; }
  html body.desktop-tab-layout.user-normal .daily-pnl-totals .pnl-green,
  html body.desktop-tab-layout.user-normal .daily-pnl-totals .pnl-red { font-size: 17px !important; }
  html body.desktop-tab-layout.user-normal .daily-win-rate { font-size: 14px !important; }
}

@media (min-width: 901px) and (max-width: 1400px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-normal #accountMenuBtn,
  html body.desktop-tab-layout.user-normal .balance-row { font-size: 16px !important; }
  html body.desktop-tab-layout.user-normal .demo-layout > .trade-card #effectiveTradeSettings {
    font-size: 10px !important;
    line-height: 1.15 !important;
  }
  html body.desktop-tab-layout.user-normal .demo-layout > .trade-card #predictions > .prediction-info-cell,
  html body.desktop-tab-layout.user-normal .demo-layout > .trade-card #predictions > .prediction-info-cell .prediction-countdown-value {
    font-size: 10.5px !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable th { font-size: 9.3px !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable td,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-stack,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-stack em { font-size: 10px !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable td.ledger-col-pnl { font-size: 11px !important; }
  html body.desktop-tab-layout.user-normal .daily-pnl-totals { font-size: 17px !important; }
  html body.desktop-tab-layout.user-normal .daily-pnl-totals .pnl-green,
  html body.desktop-tab-layout.user-normal .daily-pnl-totals .pnl-red { font-size: 18px !important; }
  html body.desktop-tab-layout.user-normal .daily-win-rate { font-size: 14px !important; }
  html body.desktop-tab-layout.user-normal .chart-auto-execution-panel .auto-output-box { font-size: 10.5px !important; }
}

@media (min-width: 1401px) and (max-width: 1800px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-normal #accountMenuBtn,
  html body.desktop-tab-layout.user-normal .balance-row { font-size: 16px !important; }
  html body.desktop-tab-layout.user-normal .demo-layout > .trade-card #effectiveTradeSettings {
    font-size: 10px !important;
    line-height: 1.15 !important;
  }
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-cell .pred-side { font-size: 19px !important; }
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-cell .pred-minute,
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-cell .pred-conf { font-size: 14px !important; }
  html body.desktop-tab-layout.user-normal .demo-layout > .trade-card #predictions > .prediction-info-cell,
  html body.desktop-tab-layout.user-normal .demo-layout > .trade-card #predictions > .prediction-info-cell .prediction-countdown-value {
    font-size: 13px !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable th { font-size: 9.5px !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable td,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-stack,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable .ledger-stack em { font-size: 10.2px !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTable td.ledger-col-pnl { font-size: 11.2px !important; }
  html body.desktop-tab-layout.user-normal .daily-pnl-totals { font-size: 17px !important; }
  html body.desktop-tab-layout.user-normal .daily-pnl-totals .pnl-green,
  html body.desktop-tab-layout.user-normal .daily-pnl-totals .pnl-red { font-size: 18px !important; }
  html body.desktop-tab-layout.user-normal .daily-win-rate { font-size: 14.5px !important; }
  html body.desktop-tab-layout.user-normal .chart-auto-execution-panel .auto-output-box { font-size: 11px !important; }
}

/* v0.5.8 final phone Historical font maximization after 360px rendered fit checks. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable th,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable th.ledger-col-pnl {
    font-size: 6.5px !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-inout-cell .phone-value-stack em,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-target-sl-cell .phone-value-stack em,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-made-done-cell .phone-value-stack em {
    font-size: 7.8px !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-trade-cell .phone-trade-stack,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-trade-cell .phone-trade-stack b,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-trade-cell .phone-trade-stack span {
    font-size: 7.6px !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable td.ledger-col-pnl {
    font-size: 9.2px !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .reason-cell {
    font-size: 7.2px !important;
  }
}

/* v0.5.8 tablet prediction labels use the final safe rendered maximum. */
@media (min-width: 601px) and (max-width: 900px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-cell .pred-minute,
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-cell .pred-conf,
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-wrap.has-open-manual .pred-minute,
  html body.desktop-tab-layout.user-normal .trade-card .prediction-action-wrap.has-open-manual .pred-conf {
    font-size: 9.2px !important;
  }
}

/* v0.5.8 inline-preset laptop/tablet fee text must exceed the v0.5.7 8px rule. */
@media (min-width: 901px) and (max-width: 1800px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-normal.v053-laptop-inline-preset
  .trade-card .prediction-workbench > .prediction-order-row > #effectiveTradeSettings {
    font-size: 10px !important;
  }
}

/* ========================================================================== 
   DPX v0.5.8 SAME-NAME FINAL FONT PATCH — requested 2026-07-21
   Scope: normal-user Historical Orders only, at the two approved displays.
   No trading, data, column, prediction, or administrator behavior changes.
   ========================================================================== */

/* Phone portrait: enlarge every font inside the red-marked Historical table.
   Row height is increased because the panel has available vertical space. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable th {
    height: 27px !important;
    padding: 5px 1px !important;
    font-size: 7.8px !important;
    line-height: 1 !important;
    letter-spacing: -.14px !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable th.ledger-col-pnl {
    font-size: 7.8px !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable th::after {
    font-size: .35em !important;
    margin-left: 0 !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable .ledger-col-phoneTrade,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable .phone-trade-cell {
    width: 15.5% !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable .ledger-col-phoneMadeDone,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable .phone-made-done-cell {
    width: 21.5% !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable td {
    height: 52px !important;
    padding: 5px 2px !important;
    font-size: 8.5px !important;
    line-height: 1.12 !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-trade-cell .phone-trade-stack,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-trade-cell .phone-trade-stack b,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-trade-cell .phone-trade-stack span {
    font-size: 9.5px !important;
    line-height: 1.12 !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-inout-cell .phone-value-stack em,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-target-sl-cell .phone-value-stack em,
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #ledgerTable .phone-made-done-cell .phone-value-stack em {
    font-size: 10.2px !important;
    line-height: 1.14 !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable td.ledger-col-pnl {
    font-size: 12.5px !important;
    line-height: 1.08 !important;
  }
  html body.phone-tab-layout.user-normal.non-admin-ledger.dpx-phone-ledger-user
  #phoneHistoryPanel #ledgerTableWrap #ledgerTable .reason-cell {
    font-size: 8.5px !important;
    line-height: 1.12 !important;
    overflow-wrap: anywhere !important;
  }
}

/* Laptop/desktop normal-user Historical Orders: use the available table width,
   then enlarge headers, values, stack labels and stack values without hiding text. */
@media (min-width: 901px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable {
    width: 100% !important;
    min-width: 100% !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-col-tradeCount { width: 7% !important; min-width: 0 !important; max-width: none !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-col-side { width: 5.5% !important; min-width: 0 !important; max-width: none !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-col-stake { width: 6.5% !important; min-width: 0 !important; max-width: none !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-col-symbol { width: 7.5% !important; min-width: 0 !important; max-width: none !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-col-entryExit,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .entry-exit-cell { width: 10% !important; min-width: 0 !important; max-width: none !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-col-stopLoss,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .stop-loss-cell { width: 10% !important; min-width: 0 !important; max-width: none !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-col-targetExit,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .target-exit-cell { width: 10% !important; min-width: 0 !important; max-width: none !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-col-createdSettled,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .created-settled-cell { width: 15% !important; min-width: 0 !important; max-width: none !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-col-duration { width: 7% !important; min-width: 0 !important; max-width: none !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-col-pnl { width: 7% !important; min-width: 0 !important; max-width: none !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-col-closeReason,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .reason-cell { width: 14.5% !important; min-width: 0 !important; max-width: none !important; }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable th {
    padding: 6px 7px !important;
    font-size: 16px !important;
    line-height: 1.08 !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable td {
    height: 54px !important;
    padding: 6px 7px !important;
    font-size: 16.5px !important;
    line-height: 1.14 !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-stack-line {
    grid-template-columns: 32px minmax(0, 1fr) !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .entry-exit-stack .ledger-stack-line {
    grid-template-columns: 28px minmax(0, 1fr) !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .created-settled-stack .ledger-stack-line {
    grid-template-columns: 40px minmax(0, 1fr) !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-stack-line b,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .stack-label {
    font-size: 11.5px !important;
    line-height: 1.15 !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .ledger-stack-line em,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .stack-value {
    font-size: 15.5px !important;
    line-height: 1.1 !important;
  }
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable td.ledger-col-pnl,
  html body.desktop-tab-layout.user-normal.non-admin-ledger #ledgerTableWrap #ledgerTable .reason-cell {
    font-size: 16.5px !important;
  }
}


/* ========================================================================
   DPX v0.5.9 — administrator laptop typography parity outside the ledger,
   prediction-frame bottom alignment, role-switch stability and delete modal.
   IMPORTANT: no selector in this block targets the administrator Historical
   Orders table or its daily summary; those v0.5.8 ledger sizes stay unchanged.
   ======================================================================== */
@media (min-width: 901px) and (min-height: 601px) {
  /* Shared normal-user laptop sizes outside Historical Orders. */
  html body.desktop-tab-layout.user-admin #accountMenuBtn,
  html body.desktop-tab-layout.user-admin .balance-row { font-size: 16px !important; }
  html body.desktop-tab-layout.user-admin .eyebrow,
  html body.desktop-tab-layout.user-admin .log-panel-header strong { font-size: 14px !important; }
  html body.desktop-tab-layout.user-admin #horizonSelect,
  html body.desktop-tab-layout.user-admin #refreshBtn { font-size: 15px !important; }
  html body.desktop-tab-layout.user-admin #symbolSelect { font-size: 14px !important; }
  html body.desktop-tab-layout.user-admin #effectiveTradeSettings {
    font-size: 10px !important;
    line-height: 1.15 !important;
  }
  html body.desktop-tab-layout.user-admin .mini-clear-btn { font-size: 9px !important; }

  html body.desktop-tab-layout .demo-layout > .trade-card {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    height: 100% !important;
  }
  html body.desktop-tab-layout .trade-card .trade-toolbar { flex: 0 0 auto !important; }
  html body.desktop-tab-layout .trade-card .prediction-workbench {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  html body.desktop-tab-layout .trade-card .prediction-panel {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  html body.desktop-tab-layout .trade-card #predictions.prediction-table-layout {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    align-content: stretch !important;
    grid-template-rows: auto repeat(6, minmax(34px, 1fr)) !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  html body.desktop-tab-layout .trade-card .prediction-action-cell,
  html body.desktop-tab-layout .trade-card .prediction-info-cell,
  html body.desktop-tab-layout .trade-card .prediction-action-wrap,
  html body.desktop-tab-layout .trade-card .prediction-action { min-height: 0 !important; height: 100% !important; }
}

@media (min-width: 901px) and (max-width: 1400px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-admin .trade-card .prediction-action-cell .pred-side { font-size: 14px !important; }
  html body.desktop-tab-layout.user-admin .trade-card .prediction-action-cell .pred-minute,
  html body.desktop-tab-layout.user-admin .trade-card .prediction-action-cell .pred-conf { font-size: 9.5px !important; }
  html body.desktop-tab-layout.user-admin .trade-card #predictions > .prediction-info-cell,
  html body.desktop-tab-layout.user-admin .trade-card #predictions > .prediction-info-cell .prediction-countdown-value { font-size: 10.5px !important; }
  html body.desktop-tab-layout.user-admin .chart-auto-execution-panel .auto-output-box { font-size: 10.5px !important; }
}

@media (min-width: 1401px) and (max-width: 1800px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-admin .trade-card .prediction-action-cell .pred-side { font-size: 19px !important; }
  html body.desktop-tab-layout.user-admin .trade-card .prediction-action-cell .pred-minute,
  html body.desktop-tab-layout.user-admin .trade-card .prediction-action-cell .pred-conf { font-size: 14px !important; }
  html body.desktop-tab-layout.user-admin .trade-card #predictions > .prediction-info-cell,
  html body.desktop-tab-layout.user-admin .trade-card #predictions > .prediction-info-cell .prediction-countdown-value { font-size: 13px !important; }
  html body.desktop-tab-layout.user-admin .chart-auto-execution-panel .auto-output-box { font-size: 11px !important; }
}

.dpx-typed-delete-backdrop { z-index: 10050 !important; }
.dpx-typed-delete-modal {
  width: min(680px, calc(100vw - 28px)) !important;
  max-width: 680px !important;
  padding: 28px !important;
  font-size: 18px !important;
  line-height: 1.45 !important;
}
.dpx-typed-delete-modal .dpx-profile-title { font-size: 28px !important; }
.dpx-delete-account-label { font-size: 20px !important; }
.dpx-delete-account-label span { opacity: .78; }
.dpx-delete-type-label { display: grid; gap: 8px; margin-top: 18px; font-size: 18px !important; }
.dpx-delete-type-label input { width: 100%; min-height: 52px; padding: 10px 14px; font-size: 22px !important; }
.dpx-typed-delete-modal .dpx-modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.dpx-typed-delete-modal .dpx-modal-actions button { min-height: 48px; padding: 10px 18px; font-size: 17px !important; }
.dpx-typed-delete-modal .danger-btn:disabled { opacity: .45; cursor: not-allowed; }
.model-score-choice .help-dot { display: inline-grid; place-items: center; }

/* DPX v0.5.11: keep setting help controls readable without crowding inputs. */
.auto-setting-inputs,
.auto-rule-details .auto-setting-inputs,
.auto-collapsible-grid.logic-expanded-view .auto-setting-inputs {
  column-gap: 10px !important;
  row-gap: 8px !important;
}
.auto-setting-inputs label > span {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.auto-setting-inputs .help-dot {
  flex: 0 0 auto;
}

/* ========================================================================
   DPX v0.5.9 same-name Patch 2 — laptop typography corrections only.
   1) Administrator Fee / SL / Daily limit matches normal-user laptop size.
   2) Normal-user prediction headers match administrator laptop size.
   No ledger, trading logic, authentication, scheduler or data selectors.
   ======================================================================== */
@media (min-width: 901px) and (max-width: 1800px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-admin .demo-layout > .trade-card #effectiveTradeSettings,
  html body.desktop-tab-layout.user-admin .demo-layout > .trade-card #effectiveTradeSettings .effective-trade-line {
    font-size: 10px !important;
    line-height: 1.15 !important;
  }
}

@media (min-width: 901px) and (max-width: 1400px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-normal .demo-layout > .trade-card #predictions > .prediction-table-head {
    font-size: 8px !important;
  }
}

@media (min-width: 1401px) and (max-width: 1800px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-normal .demo-layout > .trade-card #predictions > .prediction-table-head {
    font-size: 12px !important;
  }
}

/* Specificity lock for the v0.5.9 laptop inline-preset layout. */
@media (min-width: 901px) and (max-width: 1800px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-admin.v053-laptop-inline-preset
  .demo-layout > .trade-card .prediction-workbench > .prediction-order-row > #effectiveTradeSettings,
  html body.desktop-tab-layout.user-admin.v053-laptop-inline-preset
  .demo-layout > .trade-card .prediction-workbench > .prediction-order-row > #effectiveTradeSettings .effective-trade-line {
    font-size: 10px !important;
    line-height: 1.15 !important;
  }
}

@media (min-width: 1401px) and (max-width: 1800px) and (min-height: 601px) {
  html body.desktop-tab-layout.user-normal .demo-layout > .trade-card #predictions > .prediction-table-head.prediction-countdown-head {
    font-size: 10px !important;
  }
}

/* DPX v0.5.11 same-version layout correction.
   PC: genuinely shorten the numeric-settings area so a clear gutter remains
   after the checkbox column.
   Phone: keep the Setting tab inside the available lower-panel height and let
   that panel scroll vertically through every setting. */
@media (min-width: 981px) and (min-height: 601px) {
  .combined-settlement-risk .auto-setting-split {
    column-gap: 18px !important;
  }
  .combined-settlement-risk .auto-setting-inputs,
  .auto-rule-details .combined-settlement-risk .auto-setting-inputs,
  .auto-collapsible-grid.logic-expanded-view .combined-settlement-risk .auto-setting-inputs {
    width: calc(100% - 12px) !important;
    justify-self: end !important;
  }
}

@media (max-width: 600px) and (orientation: portrait),
       (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  body.phone-tab-layout.phone-tab-setting .phone-tab-panels {
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.phone-tab-layout.phone-tab-setting #phoneSettingPanel[aria-hidden="false"] {
    box-sizing: border-box !important;
    display: block !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
    scrollbar-width: thin !important;
    padding-bottom: max(24px, env(safe-area-inset-bottom)) !important;
  }
  body.phone-tab-layout.phone-tab-setting #phoneSettingPanel[aria-hidden="false"]::-webkit-scrollbar {
    display: block !important;
    width: 4px !important;
  }
  body.phone-tab-layout.phone-tab-setting #phoneSettingPanel .combined-settlement-risk,
  body.phone-tab-layout.phone-tab-setting #phoneSettingPanel .auto-setting-split,
  body.phone-tab-layout.phone-tab-setting #phoneSettingPanel .auto-setting-checks,
  body.phone-tab-layout.phone-tab-setting #phoneSettingPanel .auto-setting-inputs {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.phone-tab-layout.phone-tab-setting #phoneSettingPanel .auto-setting-inputs {
    width: 100% !important;
  }
}
/* ========================================================================== 
   DPX v0.6.1 — screenshot-derived splash, notice and Coinbase Futures UI.
   ========================================================================== */
:root {
  --dpx-heading-font: Inter, "Segoe UI", Arial, sans-serif;
  --dpx-heading-weight: 800;
  --dpx-heading-spacing: .055em;
  --dpx-electric-blue: #1288ff;
  --dpx-deep-blue: #04122f;
}
.dpx-splash-screen[hidden], .dpx-message-board[hidden] { display: none !important; }
.dpx-splash-screen {
  position: fixed; inset: 0; z-index: 12000; display: grid; place-items: center;
  background: #020b25; overflow: hidden;
}
.dpx-splash-artboard { position: relative; width: 100vw; height: 100vh; overflow: hidden; }
.dpx-splash-artboard > img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.dpx-splash-go-hotspot {
  position: absolute; left: 76.6%; top: 42.3%; width: 11.8%; aspect-ratio: 1;
  border-radius: 50%; border: 0; color: transparent; background: transparent; cursor: pointer;
  box-shadow: 0 0 0 0 rgba(29,255,124,.55); transition: transform .18s ease, box-shadow .18s ease;
}
.dpx-splash-go-hotspot:hover, .dpx-splash-go-hotspot:focus-visible { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(29,255,124,.24), 0 0 34px rgba(29,255,124,.8); outline: none; }
body.dpx-splash-active { overflow: hidden !important; }
.dpx-message-board {
  position: relative; z-index: 20; width: min(100% - 20px, 1460px); margin: 10px auto 0;
  border: 1px solid rgba(40,147,255,.62); border-radius: 16px; overflow: hidden;
  background: #020c29; box-shadow: 0 12px 40px rgba(0,0,0,.34);
}
.dpx-message-artboard { position: relative; min-height: 190px; max-height: 38vh; overflow: hidden; }
.dpx-message-artboard > img { width: 100%; height: 100%; min-height: 190px; max-height: 38vh; object-fit: cover; object-position: center; display: block; }
.dpx-hide-message-btn {
  position: absolute; right: 22px; bottom: 18px; z-index: 2; min-width: 140px; padding: 11px 20px;
  color: #fff; font: 800 14px/1 var(--dpx-heading-font); letter-spacing: .04em;
  background: linear-gradient(180deg,#198cff,#075bc7); border: 1px solid #6ec4ff; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,81,217,.46); cursor: pointer;
}
.dpx-hide-message-btn:hover { filter: brightness(1.13); }
body.dpx-notice-visible #desktopBottomTabs, body.dpx-notice-visible #phoneHistoryPanel { display: none !important; }
.trade-heading .trade-title-status { flex-wrap: wrap; gap: 7px; }
.dpx-swap-btn, .dpx-hide-trading-btn { white-space: nowrap; }
body.manual-trend-swapped .demo-layout { display: flex !important; flex-direction: column; }
body.manual-trend-swapped .demo-layout .trade-card { order: 1; }
body.manual-trend-swapped .demo-layout .chart-zone { order: 2; }
.coinbase-account-panel, .account-activity-panel {
  margin-top: 16px; padding: 16px; border: 1px solid rgba(51,153,255,.38); border-radius: 13px;
  background: linear-gradient(145deg,rgba(6,31,69,.96),rgba(3,17,46,.98));
}
.coinbase-panel-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.coinbase-panel-heading h3, .account-activity-panel h3 { margin: 0; color: #eff8ff; font: 800 16px/1.2 var(--dpx-heading-font); letter-spacing: .04em; }
.coinbase-panel-heading p { margin: 4px 0 0; color: #8fb8db; font-size: 12px; }
.coinbase-status-pill { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; color: #ffd37a; background: rgba(255,169,31,.12); border: 1px solid rgba(255,190,79,.45); font-size: 12px; font-weight: 800; }
.coinbase-status-pill.connected { color: #74f2ad; background: rgba(15,183,97,.12); border-color: rgba(46,224,133,.5); }
.coinbase-account-panel > label { display: grid; gap: 6px; margin-top: 10px; color: #b9d3eb; font-size: 12px; font-weight: 700; }
.coinbase-private-key { min-height: 105px; resize: vertical; font: 12px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.coinbase-account-status { margin: 10px 0; min-height: 20px; color: #bcd7f2; font-size: 12px; }
.coinbase-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-activity-wrap { margin-top: 10px; max-height: 210px; overflow: auto; }
.account-activity-panel table { width: 100%; border-collapse: collapse; color: #dceeff; font-size: 12px; }
.account-activity-panel th, .account-activity-panel td { padding: 8px; text-align: left; border-bottom: 1px solid rgba(111,165,211,.18); vertical-align: top; }
.dpx-profile-v061 .dpx-profile-dialog { width: min(900px,calc(100vw - 24px)); max-height: min(92vh,960px); overflow-y: auto !important; }
.broker-live-summary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.broker-live-summary small { color: #9db8d1; min-width: 38px; }
.dpx-settle-live { padding: 5px 9px !important; min-height: 0 !important; }
.broker-pending { color: #ffd06a; font-weight: 800; white-space: nowrap; }
.prediction-panel .prediction-table-layout, .ledger-title-line .eyebrow,
.prediction-table-layout .prediction-table-head, .prediction-table-layout .prediction-row {
  font-family: var(--dpx-heading-font); font-weight: var(--dpx-heading-weight); letter-spacing: var(--dpx-heading-spacing);
}
@media (max-width: 700px) {
  .dpx-splash-artboard > img { object-position: 63% center; }
  .dpx-splash-go-hotspot { left: 66%; top: 45%; width: 24%; }
  .dpx-message-board { width: calc(100% - 12px); margin-top: 6px; border-radius: 10px; }
  .dpx-message-artboard, .dpx-message-artboard > img { min-height: 150px; max-height: 31vh; }
  .dpx-message-artboard > img { object-position: 62% center; }
  .dpx-hide-message-btn { right: 10px; bottom: 10px; min-width: 110px; padding: 9px 14px; }
  .dpx-profile-v061 .dpx-profile-dialog { width: calc(100vw - 10px); max-height: calc(100vh - 10px); }
  .coinbase-panel-heading { align-items: stretch; flex-direction: column; }
  .coinbase-status-pill { align-self: flex-start; }
  .broker-live-summary { flex-direction: column; gap: 3px; }
}

/* DPX v0.6.1 consolidated patches — authoritative M6 layout and account modes. */
.effective-trade-settings {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(max-content, 1fr)) !important;
  align-items: center !important;
  gap: 6px 12px !important;
  min-width: 0 !important;
  white-space: normal !important;
}
.effective-trade-item {
  display: block !important;
  min-width: 0 !important;
  padding: 5px 8px !important;
  border: 1px solid rgba(110, 174, 226, .24);
  border-radius: 7px;
  text-align: center;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coinbase-real-money-warning {
  flex: 1 1 100%;
  padding: 9px 14px;
  border: 1px solid rgba(255, 90, 90, .72);
  border-radius: 9px;
  color: #fff2f2;
  background: linear-gradient(90deg, rgba(157, 18, 28, .92), rgba(104, 8, 16, .92));
  box-shadow: 0 0 22px rgba(255, 48, 63, .2);
  font: 900 13px/1.25 var(--dpx-heading-font);
  letter-spacing: .055em;
  text-align: center;
}
.coinbase-portfolio-card { padding: 14px !important; }
.coinbase-balance-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
.coinbase-balance-summary > div {
  display: grid;
  gap: 5px;
  padding: 11px 13px;
  border: 1px solid rgba(47, 163, 255, .34);
  border-radius: 10px;
  background: rgba(4, 29, 63, .72);
}
.coinbase-balance-summary span { color: #9fc3df; font-size: 12px; font-weight: 700; }
.coinbase-balance-summary strong { color: #f2fbff; font-size: clamp(19px, 2vw, 27px); }
.coinbase-balance-summary > small { grid-column: 1 / -1; color: #8db1ce; text-align: right; }
.coinbase-holdings-wrap { margin-top: 10px; overflow-x: auto; }
.coinbase-holdings-table { width: 100%; min-width: 710px; border-collapse: collapse; color: #dcecff; font-size: 12px; }
.coinbase-holdings-table th, .coinbase-holdings-table td { padding: 8px 9px; border-bottom: 1px solid rgba(110, 161, 204, .18); text-align: right; }
.coinbase-holdings-table th:first-child, .coinbase-holdings-table td:first-child,
.coinbase-holdings-table th:nth-child(2), .coinbase-holdings-table td:nth-child(2) { text-align: left; }
.coinbase-holdings-table td strong, .coinbase-holdings-table td small { display: block; }
.coinbase-holdings-table td small { margin-top: 2px; color: #86aac8; }
.coinbase-unpriced-note { margin-top: 8px; color: #ffd47e; font-size: 12px; }
body.coinbase-real-mode #autoTradingCard { position: relative; }
body.coinbase-real-mode #autoTradingCard::after {
  content: "Auto Trading unavailable while Coinbase real-money manual mode is connected";
  display: block;
  margin: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 190, 77, .44);
  border-radius: 8px;
  color: #ffd98a;
  background: rgba(94, 55, 2, .2);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
body.coinbase-real-mode #autoTradingCard .auto-conditions-grid,
body.coinbase-real-mode #autoTradingCard .auto-heading-actions { opacity: .42; pointer-events: none; }

/* The M6 splash occupies its approved panels inside the ordinary DPX page. */
.dpx-splash-screen {
  position: relative !important;
  inset: auto !important;
  z-index: 4 !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  border-radius: inherit;
  background: #020b25;
  overflow: hidden;
}
.dpx-splash-artboard {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1946 / 1272;
}
.dpx-splash-artboard > img { object-fit: cover; object-position: center; }
.dpx-splash-go-hotspot { left: 76.6%; top: 42.3%; width: 11.8%; }
body.dpx-splash-active { overflow: auto !important; }
.dpx-message-board {
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: inherit !important;
  box-shadow: none !important;
}
.dpx-message-artboard { min-height: 0 !important; max-height: none !important; aspect-ratio: 1454 / 1036; }
.dpx-message-artboard > img { min-height: 0 !important; max-height: none !important; object-fit: cover; }
body.dpx-splash-in-page .trade-card > :not(#dpxSplashScreen),
body.dpx-splash-in-page #phoneHistoryPanel > :not(#dpxMessageBoard),
body.dpx-notice-visible #phoneHistoryPanel > :not(#dpxMessageBoard) { display: none !important; }
body.dpx-splash-in-page #desktopBottomTabs,
body.dpx-splash-in-page #phoneBottomTabs,
body.dpx-notice-visible #desktopBottomTabs,
body.dpx-notice-visible #phoneBottomTabs { display: none !important; }
body.dpx-notice-visible #phoneHistoryPanel { display: block !important; }

/* Swap is an M6 phone-only vertical exchange, placed at the tab bar's far right. */
.dpx-swap-btn { display: none !important; }
body.phone-tab-layout .dpx-swap-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 54px !important;
  min-height: 28px !important;
  margin-left: auto;
  padding: 4px 8px !important;
  font-size: 10px !important;
}
body.phone-tab-layout .phone-tab-list {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto !important;
  align-items: center;
}
body.phone-tab-layout.user-normal .phone-tab-list,
body.phone-tab-layout.non-admin-ledger .phone-tab-list { grid-template-columns: repeat(2, minmax(0, 1fr)) auto !important; }
body.phone-tab-layout.manual-trend-swapped .demo-layout {
  display: block !important;
}
body.phone-tab-layout.manual-trend-swapped .demo-layout > #phoneChartPanel {
  display: flex !important;
  width: 100% !important;
  min-height: 330px !important;
}
body.phone-tab-layout.manual-trend-swapped #phoneTabPanels > .trade-card[aria-hidden="false"] {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
body.phone-tab-layout.manual-trend-swapped #phoneTabPanels > .trade-card[aria-hidden="true"] { display: none !important; }
.broker-fee-stack { display: inline-grid; gap: 2px; min-width: 84px; white-space: nowrap; }
.broker-fee-stack small { color: #9ebad2; }

@media (max-width: 720px) {
  .effective-trade-settings { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 4px !important; }
  .effective-trade-item { padding: 4px 3px !important; font-size: 10px !important; }
  .coinbase-balance-summary { grid-template-columns: 1fr; }
  .dpx-splash-artboard > img { object-position: center; }
  .dpx-splash-go-hotspot { left: 76.6%; top: 42.3%; width: 11.8%; }
  .dpx-message-artboard > img { object-position: center; }
}

/* ========================================================================== 
   DPX v0.6.1 additional patches — final responsive and account-state layer.
   This block intentionally runs last to neutralize older same-version mobile
   compatibility rules without changing trading calculations.
   ========================================================================== */
.dpx-hide-message-btn { display: none !important; }
.dpx-message-arrow {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  width: 16%;
  height: 100%;
  min-width: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: transparent;
  background: transparent;
  cursor: pointer;
}
.dpx-message-arrow:focus-visible {
  outline: 3px solid #82d3ff;
  outline-offset: -5px;
  background: rgba(18, 136, 255, .12);
}

.coinbase-real-money-warning {
  box-sizing: border-box;
  min-width: 0 !important;
  width: 100%;
  max-width: 100%;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
  word-break: normal;
}
body.coinbase-real-mode .session-bar {
  display: grid !important;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
}
body.coinbase-real-mode .session-balance-slot,
body.coinbase-real-mode .session-balance-slot .balance-row,
body.coinbase-real-mode .trade-card .balance-row { display: none !important; }
body.coinbase-real-mode .coinbase-real-money-warning {
  display: block !important;
  grid-column: 2;
  grid-row: 1;
}

.coinbase-portfolio-card,
.coinbase-balance-summary,
.coinbase-holdings-wrap { box-sizing: border-box; min-width: 0 !important; max-width: 100%; }

/* The tab content must size from its content; legacy fixed-height stages caused
   a visible tab bar followed by an empty panel. */
body.phone-tab-layout .phone-tab-panels {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}
body.phone-tab-layout .phone-tab-panels > [aria-hidden="true"] { display: none !important; }
body.phone-tab-layout .phone-tab-panels > [aria-hidden="false"] {
  display: block !important;
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 180px !important;
  max-height: none !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
}
body.phone-tab-layout #phoneHistoryPanel[aria-hidden="false"] { display: block !important; }
body.phone-tab-layout #phoneHistoryPanel #ledgerTableWrap {
  display: block !important;
  min-height: 150px !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}
body.phone-tab-layout .phone-auto-panel[aria-hidden="false"],
body.phone-tab-layout .phone-auto-panel[aria-hidden="false"] > * {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

@media (max-width: 600px) and (orientation: portrait) {
  html, body { min-width: 0 !important; width: 100% !important; overflow-x: hidden !important; }
  .app-shell { width: 100% !important; min-width: 0 !important; padding-inline: 4px !important; }
  .session-bar { min-width: 0 !important; }
  body.coinbase-real-mode .session-bar {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.coinbase-real-mode .session-account-slot,
  body.coinbase-real-mode .coinbase-real-money-warning { grid-column: 1; }
  body.coinbase-real-mode .session-account-slot { grid-row: 1; }
  body.coinbase-real-mode .coinbase-real-money-warning {
    grid-row: 2;
    padding: 8px 10px !important;
    font-size: clamp(10px, 3.2vw, 13px) !important;
    line-height: 1.3 !important;
    letter-spacing: .035em !important;
  }
  .coinbase-portfolio-card { padding: 8px !important; overflow: hidden !important; }
  .coinbase-balance-summary { grid-template-columns: minmax(0, 1fr) !important; }
  .coinbase-balance-summary > div { min-width: 0; padding: 9px 10px; }
  .coinbase-balance-summary strong { font-size: clamp(20px, 7vw, 28px) !important; overflow-wrap: anywhere; }
  .coinbase-balance-summary > small { text-align: left !important; overflow-wrap: anywhere; }
  .coinbase-holdings-wrap { overflow: visible !important; }
  .coinbase-holdings-table,
  .coinbase-holdings-table tbody { display: block !important; width: 100% !important; min-width: 0 !important; }
  .coinbase-holdings-table thead { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; }
  .coinbase-holdings-table tr {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 8px 0;
    border: 1px solid rgba(110, 161, 204, .25);
    border-radius: 9px;
    overflow: hidden;
  }
  .coinbase-holdings-table td {
    display: grid !important;
    grid-template-columns: minmax(58px, auto) minmax(0, 1fr);
    gap: 7px;
    align-items: center;
    min-width: 0;
    padding: 7px 8px !important;
    text-align: right !important;
    overflow-wrap: anywhere;
  }
  .coinbase-holdings-table td::before {
    content: attr(data-label);
    color: #8fb4d2;
    font-size: 10px;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
  }
  .coinbase-holdings-table td:first-child { grid-column: 1 / -1; text-align: right !important; }
  .coinbase-holdings-table td strong,
  .coinbase-holdings-table td small { min-width: 0; overflow-wrap: anywhere; }

  body.phone-tab-layout .demo-layout {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  body.phone-tab-layout .demo-layout > .trade-card,
  body.phone-tab-layout .demo-layout > #phoneChartPanel,
  body.phone-tab-layout #phoneTabPanels > .trade-card {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.phone-tab-layout .trade-card .trade-heading,
  body.phone-tab-layout .trade-card .trade-market-row,
  body.phone-tab-layout .trade-card .prediction-order-row,
  body.phone-tab-layout .trade-card .prediction-workbench,
  body.phone-tab-layout .trade-card .prediction-panel,
  body.phone-tab-layout .trade-card #predictions {
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.phone-tab-layout .trade-card .trade-title-status { width: 100% !important; min-width: 0 !important; }
  body.phone-tab-layout .trade-card .prediction-order-row {
    display: grid !important;
    grid-template-columns: minmax(90px, .75fr) minmax(0, 1.25fr) !important;
    gap: 6px !important;
    align-items: stretch !important;
  }
  body.phone-tab-layout .effective-trade-settings {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
  }
  body.phone-tab-layout .effective-trade-limit { grid-column: 1 / -1; }
  body.phone-tab-layout .effective-trade-item {
    display: block !important;
    min-width: 0 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    font-size: 10px !important;
  }
  body.phone-tab-layout .prediction-action,
  body.phone-tab-layout .prediction-action button,
  body.phone-tab-layout .prediction-row { visibility: visible !important; }
  body.phone-tab-layout .phone-tab-list {
    grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(52px, auto) !important;
    width: 100% !important;
    overflow: visible !important;
  }
  body.phone-tab-layout .phone-bottom-tab {
    min-width: 0 !important;
    padding-inline: 2px !important;
    font-size: clamp(8px, 2.7vw, 11px) !important;
  }
  body.phone-tab-layout .dpx-swap-btn { min-width: 52px !important; margin: 0 !important; }
  body.phone-tab-layout #phoneChartPanel[aria-hidden="false"],
  body.phone-tab-layout.manual-trend-swapped .demo-layout > #phoneChartPanel {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
  }
  body.phone-tab-layout #phoneChartPanel[aria-hidden="true"] { display: none !important; }
  body.phone-tab-layout #phoneChartPanel #tvChart,
  body.phone-tab-layout #phoneChartPanel #sparkline {
    width: 100% !important;
    height: 285px !important;
    min-height: 285px !important;
    max-height: 285px !important;
  }
  body.phone-tab-layout #phoneChartPanel .chart-auto-execution-panel {
    display: block !important;
    height: auto !important;
    min-height: 64px !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.phone-tab-layout.manual-trend-swapped #phoneChartTab { display: none !important; }
  body.phone-tab-layout.manual-trend-swapped #phoneTabPanels > .trade-card[aria-hidden="false"] { min-height: 0 !important; }
}

/* Rotated phones use the same two-column, complete desktop arrangement. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html, body { min-width: 0 !important; overflow-x: auto !important; }
  body.desktop-tab-layout .app-shell { width: 100% !important; min-width: 760px !important; padding: 4px !important; }
  body.desktop-tab-layout .hero {
    height: auto !important;
    min-height: 70px !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.desktop-tab-layout .hero .status-box {
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    min-height: 52px !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout .demo-layout {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  body.desktop-tab-layout .demo-layout > #phoneChartPanel,
  body.desktop-tab-layout .demo-layout > .trade-card {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 340px !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout #phoneChartPanel #tvChart,
  body.desktop-tab-layout #phoneChartPanel #sparkline { min-height: 220px !important; height: 220px !important; }
  body.desktop-tab-layout .market-card .candle-title-row {
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 5px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    overflow: hidden !important;
  }
  body.desktop-tab-layout .market-card .candle-title-row > .eyebrow {
    min-width: 0 !important;
    font-size: 11px !important;
    letter-spacing: .08em !important;
    white-space: nowrap !important;
  }
  body.desktop-tab-layout .market-card .candle-toolbar {
    display: grid !important;
    grid-template-columns: minmax(72px, .9fr) minmax(88px, 1.2fr) minmax(64px, .8fr) !important;
    align-items: center !important;
    gap: 3px !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  body.desktop-tab-layout .market-card .horizon-inline > span { display: none !important; }
  body.desktop-tab-layout .market-card #horizonSelect,
  body.desktop-tab-layout .market-card #refreshBtn {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 3px 7px !important;
    font-size: 10px !important;
  }
  body.desktop-tab-layout .market-card #candleCountdown {
    min-width: 0 !important;
    font-size: 9px !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
  body.desktop-tab-layout .trade-card .prediction-workbench,
  body.desktop-tab-layout .trade-card .prediction-panel,
  body.desktop-tab-layout .trade-card #predictions { height: auto !important; min-height: 0 !important; max-height: none !important; }
  body.desktop-tab-layout .desktop-bottom-tabs,
  body.desktop-tab-layout .desktop-tab-panels { width: 100% !important; min-width: 0 !important; }
  body.desktop-tab-layout .desktop-tab-panels > [aria-hidden="false"],
  body.desktop-tab-layout .desktop-tab-panels > .ledger-card { height: auto !important; min-height: 180px !important; max-height: none !important; }
  body.desktop-tab-layout .coinbase-real-money-warning { font-size: 10px !important; line-height: 1.25 !important; }
}

/* ========================================================================== 
   DPX v0.6.1 new patch list — verified scroll-first responsive layer.
   Restores the compact v0.5.13 phone typography while removing every legacy
   fixed-viewport trap that hid trading controls or selected tab content.
   ========================================================================== */
.dpx-settle-paper,
.dpx-settle-live {
  box-sizing: border-box;
  min-height: 28px !important;
  padding: 5px 9px !important;
}
.pnl-neutral { color: #d8e6f3; }
.live-paper-pnl { font-variant-numeric: tabular-nums; font-weight: 800; }
.paper-live-summary { min-width: 112px; }
body.coinbase-real-mode #autoRunToggleBtn,
body.coinbase-real-mode #autoTradingCard :is(input, select, textarea, button) {
  opacity: .46 !important;
  filter: grayscale(.7) !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* The phone prediction row no longer owns a tiny secondary Settle control.
   Settlement is available in the selected Historical row instead. */
body.phone-tab-layout .prediction-settle-btn,
body.phone-tab-layout .prediction-mobile-settle,
body.phone-tab-layout .mobile-settle { display: none !important; }

@media (max-width: 600px) and (orientation: portrait) {
  html,
  html body.phone-tab-layout {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  html body.phone-tab-layout .app-shell {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100dvh !important;
    max-height: none !important;
    padding: 3px 4px max(18px, env(safe-area-inset-bottom)) !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout .hero,
  html body.phone-tab-layout .session-bar,
  html body.phone-tab-layout .coinbase-portfolio-card,
  html body.phone-tab-layout .demo-layout,
  html body.phone-tab-layout .trade-card,
  html body.phone-tab-layout .phone-bottom-tabs,
  html body.phone-tab-layout .phone-tab-panels,
  html body.phone-tab-layout .phone-tab-panels > [aria-hidden="false"] {
    flex: 0 0 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout .trade-card { padding: 4px !important; }
  html body.phone-tab-layout .trade-heading,
  html body.phone-tab-layout .trade-market-row { min-height: 0 !important; max-height: none !important; }
  html body.phone-tab-layout .prediction-mobile-list { gap: 1px !important; }
  html body.phone-tab-layout .prediction-mobile-row {
    min-height: 36px !important;
    height: 36px !important;
    max-height: 36px !important;
    grid-template-columns: minmax(112px, 1.18fr) minmax(58px, .62fr) minmax(43px, .46fr) minmax(40px, .43fr) minmax(50px, .52fr) !important;
    gap: 1px !important;
    padding: 1px !important;
  }
  html body.phone-tab-layout .prediction-mobile-row .pred-side { font-size: 14px !important; }
  html body.phone-tab-layout .prediction-mobile-row .pred-minute,
  html body.phone-tab-layout .prediction-mobile-row .pred-conf,
  html body.phone-tab-layout .prediction-mobile-row > span em,
  html body.phone-tab-layout .prediction-countdown-value { font-size: 9px !important; }
  html body.phone-tab-layout .prediction-mobile-row > span b { font-size: 6.5px !important; }
  html body.phone-tab-layout .phone-tab-panels > [aria-hidden="true"] { display: none !important; }
  html body.phone-tab-layout .phone-tab-panels > [aria-hidden="false"] {
    display: block !important;
    min-height: 180px !important;
  }
  html body.phone-tab-layout #phoneHistoryPanel #ledgerTableWrap,
  html body.phone-tab-layout .phone-auto-panel[aria-hidden="false"] {
    height: auto !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
  }
  html body.phone-tab-layout.manual-trend-swapped,
  html body.phone-tab-layout.manual-trend-swapped .app-shell,
  html body.phone-tab-layout.manual-trend-swapped .demo-layout,
  html body.phone-tab-layout.manual-trend-swapped .phone-tab-panels {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: visible !important;
  }
}

/* Rotated phones retain the complete PC two-column design, but the document is
   scrollable in both directions when a small landscape viewport needs it. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html,
  html body,
  html body.desktop-tab-layout {
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  html body.desktop-tab-layout .app-shell {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 760px !important;
    max-width: none !important;
    height: auto !important;
    min-height: 100dvh !important;
    max-height: none !important;
    overflow: visible !important;
  }
  html body.desktop-tab-layout .coinbase-portfolio-card,
  html body.desktop-tab-layout .demo-layout,
  html body.desktop-tab-layout .demo-layout > #phoneChartPanel,
  html body.desktop-tab-layout .demo-layout > .trade-card,
  html body.desktop-tab-layout .desktop-tab-panels,
  html body.desktop-tab-layout .desktop-tab-panels > [aria-hidden="false"] {
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
  }
  html body.desktop-tab-layout .demo-layout > #phoneChartPanel,
  html body.desktop-tab-layout .demo-layout > .trade-card { overflow-x: hidden !important; }
  html body.desktop-tab-layout .coinbase-holdings-wrap,
  html body.desktop-tab-layout #ledgerTableWrap { overflow-x: auto !important; }
}

/* On PC the lower splash panel shows the whole phone Pre-Release artwork. */
@media (min-width: 721px) {
  html body.dpx-splash-in-page,
  html body.dpx-splash-in-page .app-shell,
  html body.dpx-notice-visible,
  html body.dpx-notice-visible .app-shell {
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-y: visible !important;
  }
  html body.dpx-splash-in-page .desktop-tab-panels,
  html body.dpx-splash-in-page #phoneHistoryPanel,
  html body.dpx-notice-visible .desktop-tab-panels,
  html body.dpx-notice-visible #phoneHistoryPanel {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.dpx-splash-in-page .dpx-message-artboard,
  body.dpx-notice-visible .dpx-message-artboard {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: clamp(220px, 31vh, 440px) !important;
    min-height: 220px !important;
    max-height: 440px !important;
    aspect-ratio: auto !important;
    background: #020b25;
  }
  body.dpx-splash-in-page .dpx-message-artboard > img,
  body.dpx-notice-visible .dpx-message-artboard > img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
  }
}

/* DPX v0.6.1 post-test final cascade lock. This block intentionally follows
   every inherited M5/M6 rule so the verified dimensions cannot be overridden. */
html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card .trade-market-row > .trade-symbol-control > #symbolSelect {
  padding: 4px 18px 4px 5px !important;
  font-size: 9px !important;
  line-height: normal !important;
  text-overflow: clip !important;
}
html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card #v053PhoneAutoControls > .trading-auto-status {
  padding-inline: 3px !important;
  font-size: 8px !important;
  line-height: 20px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}
@media (min-width: 761px) and (min-height: 601px) {
  html body.desktop-tab-layout .demo-layout > .trade-card .prediction-workbench > .prediction-order-row {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    margin: 0 !important;
    padding: 2px 0 !important;
    overflow: visible !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card .prediction-workbench > .prediction-order-row > #effectiveTradeSettings {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(3, max-content) !important;
    justify-content: start !important;
    align-items: center !important;
    gap: 6px !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    margin: 0 !important;
    padding: 2px 4px !important;
    overflow: visible !important;
  }
  html body.desktop-tab-layout .demo-layout > .trade-card .prediction-workbench > .prediction-order-row > #effectiveTradeSettings .effective-trade-item {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    line-height: 16px !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .demo-layout > .trade-card > .trade-market-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-rows: 46px 58px !important;
    gap: 5px !important;
    height: 109px !important;
    min-height: 109px !important;
    max-height: 109px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .trade-symbol-control {
    grid-template-rows: 14px 32px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-symbol-control .field-label {
    height: 14px !important;
    min-height: 14px !important;
    font-size: 9px !important;
    line-height: 14px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-symbol-control #symbolSelect {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 4px 24px 4px 7px !important;
    font-size: 10.5px !important;
    line-height: normal !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row {
    grid-template-columns: 68px minmax(0, 1fr) !important;
    gap: 4px !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > .preset-field {
    grid-template-rows: 18px 36px !important;
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > .preset-field > .field-label {
    height: 18px !important;
    min-height: 18px !important;
    font-size: 8px !important;
    line-height: 18px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > .preset-field > #presetPercentSelect {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 4px 20px 4px 6px !important;
    font-size: 11px !important;
    line-height: normal !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > .prediction-order-row > #effectiveTradeSettings {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 3px !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #effectiveTradeSettings .effective-trade-item {
    display: grid !important;
    place-items: center !important;
    min-width: 0 !important;
    padding: 3px 2px !important;
    font-size: 8.5px !important;
    line-height: 11px !important;
    white-space: normal !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #effectiveTradeSettings .effective-trade-limit { grid-column: 1 / -1 !important; }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card .trade-market-row > #phoneAutoExecutionSlot {
    grid-template-rows: 38px 66px !important;
    gap: 5px !important;
    height: 109px !important;
    min-height: 109px !important;
    max-height: 109px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls {
    grid-template-columns: minmax(0, 1fr) 62px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls .trading-auto-status,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls .title-auto-run-toggle {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    font-size: 10px !important;
    line-height: 20px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split #v053PhoneAutoControls .title-auto-run-toggle {
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #phoneAutoExecutionSlot > .chart-auto-execution-panel {
    height: 66px !important;
    min-height: 66px !important;
    max-height: 66px !important;
    padding: 3px 4px !important;
  }
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split .trade-card #phoneAutoExecutionSlot .auto-output-box {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    padding: 4px !important;
    font-size: 8px !important;
    line-height: 10px !important;
    overflow-y: auto !important;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html body #symbolSelect,
  html body.phone-landscape-redesign #symbolSelect,
  html body.phone-landscape-tab-stage #symbolSelect {
    box-sizing: border-box !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 4px 28px 4px 8px !important;
    font-size: 11px !important;
    line-height: normal !important;
    overflow: visible !important;
  }
}

/* DPX v0.6.1 final account-header correction. */
@media (max-width: 600px), (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html body.phone-tab-layout .session-bar {
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr) !important;
    gap: 5px !important;
  }
  html body.phone-tab-layout .session-account-slot,
  html body.phone-tab-layout .session-account-slot .account-bar,
  html body.phone-tab-layout .session-account-slot .account-menu-wrap,
  html body.phone-tab-layout #accountMenuBtn {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  html body.phone-tab-layout #accountMenuBtn {
    grid-template-columns: 22px max-content 10px !important;
    padding-inline: 4px !important;
    gap: 2px !important;
    font-size: 9px !important;
    overflow: visible !important;
  }
  html body.phone-tab-layout #accountMenuBtn > span:nth-child(2) {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    font-size: 9px !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
  html body.phone-tab-layout .session-balance-slot .balance-row {
    justify-content: flex-end !important;
    gap: 3px !important;
    min-width: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  html body #accountMenuBtn {
    width: 225px !important;
    min-width: 225px !important;
    max-width: 225px !important;
    font-size: 10px !important;
  }
  html body #accountMenuBtn > span:nth-child(2) {
    width: 145px !important;
    min-width: 145px !important;
    max-width: 145px !important;
    font-size: 10px !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
}

/* DPX v0.6.1 phone-control overlap correction — final cascade lock. */
@media (max-width: 600px) and (orientation: portrait) {
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .demo-layout > .trade-card > .trade-market-row > .prediction-order-row {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    column-gap: 5px !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .demo-layout > .trade-card > .trade-market-row > .prediction-order-row > .preset-field {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    position: static !important;
    transform: none !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .demo-layout > .trade-card > .trade-market-row > .prediction-order-row > #effectiveTradeSettings {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
    margin: 0 !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card .trade-market-row > .prediction-order-row {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    column-gap: 5px !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card .trade-market-row > .prediction-order-row > .preset-field,
  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card .trade-market-row > .prediction-order-row > .preset-field > #presetPercentSelect {
    box-sizing: border-box !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card .trade-market-row > .prediction-order-row > .preset-field > .field-label {
    box-sizing: border-box !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding: 0 !important;
    font-size: 8px !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  .trade-card .trade-market-row > .prediction-order-row > #effectiveTradeSettings {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, 1fr) !important;
    column-gap: 5px !important;
    row-gap: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  #effectiveTradeSettings .effective-trade-item {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 8px !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  html body.phone-tab-layout.dpx-phone-portrait.v053-phone-trade-split
  #effectiveTradeSettings .effective-trade-limit {
    grid-column: 1 / -1 !important;
  }
}
