/* StarRex Exchange: "pro desk" skin for forex.html only.
   Everything is scoped to body.site-page.forex-pro so no other page changes.
   Markup, IDs and classes used by app.js are untouched. */

body.site-page.forex-pro {
  --fx-bg: #05080d;
  --fx-panel: rgba(9, 14, 22, .93);
  --fx-panel-2: rgba(14, 21, 33, .95);
  --fx-inset: rgba(3, 6, 10, .75);
  --fx-line: rgba(120, 200, 255, .13);
  --fx-line-2: rgba(120, 200, 255, .26);
  --fx-text: #e7f1f7;
  --fx-dim: #7f8ea3;
  --fx-up: #19e88f;
  --fx-up-soft: rgba(25, 232, 143, .14);
  --fx-down: #ff4d6d;
  --fx-down-soft: rgba(255, 77, 109, .14);
  --fx-accent: #19e6f0;
  --fx-accent-soft: rgba(25, 230, 240, .12);
  --fx-gold: #ffcc4d;
  --fx-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: var(--fx-text);
}

body.site-page.forex-pro[data-theme="light"] {
  --fx-bg: #f3f6fa;
  --fx-panel: #ffffff;
  --fx-panel-2: #f7f9fc;
  --fx-inset: #eef3f8;
  --fx-line: #d7e0ea;
  --fx-line-2: #b9c7d6;
  --fx-text: #0e1b2a;
  --fx-dim: #5d6c7e;
  --fx-up: #0a9f63;
  --fx-up-soft: rgba(10, 159, 99, .10);
  --fx-down: #d6334f;
  --fx-down-soft: rgba(214, 51, 79, .10);
  --fx-accent: #0a8ea0;
  --fx-accent-soft: rgba(10, 142, 160, .10);
  --fx-gold: #b7810b;
}

/* Keep the background video behind the desk, but dim it so the panels read. */
body.site-page.forex-pro:not([data-theme="light"]) {
  background:
    linear-gradient(180deg, rgba(3, 6, 10, .55), rgba(3, 6, 10, .9)),
    url('/assets/video/bg-poster.jpg?v=2') center top / cover fixed;
}
body.site-page.forex-pro[data-theme="light"] { background: var(--fx-bg); }

[hidden] { display: none !important; }

body.site-page.forex-pro .exchange-wrap { max-width: 1480px; }

/* ---- header ---- */
body.site-page.forex-pro .exchange-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--fx-line);
  border-radius: 14px;
  background: linear-gradient(95deg, var(--fx-accent-soft), transparent 55%), var(--fx-panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
body.site-page.forex-pro .exchange-hero h1 {
  margin: 4px 0 2px;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -.01em;
  text-shadow: none;
}
body.site-page.forex-pro .exchange-hero p { margin: 0; color: var(--fx-dim); font-size: 14px; max-width: 70ch; }
body.site-page.forex-pro .exchange-hero .eyebrow,
body.site-page.forex-pro .eyebrow {
  font-family: var(--fx-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--fx-accent);
}
body.site-page.forex-pro .exchange-status {
  font-family: var(--fx-mono);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(25, 232, 143, .35);
  background: var(--fx-up-soft);
  color: var(--fx-up);
  white-space: nowrap;
}

/* ---- ticker ---- */
body.site-page.forex-pro .exchange-ticker { gap: 8px; margin: 12px 0; }
body.site-page.forex-pro .ticker-pill {
  font-family: var(--fx-mono);
  font-size: 12px;
  border: 1px solid var(--fx-line);
  background: var(--fx-inset);
  border-radius: 8px;
  padding: 6px 10px;
}
body.site-page.forex-pro .ticker-pill .sym { color: var(--fx-dim); margin-right: 8px; }
body.site-page.forex-pro .fx-events { margin-bottom: 10px; }
body.site-page.forex-pro .event-banner {
  border: 1px solid rgba(255, 204, 77, .35);
  background: linear-gradient(90deg, rgba(255, 204, 77, .14), transparent);
  border-radius: 10px;
  padding: 10px 14px;
}
body.site-page.forex-pro .event-banner b { color: var(--fx-gold); }

/* ---- panels ---- */
body.site-page.forex-pro .card {
  position: relative;
  overflow: hidden;
  background: var(--fx-panel);
  border: 1px solid var(--fx-line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .33), inset 0 1px 0 rgba(255, 255, 255, .03);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.site-page.forex-pro .card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fx-accent), transparent);
  opacity: .55;
  pointer-events: none;
}
body.site-page.forex-pro .card:hover { border-color: var(--fx-line-2); }
body.site-page.forex-pro .side-card-head h3 { margin: 2px 0 0; font-size: 17px; }

/* ---- market watch ---- */
body.site-page.forex-pro .forex-watch-row {
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
body.site-page.forex-pro .forex-watch-row:hover { background: var(--fx-accent-soft); border-color: var(--fx-line); }
body.site-page.forex-pro .forex-watch-row.active {
  background: linear-gradient(90deg, var(--fx-accent-soft), transparent);
  border-color: rgba(25, 230, 240, .35);
  box-shadow: inset 3px 0 0 var(--fx-accent);
}
body.site-page.forex-pro .watch-price b,
body.site-page.forex-pro .forex-watch-row b { font-family: var(--fx-mono); font-variant-numeric: tabular-nums; }
body.site-page.forex-pro .live-dot { font-family: var(--fx-mono); font-size: 11px; color: var(--fx-up); }

/* ---- chart ---- */
body.site-page.forex-pro .chart-symbol strong {
  font-family: var(--fx-mono);
  font-size: 22px;
  letter-spacing: .02em;
}
body.site-page.forex-pro .chart-change {
  font-family: var(--fx-mono);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 10px;
}
body.site-page.forex-pro .chart-change.up { background: var(--fx-up-soft); color: var(--fx-up); }
body.site-page.forex-pro .chart-change.down { background: var(--fx-down-soft); color: var(--fx-down); }
body.site-page.forex-pro .chart-meta { font-family: var(--fx-mono); font-size: 11px; color: var(--fx-dim); }
body.site-page.forex-pro .chart-reset-btn,
body.site-page.forex-pro .chart-mode-btn {
  font-family: var(--fx-mono);
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid var(--fx-line);
  background: var(--fx-inset);
  color: var(--fx-text);
  transition: border-color .15s, color .15s, background .15s;
}
body.site-page.forex-pro .chart-reset-btn:hover,
body.site-page.forex-pro .chart-mode-btn:hover { border-color: var(--fx-accent); color: var(--fx-accent); }
body.site-page.forex-pro .chart-mode-btn.active { background: var(--fx-accent-soft); border-color: var(--fx-accent); color: var(--fx-accent); }
body.site-page.forex-pro .chart-mode-toggle { border-radius: 8px; }
body.site-page.forex-pro .forex-chart-wrap {
  border-radius: 10px;
  border: 1px solid var(--fx-line);
  background-color: var(--fx-inset);
  background-image:
    linear-gradient(var(--fx-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--fx-line) 1px, transparent 1px);
  background-size: 100% 25%, 12.5% 100%;
  background-position: center;
  overflow: hidden;
}
body.site-page.forex-pro .chart-price-tag {
  font-family: var(--fx-mono);
  font-variant-numeric: tabular-nums;
  background: var(--fx-accent);
  color: #03131a;
  border-radius: 4px 0 0 4px;
  font-weight: 700;
}
body.site-page.forex-pro .chart-footer {
  font-family: var(--fx-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--fx-dim);
  border-top: 1px solid var(--fx-line);
  padding-top: 10px;
  margin-top: 10px;
}
body.site-page.forex-pro .chart-footer span { color: var(--fx-text); }

/* "price held" banner on the chart (shown to everyone while a pair is frozen) */
body.site-page.forex-pro .chart-frozen {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--fx-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 77, .45);
  background: rgba(20, 16, 4, .82);
  color: var(--fx-gold);
  white-space: nowrap;
  pointer-events: none;
}
body.site-page.forex-pro[data-theme="light"] .chart-frozen { background: #fff8e3; }

/* ---- order ticket ---- */
body.site-page.forex-pro .selected-pair-box {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--fx-mono);
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--fx-inset);
  border: 1px solid var(--fx-line);
}
body.site-page.forex-pro #order-price { font-size: 20px; font-variant-numeric: tabular-nums; }
body.site-page.forex-pro .ticket-quote { font-family: var(--fx-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
body.site-page.forex-pro .ticket-quote b { color: var(--fx-text); }
body.site-page.forex-pro .spread { color: var(--fx-dim); }

body.site-page.forex-pro .side-toggle { gap: 8px; }
body.site-page.forex-pro .side-btn {
  border-radius: 10px;
  border: 1px solid var(--fx-line);
  background: var(--fx-inset);
  color: var(--fx-dim);
  font-weight: 700;
  letter-spacing: .02em;
  transition: all .15s;
}
body.site-page.forex-pro .side-btn[data-side="long"].active {
  background: var(--fx-up-soft);
  border-color: var(--fx-up);
  color: var(--fx-up);
  box-shadow: 0 0 22px rgba(25, 232, 143, .18);
}
body.site-page.forex-pro .side-btn[data-side="short"].active {
  background: var(--fx-down-soft);
  border-color: var(--fx-down);
  color: var(--fx-down);
  box-shadow: 0 0 22px rgba(255, 77, 109, .18);
}

body.site-page.forex-pro .seg { border-radius: 10px; background: var(--fx-inset); border: 1px solid var(--fx-line); padding: 3px; }
body.site-page.forex-pro .seg button { border-radius: 7px; color: var(--fx-dim); font-family: var(--fx-mono); font-size: 12px; }
body.site-page.forex-pro .seg button.active { background: var(--fx-accent-soft); color: var(--fx-accent); box-shadow: inset 0 0 0 1px rgba(25, 230, 240, .35); }

body.site-page.forex-pro .lev-block {
  border: 1px solid var(--fx-line);
  border-radius: 10px;
  background: var(--fx-inset);
  padding: 10px 12px;
}
body.site-page.forex-pro .lev-head span { font-family: var(--fx-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fx-dim); }
body.site-page.forex-pro #lev-value { font-family: var(--fx-mono); font-size: 18px; color: var(--fx-accent); }
body.site-page.forex-pro .lev-chip { font-family: var(--fx-mono); border-radius: 6px; border: 1px solid var(--fx-line); }
body.site-page.forex-pro .lev-chip.active { background: var(--fx-accent-soft); border-color: var(--fx-accent); color: var(--fx-accent); box-shadow: 0 0 14px rgba(25, 230, 240, .18); }
body.site-page.forex-pro .lev-chip.locked { opacity: .45; }

body.site-page.forex-pro input,
body.site-page.forex-pro select {
  background: var(--fx-inset);
  border: 1px solid var(--fx-line);
  border-radius: 10px;
  color: var(--fx-text);
  font-family: var(--fx-mono);
  font-variant-numeric: tabular-nums;
}
body.site-page.forex-pro input:focus,
body.site-page.forex-pro select:focus { outline: none; border-color: var(--fx-accent); box-shadow: 0 0 0 3px var(--fx-accent-soft); }
body.site-page.forex-pro .pct-chips button {
  font-family: var(--fx-mono);
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid var(--fx-line);
  background: var(--fx-inset);
  color: var(--fx-dim);
}
body.site-page.forex-pro .pct-chips button:hover { color: var(--fx-accent); border-color: var(--fx-accent); }

body.site-page.forex-pro .ticket-summary {
  font-family: var(--fx-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  border: 1px dashed var(--fx-line-2);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--fx-inset);
}
body.site-page.forex-pro #trade-submit {
  border-radius: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  padding: 13px 16px;
  background: linear-gradient(90deg, var(--fx-up), #12c9a0);
  color: #03130d;
  border: 0;
  box-shadow: 0 10px 30px rgba(25, 232, 143, .22);
}
body.site-page.forex-pro #trade-submit:hover { filter: brightness(1.06); }
body.site-page.forex-pro .trade-ticket-note { font-size: 12px; color: var(--fx-dim); line-height: 1.55; }

/* ---- account ---- */
body.site-page.forex-pro .account-balance {
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(135deg, var(--fx-accent-soft), transparent 70%), var(--fx-inset);
  border: 1px solid var(--fx-line);
}
body.site-page.forex-pro .account-balance strong {
  display: block;
  font-family: var(--fx-mono);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  color: var(--fx-text);
}
body.site-page.forex-pro .account-columns > div,
body.site-page.forex-pro .account-columns div {
  border: 1px solid var(--fx-line);
  border-radius: 10px;
  background: var(--fx-inset);
  padding: 9px 11px;
}
body.site-page.forex-pro .account-columns b { font-family: var(--fx-mono); font-variant-numeric: tabular-nums; }
body.site-page.forex-pro .forex-funding-note { font-family: var(--fx-mono); font-size: 11px; color: var(--fx-dim); }

/* ---- positions and orders ---- */
body.site-page.forex-pro .positions-summary {
  display: flex;
  justify-content: space-between;
  font-family: var(--fx-mono);
  font-variant-numeric: tabular-nums;
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--fx-inset);
  border: 1px solid var(--fx-line);
}
body.site-page.forex-pro .position-card,
body.site-page.forex-pro .order-row {
  border: 1px solid var(--fx-line);
  border-left: 3px solid var(--fx-accent);
  border-radius: 10px;
  background: var(--fx-inset);
}
body.site-page.forex-pro .position-card { font-variant-numeric: tabular-nums; }
body.site-page.forex-pro .position-title { font-family: var(--fx-mono); }
body.site-page.forex-pro .btn-cash { background: var(--fx-up-soft); border-color: var(--fx-up); color: var(--fx-up); }

/* ---- buttons (shared) ---- */
body.site-page.forex-pro .btn { border-radius: 9px; }
body.site-page.forex-pro .btn-rise { box-shadow: 0 6px 20px rgba(25, 232, 143, .18); }

/* ---- owner market control ---- */
body.site-page.forex-pro .mc-toggle {
  border-color: rgba(255, 204, 77, .5);
  color: var(--fx-gold);
}
body.site-page.forex-pro .mc-toggle[aria-expanded="true"] { background: rgba(255, 204, 77, .12); }
body.site-page.forex-pro .mc-panel { margin: 14px 0; border-color: rgba(255, 204, 77, .3); }
body.site-page.forex-pro .mc-panel::before { background: linear-gradient(90deg, transparent, var(--fx-gold), transparent); }
body.site-page.forex-pro .mc-warn {
  font-family: var(--fx-mono);
  font-size: 11px;
  color: var(--fx-gold);
  border: 1px solid rgba(255, 204, 77, .35);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
body.site-page.forex-pro .mc-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1fr) 1.2fr 1.2fr;
  gap: 12px;
  align-items: start;
  margin-top: 10px;
}
body.site-page.forex-pro .mc-field,
body.site-page.forex-pro .mc-now,
body.site-page.forex-pro .mc-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--fx-line);
  border-radius: 12px;
  background: var(--fx-inset);
  padding: 12px;
}
body.site-page.forex-pro .mc-field span,
body.site-page.forex-pro .mc-now span,
body.site-page.forex-pro .mc-label {
  font-family: var(--fx-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fx-dim);
}
body.site-page.forex-pro .mc-now b { font-family: var(--fx-mono); font-size: 22px; font-variant-numeric: tabular-nums; }
body.site-page.forex-pro .mc-now small { font-family: var(--fx-mono); font-size: 12px; color: var(--fx-up); }
body.site-page.forex-pro .mc-now small.mc-held { color: var(--fx-gold); }
body.site-page.forex-pro .mc-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
body.site-page.forex-pro .mc-row input { width: 86px; padding: 8px 10px; }
body.site-page.forex-pro .mc-unit { font-family: var(--fx-mono); color: var(--fx-dim); }
body.site-page.forex-pro .mc-hint { font-size: 11.5px; color: var(--fx-dim); line-height: 1.45; }
body.site-page.forex-pro .mc-spike { border-color: var(--fx-up); color: var(--fx-up); }
body.site-page.forex-pro .mc-crash { border-color: var(--fx-down); color: var(--fx-down); }
body.site-page.forex-pro .mc-log-head {
  font-family: var(--fx-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fx-dim);
  margin: 14px 0 6px;
}
body.site-page.forex-pro .mc-log { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; }
body.site-page.forex-pro .mc-log-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  font-family: var(--fx-mono);
  font-size: 12px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--fx-line);
}
body.site-page.forex-pro .mc-log-row time { color: var(--fx-dim); }
body.site-page.forex-pro .mc-log-row.mc-spike span { color: var(--fx-up); }
body.site-page.forex-pro .mc-log-row.mc-crash span { color: var(--fx-down); }
body.site-page.forex-pro .mc-log-row.mc-freeze span { color: var(--fx-gold); }

/* ---- responsive ---- */
@media (max-width: 1100px) {
  body.site-page.forex-pro .mc-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body.site-page.forex-pro .exchange-hero { flex-direction: column; align-items: flex-start; padding: 16px; }
  body.site-page.forex-pro .mc-grid { grid-template-columns: 1fr; }
  body.site-page.forex-pro .chart-frozen { font-size: 11px; }
}

/* Inputs in narrow rows should shrink instead of cutting off their placeholders. */
body.site-page.forex-pro .stops-row input,
body.site-page.forex-pro .trade-form-col select { min-width: 0; text-overflow: ellipsis; }
body.site-page.forex-pro .stops-row input::placeholder { font-size: 12px; }


/* ================= Forex chart: smaller by default + adjustable height ================= */
/* Height comes from --fx-chart-h (set by the S/M/L buttons or by dragging the handle under the chart). */
.forex-chart-card,body.site-page.forex-pro .forex-chart-card{min-height:0!important;align-self:start}
.forex-chart-card .forex-chart-wrap,body.site-page.forex-pro .forex-chart-card .forex-chart-wrap{flex:none!important;min-height:140px!important;height:var(--fx-chart-h,260px)!important}
.chart-size-group{display:inline-flex;align-items:center;gap:0;border:1px solid var(--line,#232c3a);border-radius:8px;overflow:hidden}
.chart-size-group button{padding:5px 9px;border:0;background:transparent;color:var(--text-faint,#8a94a6);font:700 10px 'JetBrains Mono',monospace;cursor:pointer}
.chart-size-group button+button{border-left:1px solid var(--line,#232c3a)}
.chart-size-group button:hover{color:var(--text,#e9edf4)}
.chart-size-group button.active{background:rgba(25,232,143,.14);color:var(--rise,#19e88f)}
.chart-size-label{font:700 9px 'JetBrains Mono',monospace;color:var(--text-faint,#8a94a6);text-transform:uppercase;letter-spacing:.05em;margin-right:2px}
/* drag handle under the chart (mouse + touch) */
.chart-resize-grip{display:flex;align-items:center;justify-content:center;gap:8px;height:16px;margin-top:4px;cursor:ns-resize;touch-action:none;user-select:none;-webkit-user-select:none;color:var(--text-faint,#8a94a6);font:700 9px 'JetBrains Mono',monospace;letter-spacing:.08em}
.chart-resize-grip::before,.chart-resize-grip::after{content:"";flex:0 1 70px;height:3px;border-radius:3px;background:currentColor;opacity:.4}
.chart-resize-grip:hover,.chart-resize-grip.dragging{color:var(--rise,#19e88f)}
@media(max-width:800px){.forex-chart-card{min-height:0!important}.chart-meta{flex-wrap:wrap}}
