:root {
  color-scheme: dark;
  --page: #070a0e;
  --panel: #090d12;
  --surface: #14191f;
  --line: #272d34;
  --muted: #aab4c2;
  --text: #f3f5f8;
  --green: #7acfa6;
  --red: #e58c98;
  --radius: 9px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--page);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button, a, input { touch-action: manipulation; }
button { background: transparent; border: 0; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #ff7b83; outline-offset: 2px; }
button:disabled { cursor: default; opacity: .32; }
button:not(:disabled):active { filter: brightness(1.2); }
button:not(:disabled):hover { color: #fff; }
a { color: inherit; }
h2, p { margin: 0; }
svg { display: block; }
i[data-icon] { display: inline-grid; place-items: center; flex: none; width: 1.25em; height: 1.25em; }
i[data-icon] svg { width: 100%; height: 100%; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.mobile { display: none !important; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(155deg, #0e1217, #090d12 44%, #070b10); }
.icon-button, .inline-icon { display: inline-grid; place-items: center; padding: 0; flex: none; }
.icon-button { width: 38px; height: 38px; font-size: 19px; border-radius: 8px; }
.icon-button:hover, .inline-icon:hover { background-color: #ffffff0b; }
.inline-icon { width: 22px; height: 22px; border-radius: 50%; }
.is-active.red, .deposit {
  background: linear-gradient(180deg,#863847,#672633);
  border: 1px solid #a75363 !important;
  box-shadow: inset 0 1px 0 #e397a32e;
}
.is-active.red { color: #fff; }
[data-action="favorites"].is-active, [data-action="symbol-favorite"].is-active, .row-star.is-active { color: #ffcb44; }
[data-action="favorites"].is-active svg, [data-action="symbol-favorite"].is-active svg, .row-star.is-active svg { fill: #ffcb44; }
.topbar {
  height: 71px;
  display: flex;
  align-items: center;
  gap: clamp(15px, 2.6vw, 44px);
  padding: 0 14px 0 clamp(15px, 2.15vw, 36px);
  border-bottom: 1px solid #27292f;
  background: radial-gradient(ellipse at 49% -20%, #1b1e24 0, #0f1318 43%, #070a0e 85%);
}
.brand { display: flex; align-items: center; flex: none; text-decoration: none; }
.primary-nav { display: flex; align-items: center; gap: clamp(3px, 1vw, 17px); min-width: 0; flex: 1; }
.primary-nav button {
  height: 45px; display: inline-flex; gap: 9px; align-items: center; flex: none;
  padding: 0 clamp(8px, .9vw, 16px); border: 1px solid transparent; border-radius: 8px;
  font-size: clamp(12px, .95vw, 16px); white-space: nowrap;
}
.primary-nav .is-active { padding-inline: clamp(9px, 1.35vw, 24px); font-weight: 700; }
.primary-nav i { font-size: 19px; }
.primary-nav button:not(.is-active):hover { background: #ffffff0b; }
.header-actions { display: flex; align-items: center; gap: clamp(5px, .85vw, 14px); margin-left: auto; }


.account-button { display: flex; align-items: center; gap: 10px; padding: 0; text-align: left; flex: none; }
.avatar {
  display: grid; place-items: center; color: #a4b4c9; background: linear-gradient(#29313b, #141b23);
  border: 1px solid #3b444f; width: 43px; height: 43px; border-radius: 50%; font-size: 20px;
}
.avatar svg { fill: currentColor; stroke-width: 1.25; }
.account-details { display: grid; gap: 4px; white-space: nowrap; font-size: 14px; }
.account-details > span { display: flex; gap: 5px; align-items: center; }
.account-details strong { color: var(--green); font-size: 17px; }
.deposit { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 9px; height: 43px; padding-inline: clamp(12px, 1.35vw, 25px); font-weight: 700; white-space: nowrap; }
.workspace {
  height: calc(100dvh - 116px); min-height: 635px;
  display: grid;
  grid-template-columns: clamp(60px, 4.7vw, 79px) clamp(233px, 20.6vw, 345px) minmax(0, 1fr) clamp(228px, 18.2vw, 305px);
  grid-template-rows: minmax(0, 1fr) clamp(108px, 15.4vh, 145px);
  gap: 5px;
  padding: 0 5px 5px 0;
}
.side-nav {
  grid-area: 1 / 1 / 3 / 2; min-height: 0; display: flex; flex-direction: column; gap: 3px;
  padding: 13px 0 9px 5px; border-right: 1px solid #171c23; background: #06090d;
}
.side-nav button {
  flex: 1 1 0; max-height: 71px; min-height: 38px; padding: 7px 1px;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
  border: 1px solid transparent; border-radius: 7px 0 0 7px; color: #c3cdda; font-size: clamp(10px, .75vw, 13px);
}
.side-nav button:hover { background-color: #ffffff0b; }
.side-nav button i { font-size: 18px; }
.side-nav .is-active.red { background: linear-gradient(90deg, #a10709, #2e0a0d 71%, #140b0e); border-right-color: transparent !important; }
.side-nav .exit { margin-top: auto; flex: 0 0 65px; }
.market-sidebar { grid-area: 1 / 2 / 3 / 3; display: flex; flex-direction: column; gap: 5px; min-height: 0; padding-top: 10px; }
.watchlist { padding: 7px 10px 8px; }
.watch-tabs { display: flex; justify-content: space-between; gap: 2px; padding-inline: 1px; border-bottom: 1px solid #1d232a; }
.watch-tabs button { position: relative; height: 37px; padding: 0 2px; font-size: clamp(10px, .84vw, 14px); white-space: nowrap; color: #e6eaf1; }
.watch-tabs button.is-active { font-weight: 700; text-shadow: 0 0 10px #f41d24; }
.watch-tabs button.is-active::after {
  content: ""; position: absolute; bottom: 0; inset-inline: 0; height: 2px; border-radius: 4px;
  background: #ff3636; box-shadow: 0 0 8px 2px #f61026;
}
.search-line { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 9px; margin: 9px 0 5px; }
.search-line .icon-button { width: 28px; height: 29px; color: #c3cdda; font-size: 17px; }
.search { display: flex; align-items: center; min-width: 0; padding: 0 8px; gap: 7px; border: 1px solid #232930; border-radius: 7px; background: linear-gradient(90deg, #080c11, #15191f 82%); color: #c8d2df; height: 31px; }
.search input { background: none; color: var(--text); border: none; padding: 0; min-width: 0; width: 100%; font-size: 12px; line-height: 1.2; }
.search input::placeholder { color: #c7d0dd; }
.watch-head, .asset-row { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) 47px minmax(49px, 23%) 22px; column-gap: 5px; }
.watch-head { height: 28px; color: #c4cbd6; font-size: 12px; border-bottom: 1px solid #252a31; }
.watch-head > :nth-child(2), .asset-rate { text-align: center; }
.watch-head > :nth-child(3), .asset-price { text-align: right; }
.asset-list { min-height: calc(9 * clamp(27px, 3.55vh, 34px)); }
.asset-row { width: 100%; height: clamp(27px, 3.55vh, 34px); border-bottom: 1px solid #171d2433; font-size: 13px; }
.asset-row:hover { background: #ffffff07; }
.asset-main { display: flex; align-items: center; gap: 7px; padding: 0; min-width: 0; width: 100%; height: 100%; white-space: nowrap; text-align: left; }
.asset-ticker { flex: none; }
.spark { min-width: 0; flex: 0 1 50px; height: 24px; margin-left: auto; margin-right: 5px; }
.asset-rate { font-weight: 700; }
.asset-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-star { display: grid; place-items: center; padding: 0; color: #c0c9d5; font-size: 13px; height: 100%; width: 100%; }
.flag {
  display: inline-grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; overflow: hidden;
  border-radius: 50%; background: #182433; font-size: 21px; line-height: 1; box-shadow: inset 0 0 0 1px #ffffff3b;
}
.flag canvas { display: block; height: 100%; width: 100%; }
.flag.gold { background: #d89306; color: white; font-size: 13px; }
.flag.btc { background: #fa8f0d; color: #fff; font-size: 17px; font-weight: 700; }
.flag.eth { background: #c3d3f6; color: #344f9e; font-size: 18px; }
.flag.oil { background: #393b3e; color: #fff; font-size: 13px; }
.sentiment { padding: 12px; }
.sentiment h2, .calendar h2 { font-size: 14px; font-weight: 650; line-height: 1.25; }
.sentiment-graphic { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.sentiment-graphic .bull {
  display: block;
  flex: none;
  width: clamp(37px,4vw,60px);
  height: auto;
  mix-blend-mode: screen;
  filter: saturate(.78);
}
.sentiment-track { flex: 1; height: 7px; min-width: 22px; border-radius: 999px; overflow: hidden; background: #293038; }
.sentiment-graphic.has-data .sentiment-track { background: #a45d6b; }
.sentiment-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #67b48e; }
.sentiment-values { display: flex; justify-content: space-between; gap: 5px; color: #dce1eb; font-size: .8125rem; }
.sentiment-values strong { margin-inline-end: 2px; font-variant-numeric: tabular-nums; }
.sentiment-note { margin-top: 7px; color: var(--muted); font-size: .75rem; line-height: 1.38; }
.calendar { flex: 1; overflow: hidden; padding: 10px 10px 12px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 5px; }
.small-select { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 6px; border: 1px solid #323942; font-size: 13px; }
.calendar-head, .calendar-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) 48px; align-items: center; text-align: left; gap: 5px; }
.calendar-head { background: #11161b; color: #d4dbe7; font-size: 12px; padding: 7px 4px; border-radius: 6px; }
.calendar-head span:last-child { text-align: right; }
.calendar-row { width: 100%; min-height: 31px; padding: 4px; border-bottom: 1px solid #171d24; font-size: 13px; white-space: nowrap; }
.calendar-row:hover { background: #ffffff08; }
.calendar-row > span:nth-child(2) { display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; }
.calendar-row .flag { height: 20px; width: 20px; }
.impact { justify-self: end; display: flex; gap: 3px; margin-right: 7px; }
.impact i { height: 12px; width: 5px; border-radius: 1px; background: #fb242a; box-shadow: inset 1px 0 #ff646740; }
.chart-panel { grid-area: 1 / 3 / 2 / 4; display: flex; flex-direction: column; overflow: hidden; }
.chart-assets { display: flex; padding: 8px; gap: clamp(5px, .65vw, 11px); align-items: stretch; border-bottom: 1px solid #282e35; }
.chart-assets .icon-button { height: 42px; width: 38px; background: #11161c; border: 1px solid #272d34; }
.chart-tab {
  display: flex; align-items: center; justify-content: flex-start; flex: 1 0 0; gap: clamp(4px, .55vw, 9px); min-width: 0;
  height: 43px; padding: 0 clamp(4px, .75vw, 12px); background: linear-gradient(155deg, #161b22, #0a0e13);
  border: 1px solid #292f37; border-radius: 8px; font-size: clamp(11px, .94vw, 15px); white-space: nowrap; font-weight: 700;
}
.chart-tab .positive { margin-left: auto; }
.chart-tab.is-active.red { background: linear-gradient(155deg, #420e12, #221116 85%); box-shadow: inset 0 -2px 9px #fc1d2374, 0 0 13px #f2192638; }
.chart-tab .flag { width: clamp(17px, 1.65vw, 27px); height: clamp(17px, 1.65vw, 27px); }
.chart-toolbar { display: flex; align-items: center; min-height: 39px; padding: 0 7px; gap: 5px; border-bottom: 1px solid #272d33; background: #070b10; }
.chart-toolbar .toolbar-group { display: flex; align-items: center; gap: 1px; }
.chart-toolbar .toolbar-group + .toolbar-group { border-left: 1px solid #222831; padding-left: 5px; }
.chart-toolbar .toolbar-end { margin-left: auto; }
.chart-toolbar button { height: 31px; min-width: 23px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 5px; font-size: 14px; white-space: nowrap; }
.chart-toolbar button i { font-size: clamp(13px, 1.2vw, 19px); }
.chart-toolbar button:hover, .chart-toolbar button.is-active { background: linear-gradient(#282f38, #141920); }
.chart-toolbar .periods button.is-active { box-shadow: inset 0 -2px #9ca8b96e; }
.chart-toolbar button[aria-pressed="true"]:not([data-interval]) { color: #ff9da1; background: #3d1015; }
.chart-toolbar button.with-label { font-size: 12px; }
.chart-info { min-height: 39px; gap: clamp(7px, 2.1vw, 35px); display: flex; align-items: center; padding: 2px clamp(9px, 1.12vw, 18px) 0; background: #080c11; }
#desktop-symbol { flex: none; }
.desktop-symbol-button { display: flex; align-items: center; gap: 7px; font-weight: 700; padding: 0; white-space: nowrap; }
.ohlc { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; font-size: 11px; }
.ohlc b { color: var(--green); font-weight: 400; }
.chart-stage { position: relative; flex: 1; min-height: 0; background: #070b10; }
.chart-stage canvas { display: block; width: 100%; height: 100%; }
.chart-panel:fullscreen { border: 0; border-radius: 0; background: #080c10; }
.trade-panel { grid-area: 1 / 4 / 2 / 5; display: flex; flex-direction: column; padding: 13px; overflow: hidden; }
.trade-tabs { display: flex; align-items: stretch; height: 44px; flex: none; border: 1px solid #2e343c; border-radius: 8px; overflow: visible; margin-bottom: 13px; }
.trade-tabs button { flex: 1; border: 1px solid transparent; border-radius: 8px; font-weight: 700; padding-inline: 4px; font-size: clamp(12px, .96vw, 16px); white-space: nowrap; }
.trade-mode { margin-bottom: 10px; }
.field-label { display: flex; align-items: center; gap: 6px; font-size: 14px; min-height: 22px; }
.field-label .inline-icon { font-size: 14px; }
.segmented { display: flex; gap: 4px; }
.segmented button, .presets button, .stepper, .operation-tabs button {
  background: linear-gradient(#191e25, #10151b); border: 1px solid #30363e; border-radius: 7px;
}
.segmented button { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1; min-width: 0; height: 37px; font-size: 14px; white-space: nowrap; }
.trade-inputs { display: grid; gap: 9px; }
.stepper { display: grid; grid-template-columns: 35px minmax(0,1fr) 35px; align-items: center; height: 39px; margin-top: 2px; }
.stepper output { grid-area: 1 / 2 / 2 / 3; text-align: center; font-size: 16px; font-weight: 700; white-space: nowrap; }
.stepper button { height: 100%; min-width: 0; display: grid; place-items: center; padding: 0; font-size: 16px; }
.stepper button:hover { background: #ffffff0b; border-radius: 6px; }
.stepper button[data-amount^="-"] { grid-area: 1 / 1 / 2 / 2; }
.stepper button[data-amount="1"], .stepper button[data-amount="10"] { grid-area: 1 / 3 / 2 / 4; }
.presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 6px; }
.presets button { height: 30px; white-space: nowrap; padding: 0 2px; font-size: 12px; }
.return { display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: clamp(6px, 2.1vh, 19px); margin-bottom: clamp(8px, 1.7vh, 16px); color: var(--green); }
.return .field-label { align-self: stretch; color: var(--text); }
.return > strong { font-size: clamp(39px, 6vh, 57px); line-height: .98; font-weight: 800; letter-spacing: .01em; }
.return > span { font-size: clamp(18px, 2.6vh, 24px); font-weight: 700; }
.trade-buttons { flex: 1; display: flex; flex-direction: column; gap: clamp(8px, 2vh, 19px); min-height: 0; }
.direction {
  flex: 1; max-height: 86px; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 18px;
  border-radius: 12px; color: #fff; font-size: clamp(21px, 1.6vw, 27px); font-weight: 750;
}
.direction i { font-size: 1.2em; }
.trade-up {
  background: linear-gradient(180deg,#397f65,#255a49);
  border: 1px solid #508d76;
  box-shadow: inset 0 1px 0 #a2cdb227;
}
.trade-down {
  background: linear-gradient(180deg,#944957,#75343f);
  border: 1px solid #ab6370;
  box-shadow: inset 0 1px 0 #d8a3aa34;
}
.direction:hover { filter: brightness(1.13); }
.operations { grid-area: 2 / 3 / 3 / 5; padding: 9px 11px 7px; overflow: hidden; }
.operation-tabs { display: flex; gap: 7px; margin-bottom: 8px; overflow: auto; scrollbar-width: none; }
.operation-tabs button { flex: 0 0 auto; padding: 0 clamp(12px, 1.5vw, 25px); height: 34px; font-size: 14px; border-color: #1c232c; white-space: nowrap; }
.operation-tabs button.is-active { font-weight: 700; }
.operation-content { min-width: 0; }
.operation-table { width: 100%; border-spacing: 0; text-align: left; font-size: 13px; white-space: nowrap; }
.operation-table thead { background: #11161d; }
.operation-table th, .operation-table td { padding: 6px 7px; }
.operation-table th:first-child, .operation-table td:first-child { padding-left: clamp(9px, 1.4vw, 24px); }
.operation-table th { font-weight: 500; }
.operation-table th:first-child { border-radius: 6px 0 0 6px; }
.operation-table th:last-child { border-radius: 0 6px 6px 0; }
.operation-symbol, .operation-direction, .operation-status { display: inline-flex; align-items: center; gap: 6px; }
.operation-direction i { color: var(--green); }
.operation-status::before { content: ""; background: #12a9f5; width: 8px; height: 8px; border-radius: 50%; }
.close-position { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border: 1px solid #4e5864; border-radius: 6px; background: #191e24; font-size: 12px; }
.close-position i { color: var(--red); }
.empty { min-height: 40px; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 8px; }
.statusbar {
  display: flex; align-items: center; gap: clamp(8px, 1.45vw, 24px); padding: 0 16px;
  height: 45px; border-top: 1px solid #36404a; background: linear-gradient(#11161d, #090d12);
  font-size: clamp(11px, .8vw, 13px); white-space: nowrap; overflow: hidden;
}
.connection { display: flex; align-items: center; gap: 7px; }
.connection i { color: var(--green); font-size: 16px; }
.status-time { color: #d3dbe7; }
.ticker { flex: 1; display: flex; align-items: center; justify-content: space-evenly; gap: 8px; overflow: hidden; }
.ticker button { padding: 0; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ticker i { font-size: 10px; color: var(--green); }



dialog {
  width: min(480px, calc(100% - 28px)); max-height: min(650px, 85dvh); padding: 0; color: var(--text);
  border: 1px solid #4d292d; border-radius: 14px; background: linear-gradient(145deg, #1d1517, #100e11 65%);
  box-shadow: 0 16px 80px #000d; overflow: auto;
}
dialog::backdrop { background: #020407b9; backdrop-filter: blur(2px); }
.drawer-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px 12px 19px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { font-size: 18px; }
.drawer-body { padding: 16px 18px 20px; }
.drawer-detail { color: #c3cdda; line-height: 1.5; }
.drawer-detail strong { color: var(--green); }
.drawer-list { display: grid; gap: 6px; }
.drawer-list button {
  padding: 10px; min-height: 42px; border: 1px solid #2b333d; border-radius: 7px;
  display: flex; align-items: center; gap: 9px; text-align: left; background: #131920;
}
.drawer-list button.is-active { border-color: #b92028; background: #301014; }
.drawer-list button .positive { margin-left: auto; }
.drawer-search { display: flex; gap: 8px; margin-bottom: 10px; padding: 8px 10px; border: 1px solid #374151; border-radius: 7px; }
.drawer-search input { background: transparent; color: #fff; width: 100%; border: 0; }
.drawer-mobile-position { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.toast {
  position: fixed; left: 50%; bottom: 65px; transform: translate(-50%, 12px); padding: 11px 16px;
  width: max-content; max-width: calc(100vw - 28px); background: #171e26; color: var(--text);
  border: 1px solid #404a56; border-radius: 8px; pointer-events: none; opacity: 0;
  transition: opacity .16s, transform .16s; z-index: 8; font-size: 14px; text-align: center; box-shadow: 0 8px 30px #0007;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1480px) and (min-width: 901px) {
  .chart-toolbar .optional-tool { display: none; }
  .primary-nav { gap: 5px; }
  .topbar { gap: 18px; }
  .chart-tab { gap: 5px; padding-inline: 7px; }
}
@media (max-width: 1240px) and (min-width: 901px) {
  .primary-nav button span { display: none; }
  .primary-nav .is-active span { display: inline; }
  .primary-nav button { padding-inline: 10px; }
  .chart-tab:nth-last-child(2) { display: none; }
  .chart-toolbar .secondary-tool, .ohlc span:nth-child(n + 3) { display: none; }
  .statusbar .ticker button:nth-child(n + 4) { display: none; }
  .asset-main { gap: 4px; }
  .asset-price, .asset-rate, .asset-ticker { font-size: 12px; }
}
@media (max-height: 790px) and (min-width: 901px) {
  .trade-panel { padding: 9px; }
  .trade-tabs { height: 38px; margin-bottom: 7px; }
  .trade-mode { margin-bottom: 5px; }
  .trade-inputs { gap: 4px; }
  .segmented button { height: 31px; }
  .stepper { height: 33px; }
  .presets button { height: 25px; }
  .return { padding-top: 4px; margin-bottom: 6px; }
  .trade-buttons { gap: 7px; }
  .sentiment { padding-block: 8px; }
  .sentiment-graphic { margin-block: 3px; }
}
@media (max-width: 900px) {
  .desktop, .desktop.inline-icon { display: none !important; }
  .mobile { display: revert !important; }
  :root { background: radial-gradient(ellipse at 48% 6%, #12151b, #030609 55%); }
  body { padding-bottom: calc(67px + env(safe-area-inset-bottom)); }
  .topbar {
    height: 63px; display: grid; grid-template-columns: 1fr minmax(0, 2.3fr) 1fr; gap: 5px; padding: 0 12px;
    border: 0; background: linear-gradient(180deg,#08090c,#050709); margin-top: env(safe-area-inset-top);
  }
  .topbar .menu-button { justify-self: start; font-size: 22px; padding: 5px; text-align: center; }
  .brand { justify-content: center; }
  .header-actions { gap: 4px; }


  .avatar { height: 32px; width: 32px; font-size: 15px; }
  .header-actions .avatar { position: relative; }
  .header-actions .avatar::after { content: ""; position: absolute; width: 7px; height: 7px; bottom: 0; right: 0; border-radius: 50%; background: #70b995; }
  .workspace { display: flex; flex-direction: column; height: auto; min-height: 0; padding: 0 9px 14px; gap: 10px; }
  .mobile-account.mobile {
    display: flex !important; justify-content: space-between; align-items: center; min-height: 56px;
    margin: 0; padding: 8px 9px; border-radius: 11px;
    background: radial-gradient(ellipse at 8% -35%,#300a1040,transparent 64%), linear-gradient(145deg,#12161b,#06090c 60%);
    box-shadow: inset 0 1px 0 #ed2b3c40;
  }
  .mobile-account .account-button { gap: 8px; }
  .mobile-account .account-details { gap: 2px; font-size: 13px; }
  .mobile-account strong { font-size: clamp(17px, 4.25vw, 22px); }
  .mobile-account .deposit { height: 37px; font-size: clamp(13px, 3.45vw, 16px); padding-inline: 10px; }
  .mobile-account .deposit i { font-size: 17px; }




  .chart-panel { border: 0; border-radius: 0; background: transparent; gap: 7px; overflow: visible; }
  .mobile-chart-header.mobile { display: flex !important; gap: 7px; align-items: stretch; }
  .mobile-symbol { display: flex; flex: 1; justify-content: space-between; align-items: stretch; padding: 0 5px 0 11px; min-height: 42px; box-shadow: inset 0 -1px 0 #f52b3e30; }
  .symbol-select { display: flex; align-items: center; gap: clamp(7px, 2.7vw, 14px); padding: 0; font-size: clamp(15px, 4.2vw, 20px); font-weight: 700; white-space: nowrap; }
  .symbol-select .flag { width: 25px; height: 25px; }
  .symbol-select > i { font-size: 12px; }
  .symbol-rate { border: 1px solid #345949; background: #152b23; border-radius: 6px; padding: 4px 7px; font-size: clamp(12px, 3.5vw, 16px); }
  .mobile-symbol .icon-button { height: auto; width: 33px; font-size: 20px; margin-left: 2px; }
  .square-tool {
    display: grid; place-items: center; flex: none; width: 42px; font-size: 18px; padding: 0;
    border: 1px solid #39414a; border-radius: 8px; background: linear-gradient(#151a20,#0b0e13);
  }
  .chart-toolbar { padding: 0; gap: 6px; min-height: 30px; border: 0; background: transparent; }
  .chart-toolbar .periods { display: grid; grid-template-columns: repeat(7,1fr); flex: 1; min-width: 0; border: 1px solid #353c46; border-radius: 7px; background: linear-gradient(#14191f,#0b0f14); overflow: hidden; padding: 0; gap: 0; }
  .chart-toolbar button { height: 28px; min-width: 0; padding: 0 2px; font-size: 12px; }
  .chart-toolbar .periods button.is-active { box-shadow: inset 0 0 7px #ff283257; background: linear-gradient(155deg,#a9090d,#540409); border: 1px solid #f42c2c; }
  .chart-toolbar .mobile.toolbar-group { display: flex !important; padding: 0; border: 0; gap: 6px; }
  .chart-toolbar .mobile.toolbar-group button { width: clamp(28px, 8.5vw, 40px); height: 30px; padding: 0; border: 1px solid #343c45; border-radius: 6px; background: linear-gradient(#151b21,#080b10); }
  .chart-toolbar .mobile.toolbar-group button i { font-size: 15px; }
  .chart-stage { margin-inline: -3px; flex: none; height: clamp(245px, min(76vw, 43dvh), 380px); overflow: hidden; background: linear-gradient(180deg,#060a0e,#030609); }

  .chart-panel:fullscreen { display: flex; justify-content: center; padding: 8px; }
  .chart-panel:fullscreen .chart-stage { flex: 1; }
  .chart-panel.is-expanded {
    position: fixed; z-index: 6; inset: 0; padding: 12px max(10px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
    background: #070b10; overflow: hidden; display: flex; flex-direction: column; 
  }
  .chart-panel.is-expanded .chart-stage { flex: 1; }

  .trade-panel { gap: 8px; padding: 0 1px; border: 0; background: transparent; overflow: visible; }
  .trade-inputs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .trade-field { padding: 5px 8px 7px; border: 1px solid #464d55; border-radius: 10px; background: linear-gradient(155deg,#151a21,#0b1015); box-shadow: inset 0 0 12px #9aabb409; }
  .trade-field .field-label { min-height: 16px; font-size: 12px; margin-bottom: 3px; }
  .stepper { height: 33px; grid-template-columns: minmax(0,1fr) 26px 25px; border-color: #454c55; margin: 0; }
  .stepper output { grid-area: 1 / 1 / 2 / 2; text-align: left; padding-left: 6px; font-size: clamp(12px, 3.7vw, 17px); }
  .stepper button { font-size: 13px; }
  .stepper button[data-amount^="-"] { grid-area: 1 / 2 / 2 / 3; }
  .time-stepper .stepper-symbol { grid-area: 1 / 1 / 2 / 2; margin-left: 5px; width: 15px; height: 15px; pointer-events: none; }
  .time-stepper output { padding-left: 25px; }
  .return { flex-direction: row; justify-content: space-evenly; align-items: center; gap: 5px; padding: 2px 0 3px; margin: 0; background: radial-gradient(ellipse at 50% 115%,#00341649,transparent 65%); }
  .return .field-label { align-self: center; font-size: clamp(12px, 3.3vw, 16px); gap: 3px; }
  .return .field-label .inline-icon { font-size: 13px; }
  .return > strong { font-size: clamp(28px, 8vw, 40px); }
  .return > span { font-size: clamp(14px, 4vw, 23px); white-space: nowrap; }
  .trade-buttons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .direction { height: clamp(53px, 13.2vw, 65px); min-height: 0; font-size: clamp(17px, 5.1vw, 25px); gap: 9px; border-radius: 10px; }
  .direction i { font-size: 1.23em; }


  .operations { display: none; }
  .bottom-nav.mobile {
    position: fixed; z-index: 4; bottom: 0; left: 0; right: 0; display: grid !important; grid-template-columns: repeat(5,minmax(0,1fr));
    min-height: calc(59px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); overflow: hidden;
    border: 1px solid #3c424a; border-bottom: 0; border-radius: 15px 15px 0 0; background: linear-gradient(150deg,#10161b,#080c11 73%);
  }
  .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 2px 0; font-size: clamp(9px, 2.6vw, 13px); white-space: nowrap; }
  .bottom-nav i { font-size: 20px; }
  .bottom-nav .is-active { background: linear-gradient(#542b36,#25202a); border-top: 2px solid #a8616f; border-radius: 13px 13px 0 0; font-weight: 700; }

  .toast { bottom: calc(70px + env(safe-area-inset-bottom)); }
  dialog { margin: auto auto calc(14px + env(safe-area-inset-bottom)); }
}
@media (min-width: 580px) and (max-width: 900px) {
  .workspace { max-width: 680px; margin: 0 auto; padding-inline: 17px; }
  .topbar { padding-inline: max(20px, calc((100vw - 650px) / 2)); }
  .trade-panel { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
.flag svg { width: 100%; height: 100%; }
@media (min-width: 901px) {
  .chart-panel.is-expanded {
    position: fixed; z-index: 6; inset: 0; border: 0; border-radius: 0;
  }
}
@media (max-width: 900px) {
  .chart-toolbar .period-mobile.mobile { display: inline-flex !important; }
}
@media (min-width: 1241px) and (max-width: 1630px) {
  .topbar { gap: clamp(12px, 1.4vw, 22px); }
  .primary-nav { gap: clamp(4px, .55vw, 9px); }
  .primary-nav button { padding-inline: 8px; }
  .primary-nav .is-active { padding-inline: 13px; }
}
@media (min-width: 1241px) and (max-width: 1375px) {
  .primary-nav button:nth-last-child(-n + 2) span { display: none; }
}

#terminal-engine {
  display:block;
  width:100%;
  height:100%;
  min-height:300px;
  border:0;
  background:#10151d;
}
#terminal-engine.is-overlay {
  position:fixed;
  z-index:90;
  inset:0 0 50px;
  width:100%;
  height:calc(100dvh - 50px);
}
#engine-return {
  position:fixed;
  z-index:91;
  bottom:0;
  left:0;
  width:100%;
  min-height:50px;
  padding:10px;
  background:#191f29;
  border-top:1px solid #36414f;
  color:#fff;
}
[hidden] { display:none !important; }
.chart-actions button { display:inline-flex; align-items:center; gap:6px; }
.chart-actions button span { font-size:12px; }
.chart-stage { min-height:310px; }
#market-ohlc { font-variant-numeric:tabular-nums; }
#drawer-asset-search {
  width:100%;
  min-height:40px;
  padding:7px 10px;
  background:#161d26;
  border:1px solid #323c4a;
  border-radius:6px;
  color:#f6f0f2;
}
@media(max-width:760px){
  .chart-actions button span { display:none; }
  #terminal-engine { min-height:280px; }
  .chart-stage { min-height:280px; }
}

/* Terminal */
.svg-icon { display: inline-grid; place-items: center; flex: none; width: 1.25em; height: 1.25em; }
.svg-icon svg { width: 100%; height: 100%; }
.flag img { display: block; width: 100%; height: 100%; object-fit: cover; }
.flag .svg-icon { width: 58%; height: 58%; }
#asset-list { min-height: 0; block-size: clamp(188px, 42dvh, 430px); overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #525d68 #101419; scrollbar-gutter: stable; }
#asset-list:focus-visible { outline: 1px solid #fc6c75; outline-offset: 1px; }
#watch-tabs { justify-content: flex-start; gap: clamp(8px,1vw,18px); }
#drawer-assets { overscroll-behavior-y: contain; }
.asset-row.selected { background: #ffffff09; }
.asset-price { overflow: hidden; text-overflow: ellipsis; }
.asset-main:disabled { opacity: .75; }
.asset-price[data-quote]:has(+ button) { font-size: 12px; }
.spark svg { width: 100%; height: 100%; }
.chart-assets > :not(.chart-tab) { display: grid; place-items: center; flex: 0 0 37px; height: 43px; padding: 0; border: 1px solid #2a3038; border-radius: 8px; background: #12171d; font-size: 17px; }
.chart-tab > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.chart-stage, #terminal-engine { min-height: 0; background: #06090d; }
.stepper .stepper-value { grid-area: 1 / 2 / 2 / 3; white-space: nowrap; font-weight: 700; }
.operations { min-height: 0; display: flex; flex-direction: column; }
.operation-tabs { flex: none; }
.operation-content { overflow: auto; scrollbar-width: thin; }
.operation-table tbody tr + tr td { border-top: 1px solid #1e252c; }
.operation-direction.negative .svg-icon { color: var(--red); }
.auto-close { color: var(--muted); font-size: 12px; }
.result-summary { display: flex; justify-content: space-between; gap: 10px; padding: 10px 13px; }
#drawer-categories { margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
#drawer-categories button { padding-inline: 5px; }
#drawer-assets { min-height: 0; max-height: 46dvh; margin-top: 8px; overflow: auto; scrollbar-width: thin; }
#drawer-assets .asset-row { height: 41px; }
#drawer-orders { max-height: 48dvh; }
#drawer:has(#drawer-orders) { width: min(790px, calc(100% - 20px)); }
.drawer-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; margin-top: 16px; }
.drawer-error { color: #ff8790; font-size: 13px; margin-top: 8px; }
#amount-form { display: grid; gap: 14px; }
#amount-form label { display: grid; gap: 7px; }
#amount-form input { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
#engine-return { padding-bottom: calc(10px + env(safe-area-inset-bottom)); font-weight: 650; background: linear-gradient(#23161b,#181015); border-color: #67343a; }
#terminal-engine.is-overlay { min-height: 0; height: calc(100dvh - 50px - env(safe-area-inset-bottom)); }
@media (min-width: 901px) {
  .chart-toolbar .periods [data-period="15"] { display: none; }
  .chart-panel.is-expanded .chart-stage { flex: 1; }
}
@media (max-width: 1200px) and (min-width: 901px) {
  .chart-toolbar .with-label span { display: none; }
  .chart-tab .flag { display: none; }
  .chart-tab { padding-inline: 5px; }
}
@media (max-width: 900px) {
  .topbar { height: 64px; }
  .topbar .menu-button.mobile { display: grid !important; }
  .chart-toolbar .periods { grid-template-columns: repeat(7,minmax(0,1fr)); }
  .chart-stage { height: clamp(270px, 76vw, 485px); }

  .stepper .stepper-value { grid-area: 1 / 1 / 2 / 2; justify-items: start; padding-left: 6px; font-size: clamp(12px, 3.7vw, 17px); }
  .time-stepper .stepper-value { padding-left: 24px; }
  .time-stepper .stepper-symbol { z-index: 1; }
  .trade-panel { gap: 10px; }
  .operations { display: none; }
  #drawer-orders .operation-table { font-size: 12px; white-space: normal; }
  #drawer-orders .operation-table thead { display: none; }
  #drawer-orders :is(.operation-table,.operation-table tbody) { display: block; }
  #drawer-orders tr { display: grid; grid-template-columns: minmax(90px,1.5fr) minmax(42px,.8fr) minmax(65px,1fr); align-items: center; gap: 6px 2px; padding: 9px 5px; border-bottom: 1px solid var(--line); }
  #drawer-orders .operation-table td { border: 0; padding: 0; }
  #drawer-orders .operation-table td:nth-child(3) { text-align: right; }
  #drawer-orders .operation-table td:last-child:has(.close-position) { grid-column: 3; justify-self: end; }
  #drawer-orders .operation-table td:has(.auto-close) { grid-column: 3; justify-self: end; }
}


/* Market panel and pair artwork */
.market-sidebar { position: relative; min-width: 0; }
.watch-title { display: flex; align-items: center; justify-content: space-between; color: #e9edf4; font-size: 13px; }
.watch-title button { padding: 4px; border-radius: 4px; color: var(--muted); }
.watch-title button:hover { background: #ffffff10; }
.flag.pair-flags { position: relative; width: 32px; height: 25px; overflow: visible; border-radius: 0; background: transparent; box-shadow: none; }
.pair-flags { display: inline-flex; align-items: center; width: 38px; height: 24px; min-width: 38px; overflow: visible; }
.pair-flags img { position: static; display: block; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #949dab70; object-fit: cover; }
.pair-flags img + img { margin-left: -6px; }
:is(.chart-tab,.symbol-select) .pair-flags { width: 38px; height: 24px; }
#desktop-symbol { display: flex; align-items: center; gap: 5px; }
.chart-star { flex: none; width: 28px; height: 28px; border-radius: 6px; }
.chart-star:hover { background: #ffffff0e; }
.trade-tabs button { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: clamp(11px,.92vw,15px); }
#market-resize { display: none; }
@media (min-width: 901px) {
  .workspace { grid-template-columns: clamp(60px, 4.7vw, 79px) var(--market-width,clamp(233px, 20.6vw, 345px)) minmax(0, 1fr) clamp(228px, 18.2vw, 305px); }
  .workspace.market-collapsed { grid-template-columns: clamp(60px, 4.7vw, 79px) 0 minmax(0, 1fr) clamp(228px, 18.2vw, 305px); }
  .workspace.market-collapsed .market-sidebar { display: none; }
  .workspace.market-resizing { cursor: col-resize; user-select: none; }
  #market-resize { display: block; position: absolute; z-index: 3; top: 11px; right: -7px; bottom: 0; width: 9px; border-radius: 5px; cursor: col-resize; touch-action: none; }
  #market-resize:hover,#market-resize:focus-visible,.market-resizing #market-resize { background: #f3313b70; outline: none; }
  .chart-assets button[data-action="toggle-market"][aria-expanded="false"] { color: #ff777f; border-color: #783238; }
  .market-collapsed .chart-stage { min-width: 0; }
  .market-sidebar .asset-row .spark { margin-right: 1px; }
}
@media (max-width: 1100px) {
  .watch-tabs button { font-size: 10px; }
  .market-sidebar .watchlist { padding-inline: 7px; }
}
@media (max-width: 900px) {
  .symbol-select .pair-flags { width: 38px; height: 24px; }

}

/* ASSASFX panels */
#drawer:has(.assas-panel-content) { width: min(660px, calc(100% - 24px)); }
#drawer:has(.assas-panel-content) .drawer-header {
  position: sticky; z-index: 2; top: 0; background: linear-gradient(180deg,#201719,#151113);
  padding: 12px 14px 12px 19px; border-bottom: 1px solid #59232d;
}
.assas-panel-content { display: grid; gap: 12px; }
.panel-view-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.panel-view-bar strong { overflow-wrap: anywhere; }
.panel-button,.panel-menu button,.panel-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 6px 11px; border: 1px solid #373d45; border-radius: 7px; background: linear-gradient(#1b2028,#12161c); color: var(--text); font-size: 13px; }
.panel-button:hover,.panel-menu button:hover,.panel-tabs button:hover { border-color: #8f323a; }
.panel-button.history-link { margin-top: 12px; }
.panel-badge { padding: 4px 7px; border: 1px solid #383d47; border-radius: 6px; color: #d3dae3; font-size: 11px; white-space: nowrap; }
.panel-badge.positive { color: var(--green); border-color: #166436; background: #062319; }
.panel-records,.copy-view,.finance-view { display: grid; gap: 7px; }
.panel-list-row,.panel-history-row { border: 1px solid #292f39; border-radius: 8px; background: linear-gradient(#141920,#0b1017); }
.panel-list-row,.panel-history-row summary { display: flex; width: 100%; align-items: center; gap: 9px; min-height: 50px; padding: 9px 10px; text-align: left; font-size: 13px; }
.panel-history-row summary { list-style: none; cursor: pointer; }
.panel-history-row summary::-webkit-details-marker { display: none; }
.panel-list-row[aria-pressed="true"],.panel-history-row[open] { border-color: #793239; }
.panel-list-row > span:not(.flag,.panel-badge),.panel-history-row summary > span:not(.flag,.panel-badge) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.panel-list-row small,.panel-history-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.panel-history-row dl { display: flex; flex-wrap: wrap; margin: 0; gap: 10px 24px; border-top: 1px solid var(--line); padding: 10px; font-size: 13px; }
.panel-history-row dt { margin-bottom: 4px; color: var(--muted); }
.panel-history-row dd { margin: 0; }
.panel-form { display: grid; gap: 10px; }
.panel-form label { display: grid; gap: 5px; font-size: 13px; }
.panel-form input,.panel-form textarea,.panel-search,.panel-payment textarea {
  display: block; width: 100%; min-height: 38px; padding: 8px 10px; color: var(--text); background: #080e15;
  border: 1px solid #353f4c; border-radius: 7px; font: inherit;
}
.panel-form textarea { resize: vertical; }
.panel-form .deposit { justify-self: start; }
.form-status { color: #ff8690; font-size: 13px; }
.form-status:empty { display: none; }
.support-messages { display: grid; gap: 10px; max-height: 36dvh; overflow: auto; padding: 5px; }
.support-message { width: fit-content; max-width: 92%; padding: 9px; background: #151b23; border: 1px solid #2e3843; border-radius: 9px; }
.support-message.mine { justify-self: end; background: #351319; border-color: #63242b; }
.support-message small { color: var(--muted); font-size: 11px; }
.support-message p { margin-top: 5px; white-space: pre-wrap; overflow-wrap: anywhere; }


.panel-menu,.panel-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.panel-tabs button { flex: 1; }
.panel-setting { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.panel-setting input { accent-color: #ff2937; }
.panel-payment { display: grid; gap: 10px; justify-items: center; text-align: center; }
.panel-qr { padding: 7px; background: #fff; border-radius: 8px; width: min(220px, 100%); }
.panel-qr svg { width: 100%; height: auto; }
.panel-disclosure { border-top: 1px solid var(--line); padding-top: 10px; }
.panel-disclosure summary { cursor:pointer; margin-bottom: 8px; }
.panel-avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.copied-row { margin-left: 14px; }

.account-flow {
  display: grid;
  gap: 14px;
  --flow-border: #42282d;
  --flow-card: #1a1417;
  --flow-muted: #c4afb2;
}
.account-flow [hidden] { display: none !important; }
.flow-hero { display: flex; gap: 12px; align-items: center; padding: 2px 0; }
.flow-hero > span { display: grid; flex: 0 0 42px; place-items: center; height: 42px; border: 1px solid #653339; border-radius: 11px; color: #ff939a; background: #2a181d; font-size: 19px; }
.flow-hero h3 { margin: 0 0 4px; font-size: 17px; }
.flow-hero p, .flow-muted { margin: 0; color: var(--flow-muted); font-size: 13px; line-height: 1.45; }
.flow-progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; list-style: none; padding: 0; margin: 0; }
.flow-progress li { display: flex; align-items: center; min-width: 0; gap: 5px; padding: 6px 3px; border-bottom: 2px solid #41282c; color: var(--flow-muted); font-size: 12px; font-weight: 650; }
.flow-progress li span { display: grid; place-items: center; width: 21px; height: 21px; flex: 0 0 21px; background: #261d21; border: 1px solid #4f343a; border-radius: 50%; }
.flow-progress li[aria-current] { border-bottom-color: #ff646f; color: #fff2f4; }
.flow-progress li[aria-current] span { background: #60242c; border-color: #ab444d; }
.flow-progress li.is-complete { color: #f1b3b8; border-bottom-color: #87414a; }
.flow-stack { display: grid; gap: 10px; min-width: 0; }
.flow-card, .flow-conversion, .flow-summary, .flow-file, .flow-notice, .flow-status { border: 1px solid var(--flow-border); border-radius: 9px; background: var(--flow-card); }
.flow-card, .flow-file { padding: 12px; }
.flow-stack label, .flow-stack > :is(input,select) { min-width: 0; }
.flow-stack label { color: #f0e4e6; font-size: 13px; font-weight: 650; }
.flow-stack :is(input:not([type=checkbox],[type=file]), select, textarea) {
  box-sizing: border-box; display: block; width: 100%; min-height: 42px; padding: 8px 10px;
  border: 1px solid #52383e; border-radius: 7px; background: #100d0f; color: #fff1f3; font: inherit; font-size: 16px; color-scheme: dark;
}
.flow-stack input::placeholder { color: #9e888e; }
.flow-stack textarea { resize: vertical; }
.flow-card label:not(:first-child) { margin-top: 3px; }
.flow-amount { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px; }
.flow-amount > span { color: #f0b3ba; font-size: 13px; font-weight: 700; }
.flow-quick { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; }
.flow-quick button { padding: 5px 2px; font-size: 12px; white-space: nowrap; }
.flow-quick .is-active { border-color: #ae4e55; background: #412026; color: #ffb1b8; }
.flow-summary { display: grid; margin: 0; padding: 3px 12px; }
.flow-summary > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,auto); gap: 8px; padding: 9px 0; align-items: baseline; }
.flow-summary > div + div { border-top: 1px solid #38282d; }
.flow-summary dt { color: var(--flow-muted); font-size: 13px; }
.flow-summary dd { min-width: 0; margin: 0; color: #fff1f3; text-align: right; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.flow-conversion { padding: 3px 12px 9px; }
.flow-conversion .flow-summary { border: 0; background: none; padding: 0; }
.flow-conversion dd { font-size: 17px; }
.flow-conversion > small { color: var(--flow-muted); font-size: 12px; }
.flow-notice { display: flex; gap: 9px; align-items: flex-start; padding: 10px; }
.flow-notice .svg-icon { color: #ff9199; font-size: 17px; }
.flow-notice strong { color: #f5dce0; font-size: 13px; }
.flow-notice p { margin: 4px 0 0; color: var(--flow-muted); font-size: 12px; line-height: 1.4; }
.flow-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.flow-actions .deposit { min-height: 42px; }
.flow-error { color: #ff9ca4; margin: 0; font-size: 13px; }
.flow-error:empty { display: none; }
.flow-files { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.flow-file { display: grid; align-content: start; gap: 8px; }
.flow-file-info { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; min-width: 0; }
.flow-file-info .svg-icon { color: #f38e96; }
.flow-file-info [data-file-status] { display: block; color: var(--flow-muted); font-size: 12px; margin-top: 3px; }
.flow-file img { width: 100%; max-height: 150px; object-fit: contain; border-radius: 6px; }
.flow-file-picker { position: relative; cursor: pointer; overflow: hidden; }
.flow-file-picker input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.flow-file-picker:focus-within { outline: 2px solid #ff7b83; }
.flow-check { display: flex; gap: 8px; align-items: flex-start; line-height: 1.4; }
.flow-check input { accent-color: #ec4d5a; flex: none; }
.flow-status { margin: 0; padding: 9px 12px; color: #f3c8cb; font-size: 13px; }
.flow-status[data-result="approved"] { color: #91eab9; }
.flow-qr { justify-self: center; }
.account-flow .panel-disclosure { font-size: 13px; color: var(--flow-muted); }
@media (max-width: 500px) {
  #drawer:has(.account-flow) .drawer-body { padding: 12px; }
  .flow-files { grid-template-columns: 1fr; }
  .flow-quick { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .flow-actions > button { flex: 1 1 auto; }
}

.support-intro {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #593036;
  border-radius: 11px;
  background: linear-gradient(125deg,#34171c,#151416 72%);
}
.support-intro .svg-icon { color: #ff828c; font-size: 26px; }
.support-intro h3,.support-list-title { margin: 0; font-size: 1rem; }
.support-intro p,.support-form-note { margin: 5px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.support-list-row,.support-ticket { overflow-wrap: anywhere; }
.support-list-row .panel-badge { text-align: center; white-space: normal; }
.support-contact-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.support-contact-fields input { width: 100%; }
.support-confirmation { margin: 0; color: #aaf2c2; font-size: .875rem; }
.support-ticket { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 12px; border: 1px solid #573238; border-radius: 9px; background: #24191c; }
.support-ticket div { display: grid; gap: 4px; }
.support-ticket small { color: var(--muted); }
.support-ticket strong { font-variant-numeric: tabular-nums; }
@media(max-width:480px) {
  .support-intro { grid-template-columns: auto minmax(0,1fr); }
  .support-intro .panel-button { grid-column: 1 / -1; }
  .support-contact-fields { grid-template-columns: 1fr; }
}

#drawer:has(.shared-test-chart) { width: min(900px, calc(100% - 16px)); }
.shared-test-chart { display: grid; gap: 10px; }
.shared-test-label {
  justify-self: start;
  padding: 4px 8px;
  border: 1px solid #794551;
  border-radius: 6px;
  background: #3b222b;
  color: #ffd2da;
  font-size: .8rem;
  font-weight: 650;
}
.shared-test-status { color: #e9dbe1; }
.shared-test-chart canvas {
  display: block;
  width: 100%;
  height: clamp(180px, 53dvh, 440px);
  border: 1px solid #3c2c34;
  border-radius: 9px;
  background: #0a0b10;
}
.shared-test-operation { color: #f3d8df; font-variant-numeric: tabular-nums; }

.chart-loading {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: #070b10;
  color: var(--muted);
  font-size: .875rem;
}
@media (max-width: 900px) {
  body {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    padding: env(safe-area-inset-top) 0 0;
    overflow: hidden;
    overscroll-behavior: none;
  }
  .topbar { flex: none; height: 48px; margin: 0; }
  .workspace { width: 100%; height: auto; flex: 1; min-height: 0; gap: 5px; padding-bottom: 5px; }
  .mobile-account.mobile { flex: none; min-height: 42px; padding-block: 3px; }
  .mobile-account .deposit { height: 32px; }



  .chart-panel { flex: 1 1 0; min-height: 0; gap: 4px; }
  .mobile-symbol { min-height: 35px; }
  .square-tool { width: 36px; }
  .chart-stage { flex: 1 1 0; height: auto; min-height: 0; margin-inline: 0; }
  #terminal-engine { min-height: 0; }
  .sentiment-mobile.mobile {
    display: grid !important;
    grid-template-columns: auto minmax(35px,1fr) auto;
    align-items: center;
    gap: 5px;
    min-height: 25px;
    padding: 2px 4px;
    border: 1px solid #26303a;
    border-radius: 7px;
    background: #0d141a;
  }
  .sentiment-mobile h2 { font-size: clamp(9px,2.75vw,12px); }
  .sentiment-mobile .sentiment-graphic { gap: 3px; margin: 0; }
  .sentiment-mobile .sentiment-graphic .bull { width: clamp(22px,7vw,32px); }
  .sentiment-mobile .sentiment-track { height: 5px; min-width: 9px; }
  .sentiment-mobile .sentiment-values { gap: 4px; align-items: center; font-size: clamp(8px,2.5vw,11px); white-space: nowrap; }
  .sentiment-mobile .sentiment-values strong { margin-inline-end: 0; }
  .trade-panel { flex: none; gap: 4px; margin-bottom: 0; }
  .trade-field { padding: 4px 6px; }
  .trade-field .field-label { margin-bottom: 2px; }
  .stepper { height: 31px; }
  .return { min-height: 25px; padding: 0; }
  .return > strong { font-size: clamp(21px,6.4vw,29px); }
  .return > span { font-size: clamp(13px,4vw,17px); }
  .direction { height: 48px; font-size: clamp(16px,4.5vw,21px); }
  .bottom-nav.mobile { position: static; flex: none; min-height: calc(47px + env(safe-area-inset-bottom)); }
  .bottom-nav button { min-height: 46px; }
  .bottom-nav i { font-size: 17px; }
  .toast { bottom: calc(54px + env(safe-area-inset-bottom)); }
}
@media (max-width: 900px) and (max-height: 700px) {

  .topbar { height: 42px; }
  .direction { height: 44px; }
}
@media (max-width: 900px) and (max-height: 470px) and (orientation: landscape) {
  .workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(140px,31%); grid-template-rows: minmax(0,1fr); }
  .mobile-account.mobile { display: none !important; }
  .trade-panel { align-self: end; }
  .trade-inputs { grid-template-columns: 1fr; gap: 4px; }
  .direction { height: 37px; }
  .bottom-nav button { min-height: 35px; }
  .bottom-nav.mobile { min-height: calc(36px + env(safe-area-inset-bottom)); }
}

@media (max-width:900px) {
  .chart-panel, .chart-panel.is-expanded {
    display: grid;
    grid-template-columns: minmax(0,1fr) 41px;
    grid-template-rows: auto auto minmax(0,1fr);
    column-gap: 5px;
  }
  .mobile-chart-header { grid-area: 1 / 1 / 2 / -1; min-width: 0; }
  .sentiment-mobile.mobile { grid-area: 2 / 1 / 3 / -1; }
  .chart-stage { grid-area: 3 / 1 / 4 / 2; height: 100%; border: 1px solid #2b3036; border-radius: 8px; }
  #chart-toolbar {
    grid-area: 3 / 2 / 4 / 3;
    min-height: 0;
    display: block;
    overflow: auto;
    scrollbar-width: none;
    overscroll-behavior: contain;
  }
  #chart-toolbar .desktop { display: none !important; }
  #chart-toolbar .chart-rail {
    display: grid !important;
    justify-items: center;
    gap: 4px;
    padding: 2px 1px;
  }
  #chart-toolbar .chart-rail button {
    width: 37px;
    height: clamp(30px,6.3dvh,38px);
    color: #d7d5dc;
    border-radius: 7px;
  }
  #chart-toolbar .chart-rail button i { font-size: 17px; }
  #chart-toolbar .chart-rail button[aria-pressed="true"] { border-color: #a26673; background: #452a34; color: #ffd7df; }
  #mobile-chart-period { font-variant-numeric: tabular-nums; font-weight: 700; }
  .chart-panel.is-expanded #chart-toolbar { overflow: auto; }
}
@media (max-width:900px) and (max-height:470px) and (orientation:landscape) {
  .workspace > .chart-panel { grid-area: 1 / 1 / 2 / 2; }
  .workspace > .trade-panel { grid-area: 1 / 2 / 2 / 3; }
}

/* Keep the live chart wide and put trade actions in a compact mobile rail. */
@media (max-width:900px) and (orientation:portrait) {
  .topbar { height: 38px; padding-inline: 8px; }
  .topbar .menu-button { font-size: 19px; }
  .workspace {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: 34px minmax(0,1fr);
    gap: 4px;
    padding: 0 4px 4px;
  }
  .workspace > .mobile-account { grid-area: 1 / 1 / 2 / -1; min-height: 0; padding: 1px 7px; }
  .mobile-account .avatar { width: 26px; height: 26px; font-size: 13px; }
  .mobile-account .account-button { gap: 5px; }
  .mobile-account .account-details { display: flex; align-items: center; gap: 7px; font-size: 11px; }
  .mobile-account .account-details strong { font-size: 14px; }
  .mobile-account .deposit { height: 27px; padding-inline: 7px; font-size: 11px; }
  .mobile-account .deposit i { font-size: 14px; }
  .workspace > .chart-panel { grid-area: 2 / 1 / 3 / 2; min-width: 0; }
  .workspace > .trade-panel {
    position: fixed;
    z-index: 3;
    top: 50dvh;
    right: 5px;
    left: auto;
    width: clamp(76px,21vw,92px);
    min-width: 0;
    padding: 7px 5px;
    gap: 7px;
    overflow: hidden;
    border-radius: 11px;
    background: #090d12e8;
    box-shadow: 0 4px 18px #000a;
    transform: translateY(-50%);
  }
  .chart-panel, .chart-panel.is-expanded {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: auto auto minmax(0,1fr);
    column-gap: 0;
    row-gap: 3px;
  }
  .mobile-chart-header.mobile { grid-area: 1 / 1 / 2 / 2; }
  .mobile-symbol { min-height: 30px; }
  .mobile-symbol .icon-button { width: 27px; }
  .symbol-select { gap: 5px; font-size: 14px; }
  .symbol-select .flag { width: 20px; height: 20px; }
  .symbol-rate { padding: 2px 5px; font-size: 11px; }
  .sentiment-mobile.mobile { display: none !important; }
  #chart-toolbar {
    grid-area: 2 / 1 / 3 / 2;
    display: block;
    min-height: 27px;
    overflow: hidden;
  }
  #chart-toolbar .chart-rail { display: flex !important; justify-content: space-between; gap: 3px; padding: 0; }
  #chart-toolbar .chart-rail button { flex: 0 0 30px; width: 30px; height: 27px; }
  #chart-toolbar .chart-rail button i { font-size: 14px; }
  #chart-toolbar .chart-rail #mobile-chart-period { flex: 1 1 auto; min-width: 26px; }
  .chart-stage { grid-area: 3 / 1 / 4 / 2; height: 100%; min-height: 0; }
  .trade-inputs { display: flex; flex-direction: column; gap: 4px; }
  .trade-field { padding: 3px 2px; border-radius: 7px; }
  .trade-field .field-label { min-height: 0; margin: 0 0 2px; font-size: 9px; }
  .stepper { height: 26px; grid-template-columns: minmax(0,1fr) 17px 17px; }
  .stepper .stepper-value { padding-left: 2px; font-size: 10px; }
  .stepper button { font-size: 10px; }
  .time-stepper .stepper-symbol { display: none; }
  .time-stepper output { padding-left: 2px; }
  .return { flex-wrap: wrap; min-height: 0; gap: 1px 3px; padding: 2px 0; }
  .return .field-label { font-size: 10px; }
  .return > strong { font-size: 16px; }
  .return > span { font-size: 10px; white-space: normal; text-align: center; }
  .trade-buttons { display: flex; flex-direction: column; gap: 5px; }
  .direction { width: 100%; height: 56px; flex-direction: column; justify-content: center; gap: 1px; font-size: 12px; border-radius: 9px; }
  .direction i { font-size: 19px; }
  .bottom-nav.mobile { min-height: calc(42px + env(safe-area-inset-bottom)); }
  .bottom-nav button { min-height: 40px; font-size: 9px; }
}

@media (min-width:901px) {
  .chart-info { min-width: 0; }
  .operations-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: none;
    margin-left: auto;
    min-height: 28px;
    padding: 3px 8px;
    border: 1px solid #343b44;
    border-radius: 7px;
    background: #11161c;
    color: #d8dee7;
    font-size: 11px;
    white-space: nowrap;
  }
  .operations-collapsed { grid-template-rows: minmax(0,1fr) 0 !important; }
  .operations-collapsed > .operations { display: none; }
}
@media (min-width:901px) and (max-width:1150px) {
  .operations-toggle span { display:none; }
}
