:root {
    --rx-bg: #070807;
    --rx-panel: #0e1110;
    --rx-panel-2: #141817;
    --rx-panel-3: #1b201e;
    --rx-line: rgba(255, 255, 255, .09);
    --rx-line-strong: rgba(118, 235, 169, .58);
    --rx-text: rgba(246, 248, 247, .93);
    --rx-muted: rgba(246, 248, 247, .58);
    --rx-soft: rgba(246, 248, 247, .36);
    --rx-green: #76eba9;
    --rx-green-2: #23c77d;
    --rx-red: #ff6b63;
    --rx-amber: #f3c66b;
    --rx-blue: #82aaff;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; background: var(--rx-bg); }
body {
    margin: 0;
    color: var(--rx-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    overflow: hidden;
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(118, 235, 169, .36) rgba(255,255,255,.04);
}
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,.04); }
::-webkit-scrollbar-thumb { background: rgba(118, 235, 169, .34); border-radius: 999px; }

.rx-nav {
    position: relative;
    z-index: 10;
    height: 57px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255,255,255,.09);
    background: rgba(0,0,0,.88);
}
.rx-nav .cine-nav-brand {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: .08em;
    white-space: nowrap;
}
.rx-nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
}
.rx-nav-status span {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--rx-line);
    border-radius: 7px;
    color: var(--rx-muted);
    background: rgba(255,255,255,.045);
    white-space: nowrap;
}
.rx-nav .cine-nav-btn {
    min-height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    background: rgba(255,255,255,.08);
}
.rx-nav .cine-nav-btn.accent {
    color: #07100b;
    background: var(--rx-green);
}
.rx-nav .cine-nav-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.rx-nav .cine-nav-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    color: rgba(255,255,255,.58);
    text-decoration: none;
    font-size: 12px;
    font-weight: 650;
    border: 0;
    border-radius: 7px;
    white-space: nowrap;
}
.rx-nav .cine-nav-tab:hover,
.rx-nav .cine-nav-tab.active {
    color: #fff;
    background: rgba(255,255,255,.08);
}
.rx-nav .cine-nav-tab.cup-new::after {
    content: none;
}

.rx-terminal {
    width: 100%;
    height: calc(100vh - 57px);
    display: grid;
    grid-template-rows: 64px minmax(0, 1fr) var(--rx-bottom-height, 230px) 30px;
    gap: 4px;
    padding: 4px;
    overflow: hidden;
}

button, input, select, textarea {
    font: inherit;
    color: var(--rx-text);
}
button {
    border: 0;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
}
button:disabled {
    cursor: not-allowed;
    opacity: .52;
}
input, select, textarea {
    width: 100%;
    border: 1px solid var(--rx-line);
    border-radius: 6px;
    background: #121614;
    outline: none;
}
input, select { height: 34px; padding: 0 10px; }
input:focus, select:focus, textarea:focus {
    border-color: rgba(118,235,169,.65);
    box-shadow: 0 0 0 1px rgba(118,235,169,.1);
}
.hidden { display: none !important; }

.rx-marketbar,
.rx-chart-panel,
.rx-book-panel,
.rx-ticket,
.rx-bottom,
.rx-debug {
    border: 1px solid var(--rx-line);
    background: var(--rx-panel);
}

.rx-marketbar {
    display: grid;
    grid-template-columns: minmax(360px, .9fr) minmax(0, 1.7fr);
    gap: 4px;
    overflow: visible;
}
.rx-market-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px;
}
.rx-network-select {
    width: 112px;
    flex: 0 0 112px;
    text-transform: uppercase;
}
.rx-network-fixed {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rx-line);
    border-radius: 6px;
    color: var(--rx-text);
    background: #121614;
    font-weight: 800;
    letter-spacing: .04em;
}
.rx-market-picker { position: relative; flex: 1; min-width: 170px; }
.rx-market-trigger {
    width: 100%;
    height: 42px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto 16px;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border: 1px solid var(--rx-line);
    background: var(--rx-panel-2);
}
.rx-market-avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #07100b;
    font-weight: 900;
    background: linear-gradient(135deg, var(--rx-green), var(--rx-amber));
}
#marketTriggerSymbol {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 800;
}
#marketTriggerMeta {
    color: var(--rx-muted);
    white-space: nowrap;
}
.rx-market-caret { color: var(--rx-muted); }
.rx-native-market-select {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.rx-market-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: min(720px, calc(100vw - 24px));
    max-height: min(590px, calc(100vh - 130px));
    z-index: 40;
    display: grid;
    grid-template-rows: 44px minmax(0, 1fr);
    border: 1px solid var(--rx-line-strong);
    border-radius: 8px;
    background: #0b0e0d;
    box-shadow: 0 22px 60px rgba(0,0,0,.55);
    overflow: hidden;
}
.rx-market-search {
    display: grid;
    grid-template-columns: 30px 1fr;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--rx-line);
}
.rx-market-search span { color: var(--rx-muted); text-align: center; }
.rx-market-search input { height: 30px; }
.rx-market-table {
    min-height: 0;
    display: grid;
    grid-template-rows: 32px minmax(0, 1fr);
}
.rx-market-table-head,
.rx-market-row {
    display: grid;
    grid-template-columns: 1.2fr .8fr .7fr .85fr .85fr .8fr;
    gap: 10px;
    align-items: center;
    min-width: 660px;
}
.rx-market-table-head {
    padding: 0 12px;
    color: var(--rx-soft);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    border-bottom: 1px solid var(--rx-line);
}
.rx-market-rows { overflow: auto; }
.rx-market-row {
    width: 100%;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255,255,255,.055);
    color: var(--rx-text);
    text-align: left;
}
.rx-market-row:hover,
.rx-market-row.active { background: rgba(118,235,169,.09); }
.rx-market-symbol { font-weight: 800; }
.rx-market-sub { display: block; color: var(--rx-muted); font-size: 10px; margin-top: 2px; }
.rx-green { color: var(--rx-green) !important; }
.rx-red { color: var(--rx-red) !important; }
.rx-muted { color: var(--rx-muted) !important; }

.rx-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--rx-line);
    border-radius: 999px;
    color: var(--rx-muted);
    background: rgba(255,255,255,.045);
    white-space: nowrap;
}
.rx-live-pill span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rx-amber);
}
.rx-live-pill.is-live span { background: var(--rx-green); box-shadow: 0 0 12px rgba(118,235,169,.8); }
.rx-live-pill.is-bad span { background: var(--rx-red); }

.rx-market-stats {
    display: grid;
    grid-template-columns: repeat(9, minmax(82px, 1fr));
    border-left: 1px solid var(--rx-line);
    overflow: hidden;
}
.rx-market-stats div {
    min-width: 0;
    padding: 9px 10px;
    border-left: 1px solid rgba(255,255,255,.06);
}
.rx-market-stats div:first-child { border-left: 0; }
.rx-market-stats label {
    display: block;
    margin-bottom: 4px;
    color: var(--rx-muted);
    font-size: 10px;
    white-space: nowrap;
}
.rx-market-stats b {
    display: block;
    overflow: hidden;
    color: var(--rx-text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rx-main-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(420px, 1fr) 340px 320px;
    gap: 4px;
}
.rx-chart-panel {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto 28px minmax(0, 1fr);
    overflow: hidden;
    background: #151a1e;
}
.rx-chart-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 110px;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid rgba(134,150,160,.20);
    background: #171d21;
}
.rx-tabs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.rx-tabs button {
    height: 28px;
    padding: 0 10px;
    color: var(--rx-muted);
    border-radius: 5px;
    background: transparent;
}
.rx-tabs button.active {
    color: #e9f1f5;
    background: rgba(118,235,169,.14);
}
.rx-tabs.compact {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}
.rx-tabs.compact button {
    flex: 0 0 auto;
    min-width: 36px;
}
.rx-tabs.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}
.rx-tabs.split button {
    width: 100%;
    background: rgba(255,255,255,.06);
}
.rx-tabs.split button.active { background: var(--rx-green); color: #07100b; }
.rx-chart-tools {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}
.rx-chart-tools button {
    height: 27px;
    min-width: 32px;
    padding: 0 8px;
    color: var(--rx-muted);
    border: 1px solid rgba(134,150,160,.18);
    border-radius: 5px;
    background: rgba(255,255,255,.035);
    white-space: nowrap;
}
.rx-chart-tools button:hover,
.rx-chart-tools button.active {
    color: #e9f1f5;
    border-color: rgba(118,235,169,.44);
    background: rgba(118,235,169,.18);
}
.rx-chart-source { width: 110px; }
.rx-chart-source select {
    height: 30px;
    border-color: rgba(134,150,160,.20);
    background: #11171a;
}
.rx-chart-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 0 12px;
    border-bottom: 1px solid rgba(134,150,160,.14);
    color: var(--rx-muted);
    background: #151a1e;
}
#chartSymbol { color: var(--rx-text); font-weight: 800; }
#chartOhlc,
#chartVolume {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#chartVolume { color: rgba(118,235,169,.72); }
.rx-chart-shell {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background: #151a1e;
}
#terminalChart {
    position: absolute;
    inset: 0;
}
.rx-chart-watermark {
    position: absolute;
    left: 14px;
    bottom: 12px;
    pointer-events: none;
    color: rgba(233,241,245,.86);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -.04em;
}
.rx-chart-tool-hint,
.rx-chart-measure {
    position: absolute;
    z-index: 8;
    pointer-events: none;
    padding: 6px 8px;
    color: var(--rx-text);
    border: 1px solid var(--rx-line);
    border-radius: 6px;
    background: rgba(8, 10, 9, .88);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}
.rx-chart-tool-hint {
    left: 10px;
    top: 10px;
    color: var(--rx-muted);
}
.rx-chart-measure {
    right: 12px;
    top: 12px;
}

.rx-book-panel {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: 38px 36px minmax(0, 1fr);
    overflow: hidden;
    background: #151a1e;
}
.rx-book-panel > .rx-tabs {
    padding: 6px 8px 4px;
    border-bottom: 1px solid rgba(134,150,160,.16);
    background: #171d21;
}
.rx-book-panel > .rx-tabs button { flex: 1; }
.rx-book-controls {
    display: grid;
    grid-template-columns: 92px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 4px 8px;
    color: var(--rx-muted);
    border-bottom: 1px solid rgba(134,150,160,.14);
    background: #151a1e;
}
.rx-book-controls select { height: 28px; padding: 0 8px; }
.rx-book-table,
.rx-trades-table {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background: #151a1e;
}
.rx-trades-table {
    overflow: auto;
}
.rx-book-head,
.rx-book-row,
.rx-trade-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    font-variant-numeric: tabular-nums;
}
.rx-book-head {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    min-height: 26px;
    color: rgba(202,213,221,.56);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(21,26,30,.96);
    pointer-events: none;
}
.rx-book-ladder {
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr) 34px minmax(0, 1fr);
}
.rx-book-side {
    min-height: 0;
    overflow: hidden;
}
.rx-book-side.asks {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.rx-book-side.bids {
    display: flex;
    flex-direction: column;
}
.rx-book-side .rx-empty {
    min-height: 100%;
}
.rx-book-row {
    position: relative;
    overflow: hidden;
    min-height: 23px;
    color: rgba(235,242,246,.90);
    border-bottom: 1px solid rgba(134,150,160,.07);
    cursor: pointer;
}
.rx-book-row:hover { background: rgba(255,255,255,.035); }
.rx-book-row.mine {
    background: rgba(243,198,107,.075);
    box-shadow: inset 2px 0 0 rgba(243,198,107,.86);
}
.rx-book-row.mine:hover { background: rgba(243,198,107,.12); }
.rx-book-row span { position: relative; z-index: 1; }
.rx-depth-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    opacity: .22;
}
.rx-book-row.ask .rx-depth-bar { background: rgba(242,54,69,.70); }
.rx-book-row.bid .rx-depth-bar { background: rgba(34,171,148,.72); }
.rx-book-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 15px;
    margin-left: 6px;
    padding: 0 4px;
    border: 1px solid rgba(243,198,107,.55);
    border-radius: 4px;
    color: var(--rx-amber);
    font-size: 9px;
    font-weight: 900;
    font-style: normal;
    line-height: 1;
    letter-spacing: 0;
    background: rgba(243,198,107,.16);
}
.rx-spread-row {
    min-height: 34px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    color: rgba(202,213,221,.62);
    border-top: 1px solid rgba(134,150,160,.20);
    border-bottom: 1px solid rgba(134,150,160,.20);
    background: #1b2227;
    font-variant-numeric: tabular-nums;
}
.rx-spread-row span {
    justify-self: start;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 800;
}
.rx-spread-row b {
    justify-self: center;
    color: rgba(233,241,245,.96);
    font-size: 12px;
}
.rx-spread-row small {
    justify-self: end;
    color: rgba(118,235,169,.70);
}
.rx-trade-row {
    grid-template-columns: 1fr 1fr .8fr;
    border-bottom: 1px solid rgba(255,255,255,.045);
}

.rx-ticket {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 7px 8px;
    overflow: hidden;
}
.rx-mode-row,
.rx-side-switch,
.rx-ticket-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.rx-wallet-actions {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
}
.rx-wallet-actions #connectBtn {
    color: #07100b;
    background: var(--rx-green);
    font-weight: 800;
}
.rx-mode-row button,
.rx-ticket-actions button {
    height: 28px;
    color: var(--rx-muted);
    background: rgba(255,255,255,.06);
}
.rx-mode-row #marginModeControl,
.rx-mode-row #leverageControl {
    color: rgba(235,242,246,.90);
}
.rx-mode-row #marginModeControl:hover,
.rx-mode-row #leverageControl:hover {
    border-color: rgba(118,235,169,.38);
    background: rgba(118,235,169,.10);
}
.rx-side-switch {
    grid-template-columns: 1fr 1fr;
}
.rx-side-switch button {
    height: 32px;
    color: var(--rx-muted);
    background: rgba(255,255,255,.06);
}
.rx-side-switch button.active:first-child { color: #06110b; background: var(--rx-green); }
.rx-side-switch button.active:last-child { color: #fff; background: var(--rx-red); }
.rx-account-mini,
.rx-estimates,
.rx-signer-box,
.rx-execution-box {
    border: 1px solid var(--rx-line);
    border-radius: 8px;
    background: rgba(255,255,255,.035);
}
.rx-account-mini,
.rx-estimates,
.rx-execution-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    padding: 7px 10px;
}
.rx-estimates,
.rx-execution-box {
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    padding: 6px 9px;
}
.rx-estimates div,
.rx-execution-box div {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.rx-account-mini span,
.rx-estimates span,
.rx-execution-box span {
    color: var(--rx-muted);
}
.rx-account-mini b,
.rx-estimates b,
.rx-execution-box b {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}
.rx-order-form {
    display: grid;
    gap: 6px;
}
.rx-ticket input,
.rx-ticket select {
    height: 30px;
}
.rx-order-form label {
    display: grid;
    gap: 4px;
    color: var(--rx-muted);
}
.rx-size-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.rx-size-mode {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding: 2px;
    border-radius: 6px;
    background: rgba(255,255,255,.05);
}
.rx-size-mode button {
    height: 22px;
    min-width: 48px;
    padding: 0 8px;
    color: var(--rx-muted);
    border-radius: 5px;
}
.rx-size-mode button.active {
    color: #07100b;
    background: var(--rx-green);
}
.rx-field-inline {
    display: grid;
    grid-template-columns: 1fr 54px;
    gap: 6px;
    align-items: center;
}
.rx-field-inline span,
.rx-field-inline button {
    height: 31px;
    display: grid;
    place-items: center;
    border: 1px solid var(--rx-line);
    border-radius: 6px;
    color: var(--rx-muted);
    background: rgba(255,255,255,.05);
}
.rx-percent-row {
    display: flex;
    justify-content: space-between;
    color: var(--rx-soft);
    font-size: 10px;
}
.rx-min-size-hint {
    min-height: 15px;
    margin-top: -3px;
    color: var(--rx-muted);
    font-size: 11px;
}
.rx-min-size-hint.is-bad {
    color: var(--rx-red);
}
.rx-order-warning {
    min-height: 14px;
    color: var(--rx-muted);
    font-size: 11px;
    line-height: 1.25;
}
.rx-order-warning.is-bad {
    color: var(--rx-amber);
}
.rx-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.rx-checks label,
.rx-confirm {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--rx-muted);
}
.rx-checks input,
.rx-confirm input {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}
.rx-confirm {
    align-items: flex-start;
    padding: 6px 9px;
    border: 1px solid rgba(243,198,107,.32);
    border-radius: 8px;
    background: rgba(243,198,107,.08);
}
.rx-mainnet-confirm {
    display: grid;
    gap: 4px;
    color: var(--rx-amber);
}
.rx-place {
    height: 34px;
    color: #07100b;
    font-weight: 850;
    background: var(--rx-green);
}
.rx-place:disabled {
    color: var(--rx-muted);
    background: rgba(255,255,255,.07);
}
.rx-order-status {
    min-height: 16px;
    color: var(--rx-muted);
    font-size: 11px;
    line-height: 1.25;
}
.rx-order-status.ok {
    color: var(--rx-green);
}
.rx-order-status.error {
    color: var(--rx-red);
}
.rx-signer-box {
    display: grid;
    gap: 7px;
    padding: 10px;
}
.rx-signer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.rx-signer-box h3 {
    margin: 0;
    font-size: 12px;
    white-space: nowrap;
}
.rx-signer-head span {
    min-width: 0;
    overflow: hidden;
    color: var(--rx-soft);
    font-size: 11px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rx-signer-box p {
    margin: 0;
    color: var(--rx-muted);
    line-height: 1.35;
}
.rx-signer-box .rx-ticket-actions {
    grid-template-columns: 1fr 1fr;
}
.rx-advanced-signer {
    display: grid;
    gap: 7px;
    color: var(--rx-muted);
}
.rx-advanced-signer summary {
    cursor: pointer;
    color: var(--rx-soft);
}
.rx-advanced-signer[open] {
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.rx-advanced-signer button {
    width: 100%;
    height: 30px;
    margin-top: 7px;
    color: var(--rx-muted);
    background: rgba(255,255,255,.06);
}

.rx-bottom {
    position: relative;
    min-height: 0;
    display: grid;
    grid-template-rows: 8px 36px minmax(0, 1fr);
}
.rx-bottom-resizer {
    position: relative;
    min-height: 8px;
    cursor: ns-resize;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,.045));
    touch-action: none;
}
.rx-bottom-resizer::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 3px;
    width: 58px;
    height: 2px;
    border-radius: 999px;
    background: rgba(174,185,187,.42);
    transform: translateX(-50%);
}
.rx-bottom-resizer:hover::before,
.rx-bottom-resizer:focus-visible::before,
.rx-bottom-resizer.is-dragging::before,
.rx-bottom.is-resizing .rx-bottom-resizer::before {
    background: var(--rx-green);
    box-shadow: 0 0 0 1px rgba(91,232,155,.12), 0 0 18px rgba(91,232,155,.18);
}
.rx-bottom-resizer:focus-visible {
    outline: 1px solid rgba(91,232,155,.55);
    outline-offset: -1px;
}
.rx-bottom.is-resizing {
    user-select: none;
}
.rx-bottom-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow: auto hidden;
    border-bottom: 1px solid var(--rx-line);
}
.rx-bottom-tabs button {
    height: 32px;
    padding: 0 12px;
    color: var(--rx-muted);
    white-space: nowrap;
}
.rx-bottom-tabs button.active {
    color: #07100b;
    background: var(--rx-green);
}
.rx-bottom-table {
    min-height: 0;
    overflow: auto;
}
.rx-bottom-actions {
    display: flex;
    justify-content: flex-end;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255,255,255,.055);
}
.rx-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}
.rx-table th,
.rx-table td {
    height: 30px;
    padding: 0 10px;
    border-bottom: 1px solid rgba(255,255,255,.055);
    text-align: left;
    white-space: nowrap;
}
.rx-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--rx-soft);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--rx-panel);
}
.rx-table td:last-child,
.rx-table th:last-child { text-align: right; }
.rx-positions-table {
    min-width: 1320px;
}
.rx-positions-table th,
.rx-positions-table td {
    height: 50px;
    padding: 0 14px;
    vertical-align: middle;
}
.rx-positions-table th:not(:first-child),
.rx-positions-table td:not(:first-child) {
    text-align: right;
}
.rx-positions-table th:last-child {
    color: var(--rx-red);
}
.rx-pos-cell {
    min-height: 42px;
    display: grid;
    align-content: center;
    gap: 2px;
}
.rx-pos-cell b {
    color: rgba(250,255,253,.96);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}
.rx-pos-cell span {
    min-height: 14px;
    color: var(--rx-muted);
    font-size: 11px;
    line-height: 1.2;
}
.rx-pos-market {
    position: relative;
    padding-left: 12px;
}
.rx-pos-market::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    bottom: 7px;
    width: 2px;
    border-radius: 2px;
    background: var(--rx-green);
    box-shadow: 0 0 18px rgba(118,235,169,.22);
}
.rx-pos-market.is-short::before {
    background: var(--rx-red);
    box-shadow: 0 0 18px rgba(255,107,99,.20);
}
.rx-pos-cell.is-pos b,
.rx-pos-cell.is-pos span {
    color: var(--rx-green);
}
.rx-pos-cell.is-neg b,
.rx-pos-cell.is-neg span {
    color: var(--rx-red);
}
.rx-pos-cell.is-zero b {
    color: rgba(250,255,253,.92);
}
.rx-pos-cell.is-zero span {
    color: var(--rx-muted);
}
.rx-tpsl-cell {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    color: var(--rx-muted);
}
.rx-inline-icon {
    height: 24px;
    padding: 0 8px;
    color: var(--rx-text);
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.06);
}
.rx-inline-icon:hover {
    border-color: rgba(118,235,169,.45);
    color: var(--rx-green);
}
.rx-action-btn {
    height: 24px;
    padding: 0 8px;
    color: #fff;
    background: rgba(255,107,99,.8);
}
.rx-action-btn.secondary {
    background: rgba(255,255,255,.08);
    color: var(--rx-text);
}
.rx-action-stack {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}
.rx-position-actions-row {
    align-items: center;
}
.rx-close-position-btn {
    min-width: 46px;
    color: #fff;
    background: rgba(255,107,99,.88);
}
.rx-bracket-cell {
    color: var(--rx-muted);
    font-size: 11px;
}
.rx-position-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0,0,0,.58);
}
.rx-position-modal.hidden {
    display: none;
}
.rx-position-dialog {
    width: min(560px, 100%);
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--rx-line);
    border-radius: 8px;
    background: #111715;
    box-shadow: 0 20px 70px rgba(0,0,0,.45);
}
.rx-position-dialog.rx-tpsl-dialog {
    width: min(462px, 100%);
    gap: 10px;
    padding: 24px;
    border-color: rgba(255,255,255,.08);
    border-radius: 12px;
    background: #15191f;
    box-shadow: 0 24px 80px rgba(0,0,0,.58);
}
.rx-leverage-dialog {
    width: min(532px, 100%);
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    background: #15191f;
    box-shadow: 0 24px 80px rgba(0,0,0,.58);
}
.rx-leverage-dialog.compact {
    width: min(420px, 100%);
}
.rx-leverage-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: rgba(235,242,246,.92);
    font-size: 14px;
}
.rx-leverage-input-row > span b {
    color: var(--rx-muted);
    font-weight: 650;
}
.rx-leverage-input-row label {
    width: 112px;
    height: 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    border: 1px solid var(--rx-line);
    border-radius: 8px;
    background: #10151a;
}
.rx-leverage-input-row label:focus-within {
    border-color: rgba(118,235,169,.65);
    box-shadow: 0 0 0 1px rgba(118,235,169,.10);
}
.rx-leverage-input-row input {
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    appearance: textfield;
    text-align: right;
    font-size: 16px;
    font-weight: 750;
}
.rx-leverage-input-row input:focus {
    border: 0;
    box-shadow: none;
}
.rx-leverage-input-row input::-webkit-outer-spin-button,
.rx-leverage-input-row input::-webkit-inner-spin-button {
    margin: 0;
    appearance: none;
}
.rx-leverage-input-row em {
    color: var(--rx-muted);
    font-style: normal;
}
.rx-leverage-presets,
.rx-margin-choice {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.rx-margin-choice {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.rx-leverage-presets button,
.rx-margin-choice button {
    height: 42px;
    color: var(--rx-text);
    border: 1px solid transparent;
    background: transparent;
    font-size: 15px;
}
.rx-leverage-presets button:hover,
.rx-leverage-presets button.active,
.rx-margin-choice button:hover,
.rx-margin-choice button.active {
    color: var(--rx-green);
    border-color: var(--rx-green);
    background: rgba(118,235,169,.06);
}
.rx-leverage-presets button:disabled {
    opacity: .32;
}
.rx-leverage-slider {
    --rx-slider-pct: 0%;
    width: 100%;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    accent-color: var(--rx-green);
    appearance: none;
}
.rx-leverage-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0bbf77 0 var(--rx-slider-pct), rgba(255,255,255,.12) var(--rx-slider-pct) 100%);
}
.rx-leverage-slider::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    margin-top: -6px;
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 50%;
    background: #17e997;
    appearance: none;
}
.rx-leverage-slider::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
}
.rx-leverage-slider::-moz-range-progress {
    height: 6px;
    border-radius: 999px;
    background: #0bbf77;
}
.rx-leverage-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 50%;
    background: #17e997;
}
.rx-leverage-scale {
    display: flex;
    justify-content: space-between;
    margin-top: -12px;
    color: var(--rx-muted);
    font-size: 11px;
}
.rx-modal-submit {
    height: 42px;
    color: #07100b;
    background: var(--rx-green);
    font-weight: 850;
}
.rx-modal-submit:disabled {
    color: var(--rx-muted);
    background: rgba(255,255,255,.08);
}
.rx-position-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.rx-position-head span {
    display: block;
    color: var(--rx-muted);
    font-size: 11px;
}
.rx-position-head b {
    font-size: 16px;
}
.rx-position-head button {
    width: 30px;
    height: 30px;
    color: var(--rx-muted);
    background: rgba(255,255,255,.06);
}
.rx-position-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}
.rx-position-stats div {
    padding: 8px;
    border: 1px solid var(--rx-line);
    border-radius: 7px;
    background: rgba(255,255,255,.035);
}
.rx-position-stats span {
    display: block;
    color: var(--rx-muted);
    font-size: 10px;
}
.rx-position-stats b {
    font-size: 12px;
}
.rx-tpsl-size-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--rx-line);
    border-radius: 10px;
    background: #11161c;
}
.rx-tpsl-size-tabs button {
    height: 30px;
    color: var(--rx-muted);
    background: transparent;
    font-size: 13px;
    font-weight: 760;
}
.rx-tpsl-size-tabs button.active {
    color: var(--rx-text);
    background: #242b35;
}
.rx-tpsl-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 18px;
    padding: 5px 0 2px;
}
.rx-tpsl-stats div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.rx-tpsl-stats span {
    color: var(--rx-muted);
    font-size: 11px;
}
.rx-tpsl-stats b {
    min-width: 0;
    overflow: hidden;
    color: var(--rx-text);
    font-size: 12px;
    font-weight: 760;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rx-tpsl-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
}
.rx-tpsl-summary span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    color: var(--rx-text);
    border: 1px solid var(--rx-line);
    border-radius: 6px;
    background: rgba(255,255,255,.035);
    font-size: 11px;
}
.rx-tpsl-summary b {
    color: var(--rx-green);
}
.rx-tpsl-summary em {
    color: var(--rx-muted);
    font-style: normal;
}
.rx-tpsl-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--rx-line);
    border-radius: 10px;
    background: rgba(255,255,255,.025);
}
.rx-tpsl-card-head,
.rx-tpsl-estimate,
.rx-tpsl-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.rx-tpsl-card-head b {
    font-size: 12px;
}
.rx-tpsl-card-head b.is-tp {
    color: #00d7b0;
}
.rx-tpsl-card-head b.is-sl {
    color: var(--rx-red);
}
.rx-tpsl-card-head button {
    height: 22px;
    padding: 0 4px;
    color: var(--rx-green);
    background: transparent;
    font-size: 11px;
}
.rx-tpsl-price-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--rx-line);
    border-radius: 8px;
    background: #10151a;
}
.rx-tpsl-price-field input {
    height: 38px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 16px;
}
.rx-tpsl-price-field button {
    height: 38px;
    color: var(--rx-text);
    background: transparent;
    font-size: 13px;
    font-weight: 780;
}
.rx-tpsl-pnl-row {
    display: grid;
    grid-template-columns: 72px repeat(4, minmax(0, 1fr));
    gap: 6px;
}
.rx-tpsl-pnl-row span,
.rx-tpsl-pnl-row button {
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--rx-line);
    border-radius: 7px;
    background: rgba(255,255,255,.045);
    color: var(--rx-muted);
}
.rx-tpsl-pnl-row button {
    color: var(--rx-text);
}
.rx-tpsl-pnl-row button:hover {
    border-color: rgba(118,235,169,.45);
}
.rx-tpsl-estimate {
    color: var(--rx-muted);
}
.rx-tpsl-estimate b {
    color: #00d7b0;
}
.rx-tpsl-estimate .is-pos {
    color: var(--rx-green);
}
.rx-tpsl-estimate .is-neg {
    color: var(--rx-red);
}
.rx-tpsl-estimate .is-zero {
    color: var(--rx-muted);
}
.rx-tpsl-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 2px;
}
.rx-tpsl-footer button {
    height: 42px;
    color: #07100b;
    background: var(--rx-green);
    font-weight: 850;
}
.rx-tpsl-footer button.secondary {
    color: var(--rx-text);
    background: #252c35;
}
.rx-tpsl-footer button:disabled {
    color: var(--rx-muted);
    background: rgba(255,255,255,.08);
}
.rx-position-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.rx-position-grid label {
    display: grid;
    gap: 5px;
    color: var(--rx-muted);
}
.rx-position-grid input,
.rx-position-grid select {
    height: 32px;
}
.rx-position-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}
.rx-position-actions button {
    height: 34px;
    color: #07100b;
    background: var(--rx-green);
    font-weight: 800;
}
.rx-position-actions button.secondary {
    color: var(--rx-text);
    background: rgba(255,255,255,.08);
}
.rx-position-actions button.danger {
    color: #fff;
    background: rgba(255,107,99,.85);
}
.rx-empty {
    display: grid;
    place-items: center;
    min-height: 92px;
    color: var(--rx-muted);
}

.rx-debug {
    min-height: 0;
    overflow: hidden;
}
.rx-debug summary {
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: var(--rx-muted);
    cursor: pointer;
}
.rx-debug[open] {
    position: fixed;
    left: 4px;
    right: 4px;
    bottom: 4px;
    z-index: 60;
    height: min(360px, 55vh);
    display: grid;
    grid-template-rows: 32px 34px minmax(0, 1fr);
}
.rx-debug-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 4px;
}
.rx-debug-actions button {
    height: 26px;
    padding: 0 10px;
    color: var(--rx-muted);
    background: rgba(255,255,255,.06);
}
.rx-debug-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 4px;
    padding: 4px;
}
.rx-debug textarea,
.rx-debug pre {
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 10px;
    overflow: auto;
    color: var(--rx-text);
    border: 1px solid var(--rx-line);
    border-radius: 6px;
    background: #080a09;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    line-height: 1.45;
}

@media (max-width: 1280px) {
    .rx-main-grid { grid-template-columns: minmax(360px, 1fr) 300px 300px; }
    .rx-market-stats { grid-template-columns: repeat(5, minmax(82px, 1fr)); overflow: auto; }
}

@media (max-width: 980px) {
    body { overflow: auto; }
    .rx-nav { height: auto; min-height: 57px; flex-wrap: wrap; padding: 10px 14px; }
    .rx-terminal {
        height: auto;
        min-height: calc(100vh - 57px);
        grid-template-rows: auto auto auto auto;
        overflow: visible;
    }
    .rx-marketbar,
    .rx-main-grid {
        grid-template-columns: 1fr;
    }
    .rx-market-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-left: 0;
    }
    .rx-chart-panel { min-height: 420px; }
    .rx-book-panel { min-height: 440px; }
    .rx-ticket { min-height: auto; }
    .rx-bottom {
        min-height: 300px;
        grid-template-rows: 36px minmax(0, 1fr);
    }
    .rx-bottom-resizer { display: none; }
}

@media (max-width: 620px) {
    .rx-nav .cine-nav-brand {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .rx-nav .cine-nav-right {
        order: 2;
        margin-left: auto;
    }
    .rx-nav .cine-nav-tabs {
        order: 4;
        flex: 1 0 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .rx-nav .cine-nav-tab {
        flex: 0 0 auto;
    }
    .rx-nav-status { order: 3; flex-basis: 100%; }
    .rx-market-left { flex-wrap: wrap; }
    .rx-network-select { flex: 1 0 100%; }
    .rx-market-picker { flex-basis: 100%; }
    .rx-live-pill { flex: 1 0 auto; justify-content: center; }
    .rx-market-stats { grid-template-columns: 1fr; }
    .rx-chart-panel { min-height: 360px; }
    .rx-chart-toolbar {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .rx-chart-source { width: 100%; }
    .rx-bottom-tabs button { padding: 0 9px; }
    .rx-debug[open] { height: 70vh; }
    .rx-debug-grid { grid-template-columns: 1fr; }
}

/* Claude Design integration: cinematic RiseX skin over the live trading DOM. */
:root {
    --rx-bg: #07080b;
    --rx-panel: #0c0d12;
    --rx-panel-2: #11151a;
    --rx-panel-3: #171d22;
    --rx-line: rgba(255,255,255,.11);
    --rx-line-strong: rgba(107,255,154,.52);
    --rx-text: #e8efea;
    --rx-muted: rgba(232,239,234,.60);
    --rx-soft: rgba(232,239,234,.38);
    --rx-green: #6bff9a;
    --rx-green-2: #22c876;
    --rx-red: #ff7b7b;
    --rx-amber: #ffb85c;
    --rx-blue: #83a7ff;
}

html,
body {
    background:
        repeating-linear-gradient(135deg, rgba(255,255,255,.008) 0 2px, transparent 2px 6px),
        #07080b;
}
body {
    font-family: "Space Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 11px;
}
button,
input,
select,
textarea {
    border-radius: 4px;
}
button {
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
button:hover:not(:disabled) {
    border-color: rgba(255,255,255,.32);
}
input,
select,
textarea {
    color: var(--rx-text);
    border-color: rgba(255,255,255,.13);
    background: rgba(255,255,255,.025);
}
input:focus,
select:focus,
textarea:focus {
    border-color: rgba(107,255,154,.58);
    box-shadow: 0 0 0 1px rgba(107,255,154,.12), 0 0 18px rgba(107,255,154,.06);
}

.rx-nav {
    height: 57px;
    gap: 14px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255,255,255,.10);
    background: rgba(4,5,7,.94);
}
.rx-nav .cine-nav-brand {
    font-size: 12px;
    font-weight: 800;
}
.rx-nav .cine-nav-tab {
    min-height: 31px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: rgba(232,239,234,.62);
    font-size: 11px;
    font-weight: 760;
    background: transparent;
}
.rx-nav .cine-nav-tab:hover,
.rx-nav .cine-nav-tab.active {
    color: var(--rx-text);
    border-color: rgba(255,255,255,.13);
    background: rgba(255,255,255,.06);
}
.rx-nav-status span {
    height: 28px;
    border-radius: 5px;
    background: rgba(255,255,255,.035);
}
.rx-nav-status span:last-child {
    color: var(--rx-green);
    border-color: rgba(107,255,154,.34);
    background: rgba(107,255,154,.07);
}
.rx-nav .cine-nav-btn.accent {
    color: #06100b;
    background: var(--rx-green);
}

.rx-terminal {
    gap: 7px;
    padding: 7px;
    background:
        repeating-linear-gradient(135deg, rgba(255,255,255,.007) 0 2px, transparent 2px 6px),
        #07080b;
}
.rx-marketbar,
.rx-chart-panel,
.rx-book-panel,
.rx-ticket,
.rx-bottom,
.rx-debug {
    border: 1px solid rgba(255,255,255,.105);
    background:
        repeating-linear-gradient(135deg, rgba(255,255,255,.010) 0 2px, transparent 2px 6px),
        linear-gradient(180deg, rgba(255,255,255,.024), rgba(255,255,255,.004)),
        var(--rx-panel);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 8px 18px -16px rgba(0,0,0,.95);
}

.rx-marketbar {
    grid-template-columns: minmax(410px, .9fr) minmax(0, 1.8fr);
    gap: 8px;
    padding: 8px;
    overflow: visible;
}
.rx-market-left {
    gap: 9px;
    padding: 0;
}
.rx-network-select,
.rx-network-fixed {
    height: 42px;
    color: var(--rx-green);
    border-color: rgba(107,255,154,.31);
    background: rgba(107,255,154,.055);
}
.rx-market-trigger {
    height: 42px;
    grid-template-columns: 28px minmax(0, 1fr) auto 16px;
    gap: 10px;
    padding: 0 12px;
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.035);
}
.rx-market-trigger:hover {
    border-color: rgba(255,255,255,.36);
    background: rgba(255,255,255,.05);
}
.rx-market-avatar {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #6bff9a, #2d9f59);
}
#marketTriggerSymbol {
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}
#marketTriggerMeta {
    color: rgba(232,239,234,.46);
    font-size: 10px;
}
.rx-market-caret {
    color: rgba(232,239,234,.45);
}
.rx-live-pill {
    height: 42px;
    border-color: rgba(107,255,154,.30);
    color: var(--rx-green);
    background: rgba(107,255,154,.06);
}
.rx-live-pill > span:first-child {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rx-green);
    box-shadow: 0 0 10px rgba(107,255,154,.85);
}
.rx-live-pill.is-loading > span:first-child {
    background: var(--rx-amber);
    box-shadow: 0 0 10px rgba(255,184,92,.75);
}
.rx-market-stats {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid rgba(255,255,255,.09);
    background: rgba(255,255,255,.045);
}
.rx-market-stats div {
    min-width: 0;
    padding: 7px 10px;
    background: rgba(7,8,11,.84);
}
.rx-market-stats label {
    color: rgba(232,239,234,.42);
    font-size: 9px;
}
.rx-market-stats b {
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}
.rx-market-stats b.is-pos,
.rx-green,
.rx-pos-cell.is-pos b,
.rx-pos-cell.is-pos span {
    color: var(--rx-green);
}
.rx-market-stats b.is-neg,
.rx-red,
.rx-pos-cell.is-neg b,
.rx-pos-cell.is-neg span {
    color: var(--rx-red);
}

.rx-market-dropdown {
    width: min(760px, calc(100vw - 26px));
    padding: 10px;
    border-color: rgba(255,255,255,.19);
    border-radius: 5px;
    background:
        repeating-linear-gradient(135deg, rgba(255,255,255,.012) 0 2px, transparent 2px 6px),
        #0c0d12;
    box-shadow: 0 18px 40px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.05);
}
.rx-market-search {
    border-radius: 4px;
    background: rgba(255,255,255,.03);
}
.rx-market-search span {
    color: var(--rx-green);
}
.rx-market-table-head {
    color: rgba(232,239,234,.46);
    font-size: 9px;
}
.rx-market-row {
    border-bottom-color: rgba(255,255,255,.04);
}
.rx-market-row:hover {
    background: rgba(255,255,255,.035);
}
.rx-market-row.active,
.rx-market-row.on {
    border-color: rgba(107,255,154,.25);
    background: rgba(107,255,154,.065);
}

.rx-main-grid {
    grid-template-columns: minmax(480px, 1fr) 330px 320px;
    gap: 7px;
}
.rx-chart-panel {
    background: #111820;
}
.rx-chart-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255,255,255,.075);
    background: rgba(255,255,255,.018);
}
.rx-tabs.compact,
.rx-chart-tools {
    display: flex;
    align-items: center;
    gap: 3px;
}
.rx-tabs.compact button,
.rx-chart-tools button,
.rx-chart-source select {
    height: 26px;
    padding: 0 9px;
    color: rgba(232,239,234,.66);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 4px;
    background: rgba(255,255,255,.025);
    font-size: 10px;
}
.rx-tabs.compact button.active,
.rx-chart-tools button.active {
    color: var(--rx-green);
    border-color: rgba(107,255,154,.48);
    background: rgba(107,255,154,.075);
}
.rx-chart-source {
    margin-left: auto;
}
.rx-chart-source select {
    min-width: 120px;
}
.rx-chart-title {
    gap: 14px;
    padding: 7px 12px;
    color: rgba(232,239,234,.52);
    border-bottom: 1px solid rgba(255,255,255,.055);
    font-size: 10px;
}
#chartSymbol {
    color: #fff;
    font-weight: 900;
}
#chartVolume {
    color: var(--rx-green);
}
.rx-chart-shell {
    background:
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
        #111820;
    background-size: 76px 42px;
}
.rx-chart-watermark {
    color: rgba(255,255,255,.18);
    font-size: 24px;
    font-weight: 900;
}
.rx-chart-tool-hint,
.rx-chart-measure {
    border-radius: 3px;
    border-color: rgba(107,255,154,.38);
    background: rgba(7,8,11,.86);
    color: var(--rx-green);
}

.rx-book-panel {
    grid-template-rows: 38px 34px minmax(0, 1fr);
    background: #0c0f13;
}
.rx-book-panel > .rx-tabs {
    gap: 4px;
    padding: 6px 8px 4px;
    background: rgba(255,255,255,.012);
}
.rx-tabs button,
.rx-book-panel > .rx-tabs button {
    border-radius: 4px;
}
.rx-book-panel > .rx-tabs button.active,
.rx-tabs.split button.active {
    color: #06100b;
    background: var(--rx-green);
}
.rx-book-controls {
    grid-template-columns: 96px 1fr auto;
    gap: 8px;
    padding: 4px 9px;
    border-bottom: 1px solid rgba(255,255,255,.065);
    background: rgba(255,255,255,.012);
}
.rx-book-controls select {
    height: 27px;
    background: rgba(255,255,255,.035);
}
.rx-book-table,
.rx-trades-table {
    background: #0c0f13;
}
.rx-book-head,
.rx-book-row,
.rx-trade-row {
    grid-template-columns: 1fr 1fr 1fr;
    min-height: 24px;
    padding: 0 10px;
}
.rx-book-head {
    color: rgba(232,239,234,.48);
    background: rgba(12,15,19,.96);
    font-size: 9px;
}
.rx-book-row {
    color: rgba(232,239,234,.90);
    border-bottom-color: rgba(255,255,255,.04);
}
.rx-book-row.ask span:first-of-type,
.rx-trade-row.sell span:first-child {
    color: var(--rx-red);
}
.rx-book-row.bid span:first-of-type,
.rx-trade-row.buy span:first-child {
    color: var(--rx-green);
}
.rx-book-row.ask .rx-depth-bar {
    background: linear-gradient(90deg, transparent, rgba(255,90,90,.50));
}
.rx-book-row.bid .rx-depth-bar {
    background: linear-gradient(90deg, transparent, rgba(107,255,154,.42));
}
.rx-spread-row {
    min-height: 34px;
    color: rgba(232,239,234,.56);
    border-color: rgba(255,255,255,.08);
    background: rgba(107,255,154,.038);
}
.rx-spread-row b {
    color: #fff;
}
.rx-spread-row small {
    color: var(--rx-green);
}
.rx-book-marker {
    color: #090d0b;
    border-color: rgba(255,184,92,.85);
    background: var(--rx-amber);
}

.rx-ticket {
    gap: 7px;
    padding: 8px;
    background: #0b0e11;
}
.rx-tabs.split {
    gap: 4px;
}
.rx-tabs.split button {
    height: 32px;
    color: rgba(232,239,234,.62);
    background: rgba(255,255,255,.04);
}
.rx-mode-row {
    gap: 5px;
}
.rx-mode-row button,
.rx-ticket-actions button {
    height: 30px;
    color: rgba(232,239,234,.72);
    border: 1px solid rgba(255,255,255,.09);
    background: rgba(255,255,255,.045);
}
.rx-mode-row #marginModeControl,
.rx-mode-row #leverageControl {
    color: #fff;
}
.rx-mode-row #marginModeControl:hover,
.rx-mode-row #leverageControl:hover {
    color: var(--rx-green);
    border-color: rgba(107,255,154,.34);
    background: rgba(107,255,154,.065);
}
.rx-side-switch {
    gap: 5px;
}
.rx-side-switch button {
    height: 36px;
    color: rgba(232,239,234,.70);
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.045);
    font-weight: 900;
}
.rx-side-switch button.active:first-child {
    color: #06100b;
    border-color: var(--rx-green);
    background: linear-gradient(180deg, var(--rx-green), #42d882);
    box-shadow: 0 0 18px rgba(107,255,154,.16);
}
.rx-side-switch button.active:last-child {
    color: #170707;
    border-color: var(--rx-red);
    background: linear-gradient(180deg, var(--rx-red), #f35f5f);
    box-shadow: 0 0 18px rgba(255,123,123,.14);
}
.rx-account-mini,
.rx-estimates,
.rx-signer-box,
.rx-execution-box {
    border-color: rgba(255,255,255,.085);
    border-radius: 5px;
    background: rgba(255,255,255,.025);
}
.rx-account-mini {
    padding: 8px 10px;
}
.rx-account-mini span,
.rx-estimates span,
.rx-execution-box span,
.rx-order-form label {
    color: rgba(232,239,234,.52);
}
.rx-account-mini b,
.rx-estimates b,
.rx-execution-box b {
    color: #fff;
}
.rx-order-form {
    gap: 7px;
}
.rx-ticket input,
.rx-ticket select {
    height: 31px;
    background: rgba(255,255,255,.025);
}
.rx-size-mode {
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 4px;
    background: rgba(255,255,255,.035);
}
.rx-size-mode button {
    border-radius: 3px;
}
.rx-size-mode button.active {
    color: #06100b;
    background: var(--rx-green);
}
.rx-field-inline {
    grid-template-columns: 1fr 56px;
    gap: 5px;
}
.rx-field-inline span,
.rx-field-inline button {
    border-color: rgba(255,255,255,.10);
    border-radius: 4px;
    background: rgba(255,255,255,.04);
}
.rx-ticket input[type="range"] {
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: var(--rx-green);
}
.rx-ticket input[type="range"] {
    --rx-slider-fill: 0%;
}
.rx-ticket input[type="range"]::-webkit-slider-runnable-track {
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rx-green) 0 var(--rx-slider-fill), rgba(255,255,255,.16) var(--rx-slider-fill) 100%);
}
.rx-ticket input[type="range"]::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    margin-top: -5px;
    border: 1px solid rgba(255,255,255,.86);
    border-radius: 50%;
    background: var(--rx-green);
    appearance: none;
}
.rx-checks label,
.rx-confirm {
    color: rgba(232,239,234,.70);
}
.rx-checks input,
.rx-confirm input {
    accent-color: var(--rx-green);
}
.rx-confirm {
    border-color: rgba(255,184,92,.36);
    border-radius: 5px;
    background: rgba(255,184,92,.075);
}
.rx-place {
    height: 38px;
    color: #06100b;
    border: 1px solid var(--rx-green);
    background: linear-gradient(180deg, var(--rx-green), #42d882);
    box-shadow: inset 0 0 16px rgba(255,255,255,.08), 0 0 18px rgba(107,255,154,.16);
}
.rx-place.sell {
    color: #170707;
    border-color: var(--rx-red);
    background: linear-gradient(180deg, var(--rx-red), #f35f5f);
    box-shadow: inset 0 0 16px rgba(255,255,255,.06), 0 0 18px rgba(255,123,123,.14);
}
.rx-place:disabled {
    color: rgba(232,239,234,.44);
    border-color: rgba(255,255,255,.05);
    background: rgba(255,255,255,.055);
    box-shadow: none;
}
.rx-wallet-actions #connectBtn {
    color: #06100b;
    background: var(--rx-green);
}
.rx-order-status.ok {
    color: var(--rx-green);
}
.rx-order-status.error {
    color: var(--rx-red);
}

.rx-bottom {
    border-top-color: rgba(255,255,255,.10);
    background:
        repeating-linear-gradient(135deg, rgba(255,255,255,.008) 0 2px, transparent 2px 6px),
        rgba(7,8,11,.96);
}
.rx-bottom-resizer {
    background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.055));
}
.rx-bottom-resizer::before {
    width: 70px;
    background: rgba(232,239,234,.38);
}
.rx-bottom-tabs {
    gap: 4px;
    padding: 5px 10px;
    border-bottom-color: rgba(255,255,255,.065);
}
.rx-bottom-tabs button {
    height: 28px;
    padding: 0 13px;
    color: rgba(232,239,234,.62);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 4px;
    background: transparent;
}
.rx-bottom-tabs button:hover {
    color: #fff;
    border-color: rgba(255,255,255,.30);
}
.rx-bottom-tabs button.active {
    color: #06100b;
    border-color: var(--rx-green);
    background: var(--rx-green);
}
.rx-bottom-table {
    background: rgba(7,8,11,.62);
}
.rx-table {
    border-collapse: separate;
    border-spacing: 0;
}
.rx-table th {
    height: 34px;
    color: rgba(232,239,234,.48);
    border-bottom-color: rgba(255,255,255,.08);
    background: rgba(12,13,18,.98);
}
.rx-table td {
    height: 34px;
    color: rgba(232,239,234,.86);
    border-bottom-color: rgba(255,255,255,.045);
}
.rx-table tr:hover td {
    background: rgba(255,255,255,.028);
}
.rx-positions-table td {
    height: 52px;
}
.rx-pos-market::before {
    background: var(--rx-green);
    box-shadow: 0 0 18px rgba(107,255,154,.22);
}
.rx-pos-market.is-short::before {
    background: var(--rx-red);
    box-shadow: 0 0 18px rgba(255,123,123,.20);
}
.rx-inline-icon,
.rx-action-btn {
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 4px;
    background: transparent;
}
.rx-action-btn {
    color: var(--rx-red);
    border-color: rgba(255,123,123,.36);
}
.rx-action-btn:hover {
    background: rgba(255,123,123,.09);
}
.rx-action-btn.secondary {
    color: rgba(232,239,234,.74);
    border-color: rgba(255,255,255,.16);
    background: transparent;
}
.rx-inline-icon:hover,
.rx-action-btn.secondary:hover {
    color: var(--rx-green);
    border-color: rgba(107,255,154,.42);
    background: rgba(107,255,154,.075);
}
.rx-close-position-btn {
    color: #170707;
    border-color: var(--rx-red);
    background: var(--rx-red);
}

.rx-position-modal {
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(2px);
}
.rx-position-dialog,
.rx-position-dialog.rx-tpsl-dialog,
.rx-leverage-dialog {
    border-color: rgba(255,255,255,.18);
    border-radius: 6px;
    background:
        repeating-linear-gradient(135deg, rgba(255,255,255,.012) 0 2px, transparent 2px 6px),
        #0c0d12;
    box-shadow: 0 24px 80px rgba(0,0,0,.70), inset 0 1px 0 rgba(255,255,255,.05);
}
.rx-position-head {
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.rx-position-head b {
    color: #fff;
}
.rx-position-head button {
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 4px;
    background: rgba(255,255,255,.045);
}
.rx-leverage-input-row label {
    border-color: rgba(255,255,255,.13);
    border-radius: 5px;
    background: rgba(255,255,255,.025);
}
.rx-leverage-presets button,
.rx-margin-choice button,
.rx-tpsl-size-tabs button,
.rx-tpsl-pnl-row button,
.rx-tpsl-pnl-row span {
    border-radius: 4px;
}
.rx-leverage-presets button:hover,
.rx-leverage-presets button.active,
.rx-margin-choice button:hover,
.rx-margin-choice button.active {
    color: var(--rx-green);
    border-color: rgba(107,255,154,.52);
    background: rgba(107,255,154,.07);
}
.rx-leverage-slider {
    accent-color: var(--rx-green);
}
.rx-leverage-slider::-webkit-slider-runnable-track {
    background: linear-gradient(90deg, var(--rx-green) 0 var(--rx-slider-pct), rgba(255,255,255,.14) var(--rx-slider-pct) 100%);
}
.rx-leverage-slider::-webkit-slider-thumb {
    background: var(--rx-green);
}
.rx-modal-submit,
.rx-tpsl-footer button:last-child {
    color: #06100b;
    border: 1px solid var(--rx-green);
    background: var(--rx-green);
}
.rx-modal-submit:disabled,
.rx-tpsl-footer button:last-child:disabled {
    color: rgba(232,239,234,.45);
    border-color: rgba(255,255,255,.06);
    background: rgba(255,255,255,.06);
}
.rx-tpsl-size-tabs {
    border-color: rgba(255,255,255,.12);
    border-radius: 5px;
    background: rgba(255,255,255,.025);
}
.rx-tpsl-size-tabs button.active {
    color: #06100b;
    background: var(--rx-green);
}
.rx-tpsl-card {
    border-radius: 5px;
    border-color: rgba(255,255,255,.10);
    background: rgba(255,255,255,.025);
}
.rx-tpsl-card-head b.is-tp,
.rx-tpsl-estimate .is-pos {
    color: var(--rx-green);
}
.rx-tpsl-card-head b.is-sl,
.rx-tpsl-estimate .is-neg {
    color: var(--rx-red);
}
.rx-tpsl-price-field {
    border-radius: 5px;
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.025);
}

@media (max-width: 1280px) {
    .rx-main-grid {
        grid-template-columns: minmax(360px, 1fr) 300px 300px;
    }
    .rx-market-stats {
        grid-template-columns: repeat(5, minmax(92px, 1fr));
    }
}

@media (max-width: 980px) {
    .rx-terminal {
        padding: 7px;
        gap: 7px;
    }
    .rx-marketbar,
    .rx-main-grid {
        grid-template-columns: 1fr;
    }
    .rx-market-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .rx-market-stats {
        grid-template-columns: 1fr;
    }
    .rx-tabs.compact,
    .rx-chart-tools {
        overflow-x: auto;
    }
    .rx-chart-source {
        width: 100%;
        margin-left: 0;
    }
}

/* ── Signer status ─────────────────────────────────────────────────────── */
.rx-mode-row #signerStatusBtn {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(232,239,234,.50);
    border-color: rgba(255,255,255,.07);
}
.rx-mode-row #signerStatusBtn.is-ready {
    color: var(--rx-green);
    border-color: rgba(107,255,154,.34);
    background: rgba(107,255,154,.07);
    opacity: 1;
}
.rx-signer-mini {
    color: rgba(232,239,234,.50);
    font-size: 10px;
}
.rx-signer-mini.is-ready {
    color: var(--rx-green);
}

/* ── Market search icon ────────────────────────────────────────────────── */
.rx-market-search > span {
    font-size: 17px;
    color: rgba(232,239,234,.45);
}

/* ── TIF button row ────────────────────────────────────────────────────── */
.rx-tif-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}
.rx-tif-row button {
    height: 28px;
    color: rgba(232,239,234,.62);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 4px;
    background: rgba(255,255,255,.04);
    font-size: 11px;
    font-weight: 760;
}
.rx-tif-row button.active {
    color: var(--rx-green);
    border-color: rgba(107,255,154,.46);
    background: rgba(107,255,154,.08);
}

/* ── Order confirmation box ────────────────────────────────────────────── */
.rx-confirm {
    gap: 8px;
    font-size: 11px;
}
.rx-confirm input[type="checkbox"] {
    flex: 0 0 13px;
    width: 13px;
    height: 13px;
    margin-top: 1px;
}
