/* Vision T Markets Elite — unified product layer for landing, terminal and portals. */
:root {
  --elite-bg: #03070d;
  --elite-bg-2: #050b14;
  --elite-panel: #08111d;
  --elite-panel-2: #0b1726;
  --elite-panel-3: #101e30;
  --elite-line: rgba(134, 183, 222, .16);
  --elite-line-strong: rgba(76, 183, 255, .32);
  --elite-text: #f4f9ff;
  --elite-muted: #8ba2b7;
  --elite-blue: #2f8cff;
  --elite-cyan: #37d7ff;
  --elite-green: #13d9a0;
  --elite-red: #5096ff;
  --elite-shadow: 0 24px 70px rgba(0, 0, 0, .38);
  --elite-font: Inter, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

html { scroll-behavior: smooth; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { font-family: var(--elite-font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, select, textarea { font-family: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

body:not(.landing-body):not(.login-body):not(.portal-body):not([data-staff-role]) {
  background:
    radial-gradient(circle at 44% -15%, rgba(40, 132, 255, .16), transparent 34%),
    linear-gradient(150deg, #02050a 0%, var(--elite-bg) 60%, #05101c 100%);
  color: var(--elite-text);
}

.terminal-shell {
  padding: 10px;
  gap: 10px;
  background: transparent;
}

.terminal-topbar,
.market-sidebar,
.account-sidebar,
.instrument-bar,
.panel-dark {
  border-color: var(--elite-line) !important;
  background: linear-gradient(145deg, rgba(10, 22, 37, .96), rgba(6, 13, 23, .98)) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 16px 45px rgba(0, 0, 0, .18);
}

.terminal-topbar {
  min-height: 68px;
  height: 68px;
  padding: 0 15px 0 18px;
  grid-template-columns: 210px minmax(440px, 1fr) auto;
  border-radius: 18px;
  backdrop-filter: blur(22px);
}

.terminal-brand { gap: 12px; }
.terminal-brand .candle-mark {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(55, 215, 255, .2);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(47, 140, 255, .18), rgba(55, 215, 255, .03));
  box-shadow: 0 0 24px rgba(47, 140, 255, .12);
}
.terminal-brand b { font-size: 14px; letter-spacing: -.02em; }
.terminal-brand small { margin-top: 1px; color: #7290a8; font-size: 7px; letter-spacing: .16em; }

.top-metrics { height: 46px; gap: 7px; }
.top-metrics article {
  min-width: 112px;
  padding: 8px 11px;
  border-color: var(--elite-line);
  border-radius: 12px;
  background: rgba(15, 30, 48, .7);
}
.top-metrics small { color: #7891a7; font-size: 7px; }
.top-metrics b { font-size: 11px; letter-spacing: -.01em; }
.top-metrics span { font-size: 7px; }
.top-controls { gap: 8px; }
.utility-button, .round-button, .live-status, .deposit-button, .elite-command-trigger {
  min-height: 38px;
  border-color: var(--elite-line);
  background: rgba(14, 29, 46, .88);
  color: #dcecff;
  font-size: 10px;
}
.utility-button { padding: 0 13px; }
.round-button { width: 38px; }
.live-status { padding: 0 13px; }
.live-status i, .aside-foot i { background: var(--elite-green); box-shadow: 0 0 0 4px rgba(19, 217, 160, .1), 0 0 14px rgba(19, 217, 160, .35); }
.deposit-button {
  border: 0;
  padding: 0 17px;
  background: linear-gradient(135deg, #087457, #0b9a70) !important;
  border-color: #087457 !important;
  color: #fff !important;
  box-shadow: 0 5px 16px rgba(10, 143, 103, .15) !important;
}
.deposit-button:hover { filter: brightness(1.04); }
.funding-card[data-type="deposit"] .primary-action {
  background: linear-gradient(135deg, #087457, #0b9a70) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(10, 143, 103, .15);
}
.portal-sidebar nav a[href="/account/deposits"].active { box-shadow: inset 3px 0 var(--elite-green); }
.portal-mobile-sections a[href="/account/deposits"].active,
.portal-mobile-nav a[href="/account/deposits"].active {
  border-color: rgba(19, 217, 160, .34) !important;
  background: rgba(19, 217, 160, .14) !important;
  color: var(--elite-green) !important;
}
.top-avatar { width: 38px; height: 38px; border-color: rgba(55, 215, 255, .25); background: linear-gradient(145deg, #15477a, #0a223c); color: #ecf8ff; font-size: 10px; }
.elite-command-trigger {
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--elite-line);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.elite-command-trigger kbd { padding: 3px 5px; border: 1px solid rgba(255,255,255,.11); border-radius: 5px; background: rgba(255,255,255,.045); color: #8db3cf; font-size: 8px; }

.terminal-grid { grid-template-columns: 268px minmax(660px, 1fr) 258px; gap: 10px; }
.market-sidebar, .account-sidebar, .instrument-bar, .panel-dark { border-radius: 17px; }
.aside-title, .account-heading { min-height: 58px; padding: 14px 15px; }
.aside-title b, .account-heading b { font-size: 10px; letter-spacing: .12em; }
.account-heading small, .aside-title span { font-size: 8px; }
.market-search {
  height: 42px;
  margin: 0 12px 11px;
  border-color: var(--elite-line);
  background: rgba(2, 8, 15, .72);
}
.market-search input { font-size: 10px; }
.market-tabs { gap: 6px; padding: 0 12px 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.market-tabs::-webkit-scrollbar { display: none; }
.market-tabs button { flex: 0 0 auto; height: 28px; padding: 0 11px; border-color: var(--elite-line); background: rgba(12, 26, 42, .7); color: #839ab0; font-size: 7px; }
.market-tabs button.active { border-color: rgba(78, 168, 224, .34); background: rgba(31, 112, 176, .14); color: #e8f5fc; box-shadow: inset 0 0 0 1px rgba(92, 180, 232, .05); }
.market-table { padding: 0 8px 10px; }
.market-row { height: 61px; grid-template-columns: 38px 1fr 72px; gap: 9px; border-radius: 11px; padding: 0 8px; }
.market-row:hover { background: rgba(36, 106, 163, .12); }
.market-row.selected { background: linear-gradient(90deg, rgba(35, 132, 220, .18), rgba(35, 132, 220, .04)); box-shadow: inset 3px 0 var(--elite-cyan); }
.asset-logo { width: 34px; height: 34px; border-color: rgba(118, 178, 224, .24); background: #0d1b2b; font-size: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.market-row b { font-size: 10px; }
.market-row small { font-size: 8px; }
.aside-foot { min-height: 58px; padding: 11px 14px; border-color: var(--elite-line); }
.aside-foot span { font-size: 8px; }
.aside-foot small { font-size: 7px; line-height: 1.45; }

.trade-workspace { grid-template-rows: 76px minmax(300px, 1fr) 192px; gap: 10px; }
.instrument-bar { padding: 11px 15px; }
.instrument-main { gap: 12px; }
.asset-logo.large { width: 45px; height: 45px; font-size: 14px; }
.instrument-main h1 { margin-bottom: 5px; font-size: 18px; letter-spacing: -.035em; }
.instrument-main small { color: #86a0b6; font-size: 8px; }
.instrument-quote { margin-left: 0; margin-right: 14px; }
.instrument-quote small { font-size: 7px; }
.instrument-quote b { font-size: 16px; }
.instrument-quote span { font-size: 9px; }
.elite-instrument-stats { display: flex; gap: 6px; margin-left: auto; margin-right: 14px; }
.elite-instrument-stats span { min-width: 82px; padding: 8px 10px; border-left: 1px solid var(--elite-line); display: flex; flex-direction: column; gap: 4px; }
.elite-instrument-stats small { color: #6f8aa2; font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.elite-instrument-stats b { color: #dcedfa; font-size: 9px; font-weight: 750; }

.terminal-chart { background: #03070c !important; }
.chart-toolbar { min-height: 50px; height: 50px; padding: 0 10px; gap: 6px; border-color: var(--elite-line); background: rgba(6, 14, 24, .92); }
.chart-stage { inset: 50px 0 0; }
.chart-tool.primary, .chart-tool.more { min-height: 38px; border-radius: 10px; }
.chart-tool span small { font-size: 6px; color: #648097; }
.chart-tool span b { font-size: 9px; color: #dcecff; }
.chart-action { min-width: 40px; min-height: 38px; border-radius: 9px; }
.chart-action small { font-size: 6px; }
.toolbar-menu { border-color: var(--elite-line-strong); background: rgba(6, 15, 26, .98); box-shadow: var(--elite-shadow); }
.quick-trade { left: 13px; bottom: 17px; gap: 7px; }
.quote-button { width: 118px; height: 48px; padding: 0 13px; border-radius: 11px; backdrop-filter: blur(12px); }
.quote-button small { font-size: 7px; }
.quote-button b { font-size: 13px; }
.quote-button.sell,
.buy-sell button.active[data-side="sell"],
.submit-order.sell-action { background: linear-gradient(135deg, #1d59b4, #246ddb) !important; border-color: #1d59b4 !important; color: #fff !important; box-shadow: 0 5px 18px rgba(30,93,187, .14) !important; }
.quote-button.buy,
.buy-sell button.active[data-side="buy"],
.submit-order.buy-action { background: linear-gradient(135deg, #087653, #0b9d70) !important; border-color: #087653 !important; color: #fff !important; box-shadow: 0 5px 18px rgba(10, 143, 103, .13) !important; }
.quote-button.sell:hover, .quote-button.buy:hover { filter: brightness(1.04); transform: none; }
.live-price-tag { padding: 5px 7px; border-radius: 5px; font-size: 8px; }

.positions-panel { overflow: hidden; }
.positions-head { height: 52px; padding: 0 14px; border-bottom: 1px solid rgba(120,176,220,.07); }
.table-tabs button { height: 32px; padding: 0 12px; border-color: var(--elite-line); background: rgba(11, 25, 41, .75); color: #8199ae; font-size: 7px; }
.table-tabs button.active { border-color: rgba(76, 163, 218, .36) !important; background: rgba(30, 102, 160, .18) !important; color: #edf7fd !important; }
.table-tabs button span { background: rgba(55,215,255,.14); color: var(--elite-cyan); }
.table-view { height: 136px; padding: 0 14px 10px; }
.terminal-empty { height: 100px; border-color: var(--elite-line); background: rgba(8, 18, 30, .72); color: #7690a7; font-size: 10px; }
.position-head, .order-history-head { height: 30px; font-size: 7px; }
.position-row, .order-history-row { min-height: 43px; font-size: 9px; }
.position-row small, .order-history-row small { font-size: 7px; }

.profile-card { margin: 0 11px 12px; padding: 12px; border-color: var(--elite-line); border-radius: 12px; background: rgba(15, 31, 49, .75); }
.profile-card>span { width: 36px; height: 36px; background: linear-gradient(145deg, #217dcf, #10406f); font-size: 9px; }
.profile-card b { font-size: 10px; }
.profile-card small { font-size: 8px; }
.account-nav { padding: 0 10px; gap: 2px; }
.account-nav a { height: 43px; grid-template-columns: 25px 1fr auto; font-size: 10px; }
.account-nav a:hover { background: rgba(36, 113, 176, .12); color: #eef9ff; }
.account-nav i { color: var(--elite-cyan); }
.demo-warning { border: 1px solid rgba(68, 155, 220, .12); background: rgba(8, 24, 39, .82); }
.demo-warning b { color: #8dc5e8; font-size: 7px; }
.demo-warning p { color: #7791a7; font-size: 7px; }
.reset-account, .logout-button { height: 35px; border-color: var(--elite-line); font-size: 8px; }

.order-ticket { border-color: var(--elite-line-strong); background: linear-gradient(150deg, #0c1929, #07111d); box-shadow: 0 35px 100px rgba(0,0,0,.62); }
.order-ticket h2 { font-size: 21px; }
.buy-sell, .money-input { background: #050c15; border-color: var(--elite-line); }
.submit-order { height: 46px; border-radius: 11px; background: linear-gradient(135deg, #087653, #0b9d70); color: #fff; font-size: 10px; box-shadow: 0 5px 16px rgba(10,143,103,.13); }
.order-ticket .submit-order:not(.buy-action):not(.sell-action):not(.close-action) { background: linear-gradient(135deg, #1766a8, #197fab) !important; box-shadow: 0 5px 16px rgba(26,116,177,.13) !important; }

/* Command center */
.elite-command-backdrop { position: fixed; inset: 0; z-index: 140; display: none; align-items: flex-start; justify-content: center; padding: 11vh 20px 20px; background: rgba(1, 5, 10, .72); backdrop-filter: blur(12px); }
.elite-command-backdrop.open { display: flex; }
.elite-command { width: min(650px, 100%); overflow: hidden; border: 1px solid rgba(81, 188, 255, .35); border-radius: 20px; background: rgba(7, 17, 29, .98); box-shadow: 0 40px 110px rgba(0,0,0,.65); }
.elite-command header { padding: 17px; border-bottom: 1px solid var(--elite-line); display: flex; align-items: center; gap: 12px; }
.elite-command header i { color: var(--elite-cyan); font-size: 20px; font-style: normal; }
.elite-command header i .ui-icon { width: 21px; height: 21px; }
.elite-command input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--elite-text); font-size: 16px; }
.elite-command header kbd { padding: 5px 8px; border: 1px solid var(--elite-line); border-radius: 7px; color: #7490a7; font-size: 9px; }
.elite-command-list { max-height: 420px; padding: 9px; overflow: auto; }
.elite-command-group { padding: 9px 11px 6px; color: #64819a; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.elite-command-item { width: 100%; min-height: 50px; padding: 8px 11px; border: 0; border-radius: 11px; background: transparent; color: #d9eafb; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.elite-command-item:hover, .elite-command-item:focus { outline: 0; background: rgba(42, 137, 214, .15); }
.elite-command-item i { width: 32px; height: 32px; border-radius: 9px; background: #10263b; display: grid; place-items: center; color: var(--elite-cyan); font-style: normal; font-weight: 800; }
.elite-command-item i > .ui-icon { width: 18px; height: 18px; }
.elite-command-item .command-asset-logo { width: 24px; height: 24px; display: grid; place-items: center; overflow: hidden; border-radius: 7px; }
.elite-command-item .command-asset-logo img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.elite-command-item .command-asset-logo .currency-symbol { transform: scale(.78); transform-origin: center; }
.elite-command-item span { display: flex; flex-direction: column; gap: 3px; }
.elite-command-item b { font-size: 11px; }
.elite-command-item small { color: #7891a7; font-size: 8px; }
.elite-command-item em { color: #607c94; font-size: 8px; font-style: normal; }
.elite-command-item em kbd { padding: 3px 5px; border: 1px solid rgba(111,143,169,.35); border-radius: 5px; font-family: inherit; font-size: 7px; font-weight: 800; line-height: 1; letter-spacing: .06em; }

/* Landing */
.landing-body {
  background:
    radial-gradient(circle at 58% 3%, rgba(29, 130, 244, .18), transparent 29%),
    radial-gradient(circle at 5% 32%, rgba(35, 210, 255, .07), transparent 24%),
    linear-gradient(155deg, #02060b 0%, #040b14 54%, #06111e 100%);
  color: var(--elite-text);
}
.landing-nav { border-color: rgba(128, 190, 234, .14); background: rgba(4, 12, 21, .76); box-shadow: 0 16px 50px rgba(0,0,0,.2); backdrop-filter: blur(24px); }
.landing-nav nav a { color: #90a9bd; }
.nav-primary, .hero-primary, .final-cta>a { background: linear-gradient(135deg, #1766a8, #1988b8) !important; box-shadow: 0 7px 22px rgba(26, 116, 177, .15); }
.nav-login, .hero-secondary { border-color: var(--elite-line); background: rgba(9, 23, 38, .68); }
.elite-market-tape { width: min(1360px, calc(100% - 36px)); min-height: 42px; margin: 105px auto -92px; padding: 0 18px; border: 1px solid rgba(91, 171, 227, .12); border-radius: 13px; background: rgba(6, 17, 29, .72); display: flex; align-items: center; overflow: hidden; color: #87a0b4; }
.elite-market-tape>span { flex: 0 0 auto; margin-right: 24px; color: var(--elite-cyan); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.elite-market-tape div { display: flex; align-items: center; gap: 28px; white-space: nowrap; animation: eliteTicker 30s linear infinite; }
.elite-market-tape b { color: #d9edfb; font-size: 9px; }
.elite-market-tape small { margin-left: 7px; color: #6f8ba3; font-size: 8px; }
@keyframes eliteTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.hero-section { padding-top: 148px; }
.eyebrow { color: #8bdfff; background: rgba(34, 134, 221, .1); border-color: rgba(55, 215, 255, .17); }
.hero-copy h1 { max-width: 790px; color: #f5faff; font-size: clamp(56px, 6.3vw, 94px); line-height: .97; letter-spacing: -.065em; }
.hero-copy h1 em { background: linear-gradient(100deg, #46d9ff, #3889ff 55%, #91eaff); -webkit-background-clip: text; color: transparent; }
.hero-copy>p { max-width: 680px; color: #9bb3c6; font-size: 18px; line-height: 1.7; }
.hero-platform { filter: drop-shadow(0 35px 70px rgba(0,0,0,.38)); }
.preview-window { border-color: rgba(74, 177, 244, .25); background: linear-gradient(145deg, #07131f, #050b12); }
.preview-glow { background: #168cff; filter: blur(70px); opacity: .25; }
.market-strip { border-color: rgba(90, 171, 225, .14); background: rgba(5, 15, 26, .72); }
.feature-grid article { position: relative; overflow: hidden; border-color: rgba(105, 179, 227, .14); background: linear-gradient(145deg, rgba(11, 27, 44, .9), rgba(6, 15, 25, .92)); }
.feature-grid article::after { content: ""; position: absolute; inset: auto -35px -55px auto; width: 130px; height: 130px; border-radius: 50%; background: rgba(30, 142, 234, .1); filter: blur(10px); transition: .35s; }
.feature-grid article:hover { border-color: rgba(55, 215, 255, .32); transform: translateY(-5px); }
.feature-grid article:hover::after { transform: scale(1.35); }
.feature-grid article i { color: var(--elite-cyan); }

.elite-product-section { width: min(1240px, calc(100% - 40px)); margin: 0 auto 120px; }
.elite-product-heading { max-width: 750px; margin-bottom: 38px; }
.elite-product-heading>span { color: var(--elite-cyan); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.elite-product-heading h2 { margin: 13px 0; font-size: clamp(38px, 5vw, 65px); line-height: 1.03; letter-spacing: -.055em; }
.elite-product-heading p { max-width: 650px; color: #8da8bb; font-size: 15px; line-height: 1.7; }
.elite-product-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.elite-cockpit, .elite-mobile-card { min-height: 430px; border: 1px solid rgba(104, 181, 230, .15); border-radius: 28px; background: linear-gradient(145deg, rgba(10, 25, 41, .94), rgba(4, 12, 21, .96)); box-shadow: var(--elite-shadow); overflow: hidden; }
.elite-cockpit { padding: 28px; }
.elite-cockpit header, .elite-mobile-card header { display: flex; justify-content: space-between; align-items: flex-start; }
.elite-cockpit header span, .elite-mobile-card header span { display: flex; flex-direction: column; gap: 6px; }
.elite-cockpit header small, .elite-mobile-card header small { color: var(--elite-cyan); font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.elite-cockpit header b, .elite-mobile-card header b { font-size: 20px; }
.elite-cockpit header em { padding: 7px 10px; border: 1px solid rgba(19,217,160,.2); border-radius: 18px; color: var(--elite-green); font-size: 8px; font-style: normal; }
.elite-module-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.elite-module-grid div { min-height: 90px; padding: 15px; border: 1px solid rgba(114,179,223,.11); border-radius: 14px; background: rgba(10, 27, 44, .66); display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 11px; }
.elite-module-grid i { width: 38px; height: 38px; border-radius: 11px; background: rgba(37, 137, 218, .14); display: grid; place-items: center; color: var(--elite-cyan); font-style: normal; }
.elite-module-grid span { display: flex; flex-direction: column; gap: 5px; }
.elite-module-grid b { font-size: 11px; }
.elite-module-grid small { color: #7691a7; font-size: 8px; line-height: 1.35; }
.elite-mobile-card { position: relative; padding: 28px; }
.elite-phone { width: 230px; height: 330px; margin: 26px auto -85px; padding: 11px; border: 1px solid rgba(115,188,235,.28); border-radius: 35px; background: #02060b; box-shadow: 0 24px 70px rgba(0,0,0,.48); transform: rotate(2deg); }
.elite-phone-screen { height: 100%; padding: 17px 13px; border-radius: 25px; background: linear-gradient(165deg, #0a1b2d, #050d17); }
.elite-phone-top { display: flex; justify-content: space-between; color: #88a4ba; font-size: 8px; }
.elite-phone-value { margin: 28px 0 20px; }
.elite-phone-value small { color: #69879f; font-size: 7px; }
.elite-phone-value b { display: block; margin-top: 6px; font-size: 23px; }
.elite-phone-chart { height: 95px; border-bottom: 1px solid rgba(106,178,226,.12); background: linear-gradient(180deg, rgba(44,149,239,.18), transparent); clip-path: polygon(0 60%, 12% 48%, 23% 62%, 34% 31%, 47% 43%, 59% 18%, 71% 35%, 83% 22%, 100% 4%, 100% 100%, 0 100%); }
.elite-phone-actions { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.elite-phone-actions span { height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 8px; font-weight: 900; }
.elite-phone-actions span:first-child { background: rgba(80,150,255,.16); color: var(--elite-red); }
.elite-phone-actions span:last-child { background: rgba(19,217,160,.16); color: var(--elite-green); }
.discipline-section, .crm-section, .access-grid a { border-color: rgba(107, 180, 226, .14); background: linear-gradient(145deg, rgba(9, 25, 41, .88), rgba(4, 13, 22, .94)); }
.final-cta { border-color: rgba(72, 175, 240, .18); background: linear-gradient(145deg, #071c30, #06101c); }

/* Login, account and staff share the same high-trust visual system. */
.login-body, .portal-body, body[data-staff-role] { background: radial-gradient(circle at 30% -15%, rgba(42, 139, 241, .17), transparent 35%), var(--elite-bg); color: var(--elite-text); }
.login-brand-panel, .portal-sidebar, .staff-sidebar { background: linear-gradient(160deg, #061421, #03080f); }
.login-card, .summary-cards article, .overview-card, .quick-card, .history-card, .settings-card, .cash-card, .funding-assurance, .performance-grid article, .staff-card, .staff-metric { border-color: var(--elite-line) !important; background: linear-gradient(145deg, rgba(11, 28, 45, .92), rgba(6, 15, 25, .94)) !important; box-shadow: 0 16px 45px rgba(0,0,0,.14); }
.portal-sidebar nav a.active, .staff-sidebar nav a.active { background: linear-gradient(90deg, rgba(34, 130, 218, .2), rgba(34,130,218,.04)); color: #effaff; box-shadow: inset 3px 0 var(--elite-cyan); }
.portal-sidebar nav i, .staff-sidebar nav i { color: var(--elite-cyan); }
.primary-action, .login-submit, .terminal-cta, .trade-link { background: linear-gradient(135deg, #1766a8, #1988b8) !important; color: #fff !important; box-shadow: 0 6px 18px rgba(26,116,177,.14); }
.content-heading h2, .welcome-row h2, .portal-top h1 { color: var(--elite-text); letter-spacing: -.035em; }

.elite-ready .feature-grid article,
.elite-ready .access-grid a,
.elite-ready .summary-cards article { animation: eliteReveal .55s both; }
.elite-ready .feature-grid article:nth-child(2), .elite-ready .summary-cards article:nth-child(2) { animation-delay: .06s; }
.elite-ready .feature-grid article:nth-child(3), .elite-ready .summary-cards article:nth-child(3) { animation-delay: .12s; }
.elite-ready .feature-grid article:nth-child(4), .elite-ready .summary-cards article:nth-child(4) { animation-delay: .18s; }
@keyframes eliteReveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 1280px) {
  .terminal-grid { grid-template-columns: 238px minmax(580px, 1fr); }
  .account-sidebar { display: none; }
  .terminal-topbar { grid-template-columns: 195px 1fr; }
  .top-controls .utility-button, .top-controls .elite-command-trigger { display: none; }
}

@media (max-width: 900px) {
  .elite-market-tape { margin-top: 90px; }
  .elite-product-grid { grid-template-columns: 1fr; }
  .elite-mobile-card { min-height: 430px; }
  .hero-section { padding-top: 135px; }
}

@media (max-width: 760px) {
  .terminal-shell { padding: 6px; padding-bottom: 72px; }
  .terminal-topbar { min-height: 62px; height: 62px; padding: 0 12px; grid-template-columns: 1fr auto; border-radius: 14px; }
  .terminal-brand .candle-mark { width: 34px; height: 34px; }
  .terminal-brand b { font-size: 13px; }
  .top-controls { display: flex; }
  .top-controls>*:not(.top-avatar):not(.deposit-button) { display: none; }
  .deposit-button { display: inline-flex; height: 34px; min-height: 34px; padding: 0 12px; font-size: 8px; }
  .terminal-grid { grid-template-columns: 1fr; }
  .trade-workspace { grid-template-rows: 68px minmax(330px, 52vh) 218px; gap: 7px; }
  .instrument-bar { padding: 9px 10px; border-radius: 13px; }
  .instrument-main h1 { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
  .instrument-quote { margin: 0 8px 0 auto; }
  .elite-instrument-stats { display: none; }
  .chart-toolbar { height: 43px; min-height: 43px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .chart-stage { inset: 43px 0 0; }
  .chart-tool.primary { min-width: 92px; }
  .toolbar-actions { display: none; }
  .quote-button { height: 46px; }
  .positions-head { height: 48px; overflow-x: auto; }
  .table-tabs { flex-wrap: nowrap; }
  .table-tabs button { white-space: nowrap; }
  .table-view { height: 162px; }
  .mobile-app-nav, .portal-mobile-nav { border-color: rgba(95, 180, 236, .2); background: rgba(5, 15, 25, .94); backdrop-filter: blur(20px); }
  .mobile-app-nav a.active, .mobile-app-nav button.active, .portal-mobile-nav a.active { color: var(--elite-cyan); }
  .elite-command-backdrop { padding: 5vh 10px 10px; }
  .elite-command { border-radius: 16px; }
  .elite-market-tape { width: calc(100% - 20px); margin-top: 80px; margin-bottom: -80px; }
  .elite-market-tape>span { display: none; }
  .elite-market-tape div { flex: 0 0 max-content; gap: 32px; animation-duration: 38s; }
  .hero-section { width: calc(100% - 26px); padding-top: 125px; }
  .hero-copy h1 { font-size: 46px; }
  .hero-copy>p { font-size: 15px; }
  .hero-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hero-trust span { min-width: 0; }
  .elite-product-section { width: calc(100% - 26px); margin-bottom: 75px; }
  .elite-product-heading h2 { font-size: 40px; }
  .elite-cockpit, .elite-mobile-card { min-height: auto; border-radius: 20px; padding: 20px; }
  .elite-module-grid { grid-template-columns: 1fr; }
  .elite-phone { margin-bottom: -70px; }
}

/* Mobile trading app: every primary job gets its own full-height view. */
@media (max-width: 760px) {
  body:has(.terminal-shell) { min-height: 100dvh; overflow: hidden; background: #000; }
  .terminal-shell {
    width: 100%;
    height: 100dvh !important;
    min-height: 0 !important;
    padding: max(6px, env(safe-area-inset-top)) 6px calc(82px + env(safe-area-inset-bottom)) !important;
    gap: 7px;
    overflow: hidden !important;
  }
  .terminal-topbar {
    min-height: 62px;
    height: 62px;
    flex: 0 0 62px;
    padding: 0 10px;
    border-radius: 16px;
  }
  .terminal-brand { gap: 9px; }
  .terminal-brand b { font-size: 15px; font-weight: 800; }
  .terminal-brand small { color: #91a9bd; font-size: 8px; letter-spacing: .11em; }
  .terminal-brand .candle-mark { width: 38px; height: 38px; }
  .top-controls { gap: 6px; }
  .top-avatar, .top-controls > .theme-switch { width: 40px !important; min-width: 40px !important; height: 40px !important; min-height: 40px !important; font-size: 12px; }
  .deposit-button {
    order: 1;
    display: inline-flex !important;
    width: auto;
    min-width: 82px;
    height: 40px;
    min-height: 40px;
    padding: 0 13px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 900;
  }
  .top-controls > .theme-switch { order: 2; }
  .top-avatar { order: 3; }

  .terminal-grid {
    display: block !important;
    flex: 1 1 auto;
    width: 100%;
    height: auto !important;
    min-height: 0;
    overflow: hidden;
  }
  .account-sidebar { display: none !important; }
  .market-sidebar,
  .trade-workspace { width: 100%; height: 100%; min-height: 0; }
  .market-sidebar { display: none !important; border-radius: 16px; overflow: hidden; }
  .trade-workspace,
  .terminal-shell.positions-collapsed .trade-workspace {
    display: grid !important;
    grid-template-rows: 76px minmax(0, 1fr) !important;
    gap: 7px;
  }
  .positions-panel { display: none !important; }

  .terminal-shell.mobile-view-markets .market-sidebar { display: flex !important; animation: eliteMobilePanelIn .2s ease-out; }
  .terminal-shell.mobile-view-markets .trade-workspace { display: none !important; }
  .terminal-shell.mobile-view-trade .trade-workspace { animation: eliteMobilePanelIn .2s ease-out; }
  .terminal-shell.mobile-view-trade .positions-panel { display: none !important; }
  .terminal-shell.mobile-view-activity .trade-workspace { display: block !important; animation: eliteMobilePanelIn .2s ease-out; }
  .terminal-shell.mobile-view-activity .instrument-bar,
  .terminal-shell.mobile-view-activity .terminal-chart { display: none !important; }
  .terminal-shell.mobile-view-activity .positions-panel {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0 !important;
    border-radius: 16px;
  }
  @keyframes eliteMobilePanelIn { from { opacity: .35; transform: translateY(5px); } to { opacity: 1; transform: none; } }

  .aside-title { min-height: 64px; padding: 14px 16px 10px; }
  .aside-title b { font-size: 14px; letter-spacing: .08em; }
  .aside-title span { font-size: 11px; }
  #marketCollapse { display: none; }
  .market-search { height: 50px; margin: 0 12px 12px; padding: 0 14px; border-radius: 13px; }
  .market-search span { font-size: 19px; }
  .market-search input { font-size: 16px; }
  .market-tabs { gap: 8px; padding: 0 12px 12px; }
  .market-tabs button { height: 38px; padding: 0 14px; border-radius: 12px; font-size: 11px; letter-spacing: .02em; text-transform: none; }
  .market-table { flex: 1; min-height: 0; padding: 0 8px 10px; }
  .market-row { height: 70px; grid-template-columns: 44px 1fr 92px; gap: 11px; padding: 0 10px; border-radius: 13px; }
  .market-row + .market-row { border-top: 1px solid rgba(116, 177, 220, .08); }
  .market-row .asset-logo { width: 40px; height: 40px; font-size: 13px; }
  .market-row b { font-size: 13px; }
  .market-row small { margin-top: 2px; color: #91a7b9; font-size: 11px; }
  .aside-foot { min-height: 60px; padding: 10px 15px; }
  .aside-foot span { font-size: 11px; }
  .aside-foot small { font-size: 9px; }

  .instrument-bar { min-height: 76px; height: 76px; padding: 10px 11px; border-radius: 15px; }
  .asset-logo.large { width: 44px; height: 44px; font-size: 14px; }
  .instrument-main { gap: 10px; }
  .instrument-main h1 { max-width: 132px; margin-bottom: 4px; font-size: 17px; }
  .instrument-main small { color: #9bb0c2; font-size: 10px; }
  .instrument-quote { margin: 0 5px 0 auto; gap: 2px 6px; }
  .instrument-quote small { font-size: 8px; }
  .instrument-quote b { font-size: 17px; }
  .instrument-quote span { font-size: 10px; }
  .instrument-bar > .round-button { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
  #priceAlertButton { display: none; }

  .terminal-chart { height: 100%; min-height: 0; border-radius: 15px; overflow: visible; }
  .chart-toolbar { height: 62px; min-height: 62px; padding: 7px; gap: 5px; overflow-x: auto; overflow-y: visible; scrollbar-width: none; scroll-snap-type: x proximity; }
  .chart-toolbar::-webkit-scrollbar { display: none; }
  .chart-toolbar .tool-picker { flex: 0 0 auto !important; width: 104px; min-width: 104px !important; scroll-snap-align: start; }
  .chart-tool.primary, .chart-tool.more { width: 100%; height: 47px; min-height: 47px; padding: 0 7px; }
  .chart-tool > i { font-size: 14px; }
  .chart-tool span small { color: #7895aa; font-size: 8px; }
  .chart-tool span b { font-size: 11px; }
  .chart-stage { inset: 62px 0 0; overflow: hidden; border-radius: 0 0 15px 15px; }
  .chart-loading { font-size: 11px; }
  .live-price-tag { right: 4px; padding: 6px 7px; font-size: 10px; }
  .quick-trade { left: 8px; right: 8px; bottom: 10px; gap: 8px; }
  .quote-button { width: auto; height: 58px; min-height: 58px; flex: 1; padding: 0 14px; border-radius: 13px; }
  .quote-button small { font-size: 10px; }
  .quote-button b { font-size: 16px; }

  .positions-head { flex: 0 0 auto; height: 60px; min-height: 60px; padding: 8px 10px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .table-tabs { min-width: max-content; gap: 7px; }
  .table-tabs button { height: 42px; min-height: 42px; padding: 0 12px; font-size: 11px; border-radius: 13px; }
  .table-tabs button span { min-width: 20px; height: 20px; font-size: 10px; }
  #positionsToggle { display: none; }
  .table-view,
  .table-view.active { flex: 1 1 auto; width: 100%; height: auto !important; min-height: 0; max-height: none; padding: 8px; overflow: auto; }
  .position-table,
  .orders-table-inner,
  .closed-trades { display: block !important; width: 100% !important; min-width: 0 !important; }
  .position-head,
  .order-history-head,
  .closed-trade-head { display: none !important; }
  .terminal-empty { height: 100%; min-height: 220px; padding: 24px; border-radius: 14px; font-size: 13px; line-height: 1.5; }

  .position-row {
    min-height: 0;
    margin-bottom: 7px;
    padding: 12px 13px;
    display: grid !important;
    grid-template-columns: minmax(90px, 1.3fr) minmax(64px, .8fr) minmax(70px, .9fr) minmax(78px, auto) !important;
    gap: 9px 12px !important;
    border: 1px solid rgba(112, 180, 226, .14) !important;
    border-radius: 13px !important;
    background: rgba(9, 24, 39, .78) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.14) !important;
    font-size: 12px !important;
  }
  .position-row > span { min-width: 0; display: flex !important; flex-direction: column; align-items: flex-start !important; gap: 4px; }
  .position-row > span:nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
  .position-row > span:nth-child(2) { grid-column: 3; grid-row: 1; align-items: flex-start !important; justify-content: center; }
  .position-row > span:nth-child(6) { grid-column: 4; grid-row: 1; align-items: flex-end !important; text-align: right; }
  .position-row > span:nth-child(3),
  .position-row > span:nth-child(4),
  .position-row > span:nth-child(5),
  .position-row > span:nth-child(6) { padding: 0; border-radius: 0; background: transparent; }
  .position-row > span:nth-child(3) { grid-column: 1; grid-row: 2; }
  .position-row > span:nth-child(4) { grid-column: 2; grid-row: 2; }
  .position-row > span:nth-child(5) { grid-column: 3; grid-row: 2; }
  .position-row > span:nth-child(3)::before { content: "UNIDADES"; }
  .position-row > span:nth-child(4)::before { content: "APERTURA"; }
  .position-row > span:nth-child(5)::before { content: "ACTUAL"; }
  .position-row > span:nth-child(6)::before { content: "RESULTADO"; }
  .position-row > span:nth-child(3)::before,
  .position-row > span:nth-child(4)::before,
  .position-row > span:nth-child(5)::before,
  .position-row > span:nth-child(6)::before { color: #7893a8; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
  .position-row > span:nth-child(7) { grid-column: 4; grid-row: 2; padding: 0; border: 0; flex-direction: column !important; align-items: flex-end !important; justify-content: center; }
  .position-row b { font-size: 13px; }
  .position-row small { color: #8fa5b8; font-size: 10px; }
  .side-pill { padding: 6px 9px; font-size: 10px !important; }
  .position-status > small { display: none !important; }
  .position-status > div { display: flex; gap: 5px; }
  .position-risk, .position-close { min-height: 34px; padding: 0 9px; border-radius: 9px; font-size: 10px; }

  .order-history-row,
  .closed-trade-row {
    min-height: 0;
    margin-bottom: 9px;
    padding: 14px;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px 14px !important;
    border: 1px solid rgba(112, 180, 226, .14) !important;
    border-radius: 15px !important;
    background: rgba(9, 24, 39, .78) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.14) !important;
    font-size: 12px;
  }
  .order-history-row > span:nth-child(1) { grid-column: 1; grid-row: 1; }
  .order-history-row > b { grid-column: 2; grid-row: 1; font-size: 13px; }
  .order-history-row > span:nth-child(3) { grid-column: 1; grid-row: 2; }
  .order-history-row > span:nth-child(4) { grid-column: 2; grid-row: 2; }
  .order-history-row > span:nth-child(5) { grid-column: 1 / -1; grid-row: 3; padding-top: 9px; border-top: 1px solid rgba(116,177,220,.11); font-weight: 800; }
  .order-history-row small { font-size: 10px; }
  .status-pill { padding: 6px 9px; font-size: 10px; }
  .order-cancel { min-height: 38px; margin-left: 8px; padding: 0 11px; font-size: 10px; }
  .closed-trade-row { grid-template-columns: 1fr auto !important; }
  .closed-main { grid-column: 1; grid-row: 1; }
  .closed-trade-row > span:nth-child(2) { grid-column: 2; grid-row: 1; }
  .closed-prices { grid-column: 1 / -1 !important; grid-row: 2; padding: 10px 0 !important; border-top: 1px solid rgba(116,177,220,.11) !important; border-bottom: 1px solid rgba(116,177,220,.11) !important; justify-content: space-between; }
  .closed-date { grid-column: 1; grid-row: 3; }
  .closed-result { grid-column: 2; grid-row: 3; }
  .closed-main b, .closed-date b { font-size: 13px; }
  .closed-main small, .closed-date small { font-size: 10px; }
  .closed-prices b { font-size: 12px; }
  .closed-result b { font-size: 17px; }
  .closed-result em { font-size: 11px; }
  .history-empty { min-height: 220px; }

  .mobile-app-nav {
    left: 6px;
    right: 6px;
    bottom: max(6px, env(safe-area-inset-bottom));
    min-height: 70px;
    padding: 6px;
    border-radius: 19px;
  }
  .mobile-app-nav button, .mobile-app-nav a { min-height: 56px; border-radius: 14px; }
  .mobile-app-nav i { font-size: 20px; }
  .mobile-app-nav span { font-size: 11px; font-weight: 850; }
  .mobile-app-nav button.active { color: #fff; background: linear-gradient(145deg, rgba(32, 142, 234, .26), rgba(27, 104, 174, .14)); box-shadow: inset 0 0 0 1px rgba(55,215,255,.12); }

  @media (max-width: 430px) {
    .terminal-topbar { padding: 0 7px; }
    .terminal-brand { gap: 6px; }
    .terminal-brand .candle-mark { width: 34px; height: 34px; }
    .terminal-brand b { font-size: 13px; }
    .terminal-brand small { display: none; }
    .top-controls { gap: 4px; }
    .deposit-button { min-width: 72px; height: 36px; min-height: 36px; padding: 0 10px; font-size: 10px; }
    .top-avatar, .top-controls > .theme-switch { width: 36px !important; min-width: 36px !important; height: 36px !important; min-height: 36px !important; }
    .position-row { grid-template-columns: minmax(76px, 1.2fr) minmax(58px, .8fr) minmax(64px, .9fr) auto !important; gap: 8px; padding: 11px 10px; }
    .position-row b { font-size: 12px; }
    .position-row small { font-size: 9px; }
    .position-risk, .position-close { min-height: 32px; padding: 0 7px; font-size: 9px; }
  }

  .modal-backdrop { padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); }
  .order-ticket { width: 100%; max-height: calc(100dvh - 16px); padding: 18px; border-radius: 20px; }
  .order-ticket h2 { font-size: 22px; }
  .order-ticket header small, .order-asset small, .order-ticket > label { font-size: 10px; }
  .order-asset b, .order-info span, .order-ticket > p { font-size: 11px; }
  .buy-sell, .order-types button, .submit-order { min-height: 48px; font-size: 13px; }
  .money-input { height: 54px; }
  .money-input input { font-size: 18px; }

  .portal-body { font-size: 16px; }
  .portal-top h1, .welcome-row h2 { font-size: 25px; }
  .portal-mobile-nav span { font-size: 11px; }
  .portal-mobile-nav i { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.light-theme {
  --elite-bg: #eef5fa;
  --elite-bg-2: #f8fbfd;
  --elite-panel: #fff;
  --elite-panel-2: #f5f9fc;
  --elite-panel-3: #e9f2f8;
  --elite-line: rgba(24, 81, 120, .14);
  --elite-text: #092338;
  --elite-muted: #5f788b;
}
.light-theme body:not(.landing-body):not(.login-body):not(.portal-body):not([data-staff-role]),
.light-theme .landing-body, .light-theme .login-body, .light-theme .portal-body, .light-theme body[data-staff-role] { background: #edf5fa; color: #092338; }
.light-theme .terminal-topbar,
.light-theme .market-sidebar,
.light-theme .account-sidebar,
.light-theme .instrument-bar,
.light-theme .panel-dark,
.light-theme .login-card,
.light-theme .summary-cards article,
.light-theme .overview-card,
.light-theme .quick-card,
.light-theme .history-card { background: rgba(255,255,255,.96) !important; border-color: rgba(27,91,132,.14) !important; }
.light-theme .terminal-chart { background: #fff !important; }
.light-theme .market-row.selected { background: rgba(34, 139, 221, .1); }
.light-theme .landing-nav { background: rgba(255,255,255,.86); }
.light-theme .hero-copy h1, .light-theme .elite-product-heading h2, .light-theme .content-heading h2 { color: #092338; }

/* High-contrast activity rows and compact mobile positions. */
html:not(.light-theme) .position-row,
html:not(.light-theme) .order-history-row,
html:not(.light-theme) .closed-trade-row { color: #edf7fd; background: #071421 !important; border-color: rgba(111, 174, 215, .24) !important; }
html:not(.light-theme) .position-row small { color: #a5b9c8; }
.light-theme .positions-panel { background: #f5f9fc !important; }
.light-theme .positions-head { border-color: #cbdce7 !important; }
.light-theme .table-tabs button { color: #36586d !important; background: #f6fafc !important; border-color: #b9cedc !important; }
.light-theme .table-tabs button.active { color: #073653 !important; background: #d8ecf9 !important; border-color: #78acce !important; box-shadow: inset 0 0 0 1px rgba(13, 99, 153, .08) !important; }
.light-theme .table-tabs button span { color: #075e88 !important; background: #c5e8f8 !important; }
.light-theme .position-row,
.light-theme .order-history-row,
.light-theme .closed-trade-row { color: #102f43 !important; background: #fff !important; border-color: #c9dbe6 !important; box-shadow: 0 6px 18px rgba(19, 58, 82, .08) !important; }
.light-theme .position-row b { color: #102f43; }
.light-theme .position-row small { color: #526f81 !important; }
.light-theme .position-row > span:nth-child(3)::before,
.light-theme .position-row > span:nth-child(4)::before,
.light-theme .position-row > span:nth-child(5)::before,
.light-theme .position-row > span:nth-child(6)::before { color: #58778b !important; }
.light-theme .side-pill.buy { color: #006b50 !important; background: #d9f1e9 !important; }
.light-theme .side-pill.sell { color: #1c55ab !important; background: #f8dfe5 !important; }
.light-theme .position-risk,
.light-theme .position-close { color: #07527a !important; background: #eef7fc !important; border-color: #6ba9cc !important; }
.light-theme .cash-card,
.light-theme .funding-assurance,
.light-theme .movement-card { color: #102f43 !important; background: #fff !important; border-color: #c8dbe7 !important; box-shadow: 0 10px 30px rgba(19, 58, 82, .08) !important; }
.light-theme .available-balance b,
.light-theme .payment-methods legend,
.light-theme .payment-methods button b { color: #102f43 !important; }
.light-theme .available-balance span,
.light-theme .payment-methods button small,
.light-theme .funding-safety { color: #526f81 !important; }
.light-theme .payment-methods button { color: #183d54 !important; background: #f5f9fc !important; border-color: #bdd2df !important; }
.light-theme .payment-methods button.active { color: #073653 !important; background: #dff1fb !important; border-color: #76afd0 !important; }
.light-theme .payment-methods button i { color: #08638e !important; background: #d8edf8 !important; }
.light-theme .staff-card,
.light-theme .staff-form,
.light-theme .staff-metric,
.light-theme .staff-kpis article,
.light-theme .note-item { color: #102f43 !important; background: #fff !important; border-color: #c8dbe7 !important; box-shadow: 0 10px 30px rgba(19, 58, 82, .08) !important; }
.light-theme .staff-card h2,
.light-theme .staff-form h3,
.light-theme .fund-row b,
.light-theme .fund-row strong { color: #102f43 !important; }
.light-theme .fund-row { border-color: #d8e5ed !important; }
.light-theme .fund-row small,
.light-theme .staff-card p,
.light-theme .admin-funding-config > p { color: #526f81 !important; }
.light-theme .staff-form input,
.light-theme .staff-form select,
.light-theme .staff-form textarea { color: #102f43 !important; background: #f8fbfd !important; border-color: #b9cedc !important; }
.light-theme .staff-card .primary { color: #fff !important; background: #0879ad !important; box-shadow: none !important; }
.light-theme .staff-card .danger { color: #194d9c !important; background: #fbe8ed !important; border-color: #3e7ee0 !important; }
.light-theme .staff-card .status.deposit { color: #006a50 !important; background: #e2f5ee !important; border-color: #65b9a0 !important; }

/* Admin-configurable bank and wallet destinations. */
.admin-funding-config { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--staff-line); }
.admin-funding-config > header { margin-bottom: 8px; }
.admin-funding-config > p { margin: 0 0 15px; color: var(--staff-muted); font-size: .78rem; line-height: 1.5; }
.admin-funding-config .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 760px) {
  .position-row { margin-bottom: 5px; padding: 8px 10px; gap: 4px 9px !important; border-radius: 11px !important; }
  .position-row > span { gap: 2px; }
  .position-row b { font-size: 12px; line-height: 1.15; }
  .position-row small { font-size: 9px; line-height: 1.15; }
  .position-row > span:nth-child(3)::before,
  .position-row > span:nth-child(4)::before,
  .position-row > span:nth-child(5)::before,
  .position-row > span:nth-child(6)::before { font-size: 7px; }
  .side-pill { min-height: 25px; padding: 4px 8px; display: inline-flex; align-items: center; font-size: 9px !important; }
  .position-risk, .position-close { min-height: 29px; padding: 0 8px; font-size: 9px; }
  .admin-funding-config .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .position-row { gap: 4px 6px !important; padding: 8px !important; }
  .position-risk, .position-close { min-height: 28px; padding: 0 6px; }
}

/* Final legibility audit: keep every informational label readable in both themes. */
.light-theme {
  --pro-text: #102a3b;
  --pro-muted: #4c687b;
  --pro-subtle: #587487;
  --elite-text: #102a3b;
  --elite-muted: #4c687b;
}

.light-theme .terminal-brand b,
.light-theme .instrument-main h1,
.light-theme .instrument-quote b,
.light-theme .aside-title b,
.light-theme .account-heading b,
.light-theme .market-row b,
.light-theme .profile-card b,
.light-theme .top-metrics b { color: #102a3b !important; }

.light-theme .terminal-brand small,
.light-theme .instrument-main small,
.light-theme .instrument-quote small,
.light-theme .elite-instrument-stats small,
.light-theme .aside-title span,
.light-theme .account-heading small,
.light-theme .market-row small,
.light-theme .profile-card small,
.light-theme .top-metrics small,
.light-theme .aside-foot small,
.light-theme .demo-warning p { color: #4c687b !important; }

.light-theme .elite-instrument-stats b { color: #15364b !important; }

/* Chart toolbar: the selected values previously became almost white on white. */
.light-theme .chart-toolbar { background: #f7fafc !important; border-color: #c7d9e4 !important; }
.light-theme .chart-tool.primary,
.light-theme .chart-tool.more,
.light-theme .chart-action {
  color: #173c52 !important;
  background: #fff !important;
  border-color: #bfd5e3 !important;
}
.light-theme .chart-tool span small,
.light-theme .chart-action small { color: #3f647b !important; }
.light-theme .chart-tool span b,
.light-theme .chart-action b { color: #14384d !important; }
.light-theme .chart-tool > i,
.light-theme .chart-action > i { color: #0876b6 !important; }
.light-theme .chart-tool em,
.light-theme .chart-action em { color: #48677a !important; }
.light-theme .chart-tool.primary.active {
  color: #073e5b !important;
  background: #dff1fb !important;
  border-color: #6cb7df !important;
}
.light-theme .chart-tool.primary.active span b { color: #0a486a !important; }

.light-theme .toolbar-menu header small,
.light-theme .timeframe-grid button small,
.light-theme .option-menu > button small { color: #49687b !important; }
.light-theme .toolbar-menu b,
.light-theme .option-menu > button b,
.light-theme .timeframe-grid button b { color: #14384d !important; }

/* Mobile navigation: dark ink on the pale-blue active tab remains visible outdoors. */
.light-theme .mobile-app-nav button,
.light-theme .mobile-app-nav a { color: #35576c !important; }
.light-theme .mobile-app-nav button.active {
  color: #073e5b !important;
  background: #d6eaf8 !important;
  box-shadow: inset 0 0 0 1px #9bc7e0 !important;
}
.light-theme .mobile-app-nav button.active i,
.light-theme .mobile-app-nav button.active span { color: #073e5b !important; }
.light-theme .mobile-app-nav button:not(.active) i,
.light-theme .mobile-app-nav a i { color: #365f77 !important; }

/* Markets and account sidebars. */
.light-theme .market-tabs button {
  color: #36586d !important;
  background: #f5f8fa !important;
  border-color: #c3d4df !important;
}
.light-theme .market-tabs button.active {
  color: #083f5d !important;
  background: #ddecf6 !important;
  border-color: #78acce !important;
}
.light-theme .market-search input { color: #17384c !important; }
.light-theme .market-search input::placeholder { color: #597487 !important; opacity: 1; }
.light-theme .account-nav a { color: #35576c !important; }

/* Positions, order history and closed operations. */
.light-theme .positions-head,
.light-theme .position-head,
.light-theme .order-history-row small,
.light-theme .closed-trade-row small { color: #4c687b !important; }
.light-theme .order-history-row b,
.light-theme .closed-trade-row b { color: #102f43; }

/* Client portal, funding screens and staff consoles. */
.light-theme .content-heading > span,
.light-theme .welcome-row > div > span,
.light-theme .staff-heading > div > span,
.light-theme .staff-card header small,
.light-theme .staff-form header small { color: #0874aa !important; }
.light-theme .content-heading p,
.light-theme .welcome-row p,
.light-theme .summary-cards small,
.light-theme .status-grid small,
.light-theme .overview-card header small,
.light-theme .quick-card header small,
.light-theme .quick-card a small,
.light-theme .status-grid p,
.light-theme .movement-list small,
.light-theme .movement-list em,
.light-theme .portal-footer,
.light-theme body[data-staff-role] .staff-heading p,
.light-theme body[data-staff-role] .staff-row small,
.light-theme body[data-staff-role] .activity-list small,
.light-theme body[data-staff-role] .provider-card small { color: #4c687b !important; }
.light-theme .portal-sidebar nav a,
.light-theme .portal-mobile-sections a { color: #3e5d70 !important; }
.light-theme .portal-sidebar nav a.active { color: #102f43 !important; }

/* Public pages use the same minimum contrast standard. */
.light-theme .hero-copy p,
.light-theme .section-heading p,
.light-theme .feature-grid p,
.light-theme .landing-footer { color: #496679 !important; }
.light-theme .landing-nav nav a { color: #355469 !important; }

/* Dark mode secondary copy is deliberately brighter without flattening hierarchy. */
html:not(.light-theme) {
  --pro-muted: #a9bdcb;
  --pro-subtle: #91aabc;
  --elite-muted: #9db2c3;
}
html:not(.light-theme) .terminal-brand small,
html:not(.light-theme) .instrument-main small,
html:not(.light-theme) .instrument-quote small,
html:not(.light-theme) .market-row small,
html:not(.light-theme) .chart-tool span small,
html:not(.light-theme) .chart-action small { color: #9fb5c5 !important; }

/* Clear pictograms: one consistent visual language across client and trading views. */
.ui-icon {
  width: 1em;
  height: 1em;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.nav-icon {
  flex: 0 0 auto;
  display: grid !important;
  place-items: center;
  width: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  border-radius: 9px;
  color: #52bdf1 !important;
  background: rgba(64, 173, 232, .12);
  font-size: 18px !important;
  font-style: normal;
}
.portal-sidebar nav a,
.account-nav a { gap: 10px; }
.portal-sidebar nav a { min-height: 50px; padding-inline: 9px 12px; }
.portal-sidebar nav a.active .nav-icon,
.account-nav a:hover .nav-icon {
  color: #fff !important;
  background: #147dac;
  box-shadow: 0 5px 14px rgba(20, 125, 172, .24);
}
.terminal-cta > .nav-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px;
  color: #fff !important;
  background: rgba(255, 255, 255, .17);
  font-size: 23px !important;
}
.quick-card a > .nav-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 11px;
  color: #1280b2 !important;
  background: rgba(38, 151, 207, .13);
  font-size: 21px !important;
}
.payment-methods button > .nav-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px;
  font-size: 23px !important;
}

@media (max-width: 760px) {
  .portal-mobile-sections a { gap: 7px; padding: 5px 10px 5px 6px; }
  .portal-mobile-sections .nav-icon {
    width: 27px !important;
    height: 27px !important;
    border-radius: 8px;
    font-size: 15px !important;
  }
  .portal-mobile-nav .nav-icon,
  .mobile-app-nav .nav-icon {
    width: 29px !important;
    height: 29px !important;
    border-radius: 9px;
    font-size: 17px !important;
  }
  .portal-mobile-nav a.active .nav-icon,
  .mobile-app-nav button.active .nav-icon {
    color: #fff !important;
    background: #0b78aa;
    box-shadow: 0 5px 14px rgba(11, 120, 170, .25);
  }
  .portal-mobile-nav a,
  .mobile-app-nav button,
  .mobile-app-nav a { gap: 3px; }
}

.light-theme .nav-icon {
  color: #0a6895 !important;
  background: #dceff9;
}
.light-theme .portal-sidebar nav a.active .nav-icon,
.light-theme .account-nav a:hover .nav-icon,
.light-theme .portal-mobile-nav a.active .nav-icon,
.light-theme .mobile-app-nav button.active .nav-icon {
  color: #fff !important;
  background: #0a6f9e;
}
.light-theme .terminal-cta small { color: #d8effb !important; }
.light-theme .terminal-cta .nav-icon { color: #fff !important; background: rgba(255,255,255,.18); }
.light-theme .portal-mobile-nav a.active span { color: #073e5b !important; }
.light-theme .portal-mobile-sections a.active {
  color: #fff !important;
  background: #0a75a7 !important;
  border-color: #0a75a7 !important;
  box-shadow: 0 5px 14px rgba(10, 117, 167, .18);
}
.light-theme .portal-mobile-sections a.active span { color: #fff !important; }
.light-theme .portal-mobile-sections a.active .nav-icon {
  color: #fff !important;
  background: rgba(255, 255, 255, .18);
}

/* Compact TradingView-inspired essentials and the client menu in the initials. */
.top-controls { position: relative; overflow: visible; }
button.top-avatar { padding: 0; color: #fff; cursor: pointer; }
.top-avatar.menu-open { outline: 3px solid rgba(40, 167, 225, .22); border-color: #37a9df; }
.account-popover {
  position: absolute;
  z-index: 120;
  top: calc(100% + 12px);
  right: 0;
  width: min(310px, calc(100vw - 20px));
  padding: 10px;
  border: 1px solid rgba(91, 162, 204, .28);
  border-radius: 17px;
  background: #071827;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .42);
}
.account-popover[hidden] { display: none !important; }
.account-popover:not([hidden]) { display: block !important; animation: accountMenuIn .16s ease-out both; }
@keyframes accountMenuIn { from { opacity: 0; transform: translateY(-7px) scale(.98); } to { opacity: 1; transform: none; } }
.account-popover header {
  min-height: 62px;
  padding: 8px 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(106, 163, 198, .18);
}
.account-popover header > span {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #0b75a8;
  font-size: 11px;
  font-weight: 900;
}
.account-popover header div,
.account-popover a > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.account-popover header b { color: #f3f9fd; font-size: 13px; }
.account-popover header small { color: #9bb4c5; font-size: 10px; overflow: hidden; text-overflow: ellipsis; }
.account-popover > a,
.account-popover form button {
  width: 100%;
  min-height: 54px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  color: #e9f5fb;
  background: transparent;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.account-popover > a:hover,
.account-popover > a:focus-visible,
.account-popover form button:hover,
.account-popover form button:focus-visible { outline: 0; background: rgba(45, 153, 211, .14); }
.account-popover .nav-icon,
.account-popover i {
  width: 34px !important;
  height: 34px !important;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #61c5ef !important;
  background: rgba(45, 153, 211, .14);
  font-size: 18px !important;
  font-style: normal;
}
.account-popover a b { font-size: 12px; }
.account-popover a small { color: #93abba; font-size: 10px; }
.account-popover form { margin: 5px 0 0; padding-top: 5px; border-top: 1px solid rgba(106, 163, 198, .18); }
.account-popover form button { color: #9cc4ff; font-size: 12px; font-weight: 850; }

.indicator-menu,
.drawing-menu,
.more-tools-menu { max-height: min(520px, calc(100dvh - 170px)); overflow-y: auto; overscroll-behavior: contain; }
.indicator-menu > button:nth-of-type(n+2) > i,
.drawing-menu > button > i { font-family: "Segoe UI", sans-serif; font-weight: 900; }
.terminal-chart.fullscreen-fallback {
  position: fixed !important;
  inset: 0 !important;
  z-index: 500 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #050b11 !important;
}
body.chart-focus-open { overflow: hidden !important; }
.terminal-chart.fullscreen-fallback .chart-stage { border-radius: 0; }

.light-theme .account-popover {
  border-color: #b8cfdd;
  background: #fff;
  box-shadow: 0 22px 55px rgba(20, 58, 82, .20);
}
.light-theme .account-popover header { border-color: #d7e5ed; }
.light-theme .account-popover header b,
.light-theme .account-popover > a,
.light-theme .account-popover form button { color: #102f43; }
.light-theme .account-popover header small,
.light-theme .account-popover a small { color: #4c687b; }
.light-theme .account-popover > a:hover,
.light-theme .account-popover > a:focus-visible,
.light-theme .account-popover form button:hover,
.light-theme .account-popover form button:focus-visible { background: #eaf5fb; }
.light-theme .account-popover form { border-color: #d7e5ed; }
.light-theme .account-popover form button { color: #1c54a9; }

@media (max-width: 760px) {
  .mobile-app-nav { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .top-controls > .account-popover { display: none; }
  .top-controls > .account-popover:not([hidden]) { display: block !important; position: fixed; top: 68px; right: 8px; }
  .indicator-menu,
  .drawing-menu,
  .more-tools-menu { max-height: min(460px, calc(100dvh - 205px)); }
  .chart-toolbar { overflow: visible !important; }
  .chart-toolbar .tool-picker { flex: 1 1 0 !important; width: auto !important; min-width: 0 !important; }
  .chart-toolbar .more-picker { flex: 0 0 54px !important; width: 54px !important; min-width: 54px !important; }
  .terminal-chart.oscillator-active .quick-trade {
    top: 70px;
    right: auto;
    bottom: auto;
    width: min(270px, calc(100% - 16px));
    gap: 5px;
  }
  .terminal-chart.oscillator-active .quote-button {
    min-height: 46px;
    height: 46px;
    padding-inline: 11px;
    border-radius: 10px;
  }
  .terminal-chart.oscillator-active .quote-button small { font-size: 8px; }
  .terminal-chart.oscillator-active .quote-button b { font-size: 13px; }
}

/* Professional chart guidance: recognizable tools without crowding the workspace. */
.option-menu > button > .tool-visual.nav-icon,
.option-menu > button > .tool-visual {
  width: 32px !important;
  height: 32px !important;
  border-radius: 9px;
  color: #6bc9f3 !important;
  background: rgba(47, 151, 207, .14);
  font-family: inherit;
}
.option-menu > button > .tool-visual .ui-icon { width: 19px; height: 19px; }
.drawing-menu > button.active > .tool-visual,
.indicator-menu > button.active > .tool-visual {
  color: #bcecff !important;
  background: rgba(22, 142, 234, .26);
  box-shadow: inset 0 0 0 1px rgba(102, 207, 255, .28);
}
.tool-use-guide {
  margin: 2px 4px 5px;
  padding: 9px 10px;
  border: 1px solid rgba(91, 180, 231, .20);
  border-radius: 10px;
  background: #0b1b2b;
  color: #dcecf6;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 9px;
  font-size: 9px;
  line-height: 1.35;
}
.tool-use-guide > b {
  grid-column: 1 / -1;
  color: #91d9fa !important;
  font-size: 8px !important;
  letter-spacing: .12em;
}
.tool-use-guide > span { display: flex; align-items: center; gap: 6px; color: #c2d5e2; }
.tool-use-guide > span > i {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #197cb7;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}
html:not(.light-theme) .toolbar-menu header b,
html:not(.light-theme) .option-menu > button b,
html:not(.light-theme) .timeframe-grid button b { color: #edf7fd !important; }
html:not(.light-theme) .toolbar-menu header small,
html:not(.light-theme) .option-menu > button small,
html:not(.light-theme) .timeframe-grid button small { color: #a9bdcb !important; }
.light-theme .option-menu > button > .tool-visual.nav-icon,
.light-theme .option-menu > button > .tool-visual {
  color: #086a99 !important;
  background: #e0f1fa;
}
.light-theme .drawing-menu > button.active > .tool-visual,
.light-theme .indicator-menu > button.active > .tool-visual {
  color: #06486b !important;
  background: #c8e9f8;
  box-shadow: inset 0 0 0 1px #7ab7d7;
}
.light-theme .tool-use-guide {
  border-color: #bdd8e7;
  background: #edf7fc;
  color: #15384d;
}
.light-theme .tool-use-guide > b { color: #075f8a !important; }
.light-theme .tool-use-guide > span { color: #294f65; }
.light-theme .tool-use-guide > span > i { color: #fff; background: #0879ad; }

@media (max-width: 760px) {
  .tool-use-guide { grid-template-columns: 1fr; }
  .tool-use-guide > b { grid-column: 1; }
}

/* Mobile trading toolbar: every primary control remains visible without horizontal scrolling. */
@media (max-width: 760px) {
  .chart-toolbar {
    width: 100%;
    height: 62px;
    min-height: 62px;
    padding: 7px 6px;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) 48px;
    align-items: stretch;
    gap: 4px;
    overflow: visible !important;
    scroll-snap-type: none;
  }
  .chart-toolbar .tool-picker,
  .chart-toolbar .more-picker {
    width: auto !important;
    min-width: 0 !important;
    max-width: none;
    flex: none !important;
    margin: 0;
  }
  .chart-tool.primary,
  .chart-tool.more {
    width: 100% !important;
    height: 48px;
    min-height: 48px;
  }
  .chart-tool.primary {
    padding: 0 4px;
    grid-template-columns: 14px minmax(0, 1fr) 7px;
    gap: 3px;
  }
  .chart-tool.primary > span { width: 100%; overflow: hidden; }
  .chart-tool.primary small { font-size: 6px; letter-spacing: .06em; }
  .chart-tool.primary b { max-width: none; font-size: 9px; text-overflow: ellipsis; }
  .chart-tool.primary > i { font-size: 12px; }
  .chart-tool.more { padding-inline: 2px; }
  .chart-tool.more small { font-size: 5.5px; }
  .chart-stage { inset: 62px 0 0; }
}

@media (max-width: 420px) {
  .chart-toolbar {
    grid-template-columns: repeat(4, minmax(0, 1fr)) 42px;
    padding-inline: 4px;
    gap: 3px;
  }
  .chart-tool.primary {
    grid-template-columns: minmax(0, 1fr) 7px;
    justify-items: start;
    padding-inline: 5px 3px;
  }
  .chart-tool.primary > i { display: none; }
  .chart-tool.primary small { font-size: 5.5px; letter-spacing: .04em; }
  .chart-tool.primary b { width: 100%; font-size: 8.5px; }
  .chart-tool.more { width: 100% !important; }
}

/* v8: desktop clarity, compact neutral activity and a profile-only account menu. */
@media (min-width: 761px) {
  .terminal-grid { grid-template-columns: 268px minmax(0, 1fr) !important; }
  .account-sidebar { display: none !important; }
  .market-sidebar { min-width: 0; }
  .market-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    overflow: visible;
  }
  .market-tabs button {
    width: 100%;
    min-width: 0;
    height: 31px;
    padding: 0 6px;
    font-size: 8px;
    line-height: 1.1;
  }
  .market-tabs button:last-child { grid-column: 1 / -1; }
  .market-table { padding-right: 12px; scrollbar-gutter: stable; }
  .market-row { grid-template-columns: 38px minmax(0, 1fr) 76px; }
  .market-row b { font-size: 11px; }
  .market-row small { font-size: 8.5px; }
  .aside-title b { font-size: 11px; }
  .market-search input { font-size: 11px; }
  .terminal-brand b { font-size: 15px; }
  .terminal-brand small { font-size: 8px; }
  .top-metrics small { font-size: 8px; }
  .top-metrics b { font-size: 12px; }
  .chart-tool span small { font-size: 7px; }
  .chart-tool span b { font-size: 10px; }
  .table-tabs button { font-size: 8px; }
  .position-row, .order-history-row { font-size: 10px; }
  .position-row small, .order-history-row small { font-size: 8px; }
}

html:not(.light-theme) .positions-panel {
  background: #080b10 !important;
}
html:not(.light-theme) .position-row,
html:not(.light-theme) .order-history-row,
html:not(.light-theme) .terminal-empty {
  background: #0c1016 !important;
  border-color: rgba(149, 179, 201, .16) !important;
}
.position-close,
.light-theme .position-close {
  border-color: #1e5ab5 !important;
  background: #1e5ab5 !important;
  color: #fff !important;
  box-shadow: none !important;
}
.position-close:hover,
.light-theme .position-close:hover { background: #2268d0 !important; }

.market-row.selected,
.chart-tool.active,
.payment-methods button.active,
.payment-panel.active { box-shadow: none !important; }
.money-input input,
.cash-input input {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.money-input:focus-within,
.cash-input:focus-within {
  border-color: #259dd7 !important;
  box-shadow: 0 0 0 1px rgba(37, 157, 215, .25) !important;
}

.portal-body { font-size: 16px; }
.portal-body .content-heading p,
.portal-body .welcome-row p,
.portal-body .history-card,
.portal-body .account-detail-card,
.portal-body .portal-form label { line-height: 1.55; }
.portal-body .content-heading p { font-size: 13px; }
.portal-body .movement-list b,
.portal-body .account-detail-card b { font-size: 12px; }
.portal-body .movement-list small,
.portal-body .account-detail-card span { font-size: 10px; }
.download-history { white-space: nowrap; text-decoration: none; }

@media (max-width: 760px) {
  .position-close,
  .light-theme .position-close { background: #1e5ab5 !important; color: #fff !important; }
  .portal-body .content-heading p { font-size: 12px; }
}
