:root {
  --accent: #72a6ff;
  --bg: #0b1018;
  --panel: #111923;
  --line: #25303e;
  --muted: #7e8da0;
  --up: #28c3a3;
  --down: #ed6579;
}
body {
  background: var(--bg);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:disabled:hover {
  color: inherit;
  border-color: var(--line);
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
select,
textarea {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0e151e;
  color: #d7e0ec;
  padding: 10px 12px;
  max-width: 100%;
}
select {
  cursor: pointer;
}
textarea {
  resize: vertical;
}
input {
  background: #0d141e;
}
label small {
  color: var(--muted);
  font-size: 10px;
}
.up {
  color: var(--up) !important;
}
.down {
  color: var(--down) !important;
}
.primary {
  color: #111b16;
}
.demo-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.8px;
  padding: 5px 7px;
  border: 1px solid #52613d;
  border-radius: 4px;
  color: #c0d49c;
  background: #a5c5740b;
  white-space: nowrap;
}
.exchange-header {
  height: 72px;
  padding: 0 25px;
  gap: 22px;
  background: #111923;
}
.exchange-header .brand {
  font-size: 27px;
  letter-spacing: -1.4px;
}
.exchange-header nav {
  height: 100%;
  align-items: center;
  gap: 4px;
}
.exchange-header nav button {
  height: 100%;
  border-radius: 0;
  font-size: 12px;
  padding: 0 15px;
}
.exchange-header nav button.active {
  border-bottom: 2px solid var(--accent);
}
.exchange-header .header-actions {
  margin-left: auto;
  gap: 12px;
}
.exchange-header .primary {
  margin: 0;
  font-size: 11px;
}
.exchange-header .account-chip {
  font-size: 10px;
  padding: 8px;
}
.account-chip span {
  margin-left: 10px;
}
.exchange-header #logout {
  font-size: 10px;
}
.market-tape {
  height: 39px;
  display: flex;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  background: #0c131d;
  scrollbar-width: none;
}
.market-tape button {
  flex-shrink: 0;
  white-space: nowrap;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 0 21px;
  font-size: 10px;
  color: #b1bece;
}
.market-tape b {
  margin-right: 9px;
  font-size: 10px;
  color: #e2e8ef;
}
.market-tape span {
  margin-left: 8px;
}
.terminal {
  display: grid;
  grid-template-columns: 230px minmax(450px, 1fr) 285px;
  min-height: calc(100vh - 151px);
  max-width: 2200px;
  margin: auto;
}
.terminal aside {
  background: #111923;
  padding: 20px 18px;
  border: 0;
  border-left: 1px solid var(--line);
}
.watchlist {
  border-right: 1px solid var(--line);
  background: #0e151e;
  padding: 20px 0 0;
  display: flex;
  flex-direction: column;
}
.watchlist > .section-heading,
.watchlist > input {
  margin: 0 16px 15px;
}
.watchlist h2 {
  font-size: 14px;
}
.watchlist > input {
  font-size: 11px;
  min-width: 0;
  width: calc(100% - 32px);
}
.asset-filters {
  display: flex;
  gap: 2px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.asset-filters button {
  border: 0;
  border-radius: 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  padding: 12px 14px;
}
.asset-filters .active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}
.watchlist .asset-filters {
  padding: 0 10px;
  flex-wrap: wrap;
}
.watchlist .asset-filters button {
  padding: 8px;
  font-size: 10px;
}
.watch-head {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  padding: 15px 16px 10px;
}
.watch-row {
  border: 0;
  border-bottom: 1px solid #1b2633;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  width: 100%;
  border-radius: 0;
  padding: 14px 16px;
  text-align: left;
}
.watch-row div:last-child {
  text-align: right;
}
.watch-row b {
  font-size: 11px;
  font-weight: 500;
}
.watch-row small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 5px;
}
.watch-row.selected {
  background: #1b2a3b;
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}
.watch-foot {
  padding: 20px 16px;
  font-size: 10px;
  line-height: 1.8;
  color: #56687e;
  margin-top: auto;
}
.terminal-center {
  min-width: 0;
}
.instrument {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 91px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.instrument .coin {
  width: 35px;
  height: 35px;
  background: #744d17;
  color: #ffcb6c;
}
.instrument h1 {
  font-size: 17px;
  letter-spacing: 0;
  margin: 0 0 5px;
}
.instrument h1 small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 8px;
}
.instrument .muted {
  font-size: 10px;
}
.current-price {
  margin: 0 10px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.current-price strong {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.5px;
}
.current-price span {
  font-size: 10px;
}
.instrument-stat {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  white-space: nowrap;
  font-size: 10px;
}
.instrument-stat span {
  color: var(--muted);
  font-size: 9px;
}
.instrument-stat b {
  font-size: 11px;
  font-weight: 400;
}
.kline {
  background: #0c131c;
  border-bottom: 1px solid var(--line);
}
.kline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1b2633;
  padding: 7px 12px;
  gap: 12px;
}
.kline-toolbar > div {
  display: flex;
  gap: 3px;
}
.kline-toolbar button {
  padding: 5px 8px;
  font-size: 10px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
}
.kline-toolbar button.active {
  background: #253349;
  color: var(--accent);
}
.ohlc {
  height: 37px;
  padding: 13px 18px 4px;
  display: flex;
  gap: 14px;
  color: #7a8da3;
  font-size: 9px;
  font-family: monospace;
  white-space: nowrap;
  overflow: auto;
}
.ohlc b {
  color: #d1dce8;
  font-weight: 400;
}
.canvas-wrap {
  height: 390px;
  width: 100%;
  padding: 0 9px;
}
.canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.chart-help {
  height: 29px;
  padding: 5px 18px;
  font-size: 9px;
  color: #687d95;
}
.terminal-orders {
  padding: 0 14px;
  min-height: 230px;
  background: #101822;
}
.terminal-orders .tabs {
  margin: 0;
  gap: 12px;
}
.terminal-orders .tabs button {
  font-size: 11px;
  padding: 16px 8px;
}
.terminal-orders th {
  font-size: 9px;
  padding: 15px 8px;
}
.terminal-orders td {
  font-size: 10px;
  padding: 14px 8px;
}
.terminal-orders td button {
  font-size: 10px;
  padding: 5px 10px;
}
.terminal-orders .empty {
  padding: 25px;
}
.terminal-orders .empty p {
  font-size: 11px;
  margin: 10px;
}
.order-panel > .section-heading h2 {
  font-size: 14px;
}
.direction-tabs {
  display: flex;
  gap: 6px;
  margin: 23px 0 19px;
}
.terminal .order-panel button {
  width: auto;
  margin: 0;
  font-size: 11px;
  justify-content: center;
  display: inline-block;
}
.direction-tabs button {
  flex: 1;
  border: 1px solid var(--line) !important;
  padding: 10px 4px !important;
  color: var(--muted);
}
.direction-tabs .buy-active {
  background: #143a32;
  color: var(--up);
  border-color: #276458 !important;
}
.direction-tabs .sell-active {
  background: #3c222d;
  color: var(--down);
  border-color: #70404d !important;
}
.order-panel label {
  margin: 18px 0;
  font-size: 10px;
  color: #91a0b2;
  gap: 8px;
}
.order-panel input,
.order-panel select {
  width: 100%;
  font-size: 12px;
  color: #e0e6ee;
  padding: 12px;
}
.input-unit {
  position: relative;
}
.input-unit input {
  padding-right: 60px;
}
.input-unit span {
  position: absolute;
  right: 12px;
  top: 15px;
  font-size: 10px;
}
.order-summary {
  margin: 28px 0 22px;
  font-size: 10px;
}
.order-summary > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 8px;
}
.order-summary span {
  color: var(--muted);
}
.order-summary b {
  font-weight: 400;
}
.terminal .order-panel .submit-order {
  width: 100%;
  padding: 14px;
  background: var(--up);
  color: #062c23;
  border: 0;
  font-weight: 600;
  font-size: 12px;
}
.terminal .order-panel .submit-order.sell {
  background: var(--down);
  color: #3a0d17;
}
.execution-note {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 23px;
}
.execution-note b {
  font-size: 11px;
  font-weight: 400;
}
.execution-note p {
  font-size: 10px;
  line-height: 1.9;
}
.security-note {
  font-size: 9px;
  color: #71869d;
  margin-top: 24px;
  border: 1px solid var(--line);
  padding: 12px 10px;
  border-radius: 6px;
}
.exchange-footer {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 13px 24px;
  font-size: 9px;
  background: #0c131c;
}
.exchange-footer > span:first-child {
  color: #799d8e;
}
.exchange-footer a {
  margin-left: 20px;
  color: #a0b3cb;
}
.site-main {
  max-width: 1400px;
  padding: 35px 40px;
  min-height: 75vh;
}
.landing-hero {
  position: relative;
  overflow: hidden;
  padding: 60px 35px 35px;
  border-radius: 15px;
  background: radial-gradient(ellipse at 80% 60%, #243d50, transparent 60%), #121e2a;
  margin: 0 0 35px;
  border: 1px solid #2b4256;
}
.landing-hero h1 {
  font-size: 58px;
  line-height: 1.3;
  white-space: pre-line;
  font-weight: 500;
  margin: 23px 0;
  position: relative;
  z-index: 1;
}
.landing-hero p {
  white-space: pre-line;
  position: relative;
  z-index: 1;
  font-size: 14px;
}
.hero-grid-orb {
  position: absolute;
  right: 60px;
  top: -30px;
  font-size: 400px;
  line-height: 1;
  color: #6aaebf50;
  transform: rotate(-20deg);
  text-shadow: 30px 10px 0 #66b4c31a;
}
.landing-hero > .primary {
  position: relative;
  z-index: 1;
  padding: 15px 28px;
}
.hero-features {
  display: flex;
  gap: 50px;
  margin-top: 60px;
  font-size: 10px;
  letter-spacing: 1px;
  color: #9aaec1;
}
.news-grid,
.offering-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.news-grid article {
  padding: 22px;
  background: #0d151f;
  border-radius: 7px;
}
.news-grid h2 {
  font-size: 17px;
  line-height: 1.7;
  margin-top: 18px;
}
.offering h2 {
  margin-top: 25px;
  font-size: 23px;
}
.offering dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  font-size: 11px;
  margin-top: 30px;
}
.offering dt {
  color: var(--muted);
}
.offering dd {
  margin: 0;
  text-align: right;
}
.maintenance {
  padding: 12px;
  text-align: center;
  color: #f0c879;
  background: #594314;
  font-size: 12px;
}
.site-main > .panel,
.site-main .panel {
  background: var(--panel);
}
.admin-app .admin-shell {
  grid-template-columns: 240px 1fr;
}
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 25px 14px;
  background: #101822;
}
.admin-sidebar .brand {
  margin-bottom: 30px;
}
.admin-sidebar button {
  font-size: 12px;
  gap: 13px;
  border-radius: 6px;
  margin: 3px 0;
  padding: 11px;
  color: #8b9cb2;
}
.admin-sidebar button.active {
  background: #243b40;
  color: var(--accent);
}
.admin-sidebar .workspace-label {
  margin: 30px 10px 12px;
  font-size: 9px;
}
.admin-sidebar .group-btn small {
  margin-left: auto;
}
.admin-sidebar .group-btn.open {
  color: #dce6ef;
}
.admin-sidebar .submenu {
  margin: 3px 0 12px 22px;
  padding-left: 12px;
  border-left: 1px solid #2a384b;
}
.admin-sidebar .submenu button {
  font-size: 11px;
  padding: 9px 10px;
}
.admin-sidebar .sidebar-bottom {
  margin: 28px 10px 10px;
}
.admin-app .admin-body header {
  background: #111923;
  height: 72px;
  padding: 0 32px;
}
.admin-app .admin-body header button {
  font-size: 10px;
}
.admin-app .admin-body main {
  max-width: 1900px;
  padding: 30px 32px;
}
.admin-app .panel {
  background: #121b26;
}
.admin-app .stats h2 {
  font-size: 31px;
}
.admin-app .stats .panel {
  border-radius: 9px;
}
.review-link {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding: 16px;
  background: #0e1620;
  font-size: 12px;
}
.table-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.table-tools > input:first-child {
  width: 280px;
}
.table-tools input,
.table-tools select,
.table-tools button {
  font-size: 11px;
  min-width: 0;
}
.table-tools input[type='date'] {
  width: 140px;
  padding: 9px;
}
.table-tools .primary {
  margin: 0;
}
.tool-spacer {
  flex: 1;
}
.record-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  font-size: 10px;
  color: var(--muted);
  padding: 22px 0 13px;
}
.record-stats b {
  margin-left: 8px;
  color: #dbe5ed;
}
.admin-table-panel {
  padding: 22px;
}
.admin-table-panel table td {
  font-size: 11px;
  max-width: 300px;
  text-overflow: ellipsis;
  overflow: hidden;
}
.admin-table-panel table th {
  font-size: 10px;
  background: #0e1721;
}
.sticky-actions {
  position: sticky;
  right: 0;
  background: #141e2b;
  box-shadow: -8px 0 14px #0002;
  min-width: 135px;
  max-width: 300px !important;
}
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 280px;
  white-space: normal;
}
.row-actions button {
  font-size: 10px;
  padding: 5px 9px;
  white-space: nowrap;
}
.status-cell {
  color: #c4d4ad;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 20px;
  font-size: 11px;
  color: var(--muted);
}
.pagination button {
  padding: 6px 12px;
}
.admin-dialog {
  width: 900px;
  max-width: 95vw;
  padding: 25px;
  background: #141f2c;
  border-color: #36465b;
  max-height: 92vh;
}
.admin-dialog .section-heading {
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.dialog-scroll {
  max-height: 65vh;
  overflow: auto;
  padding-right: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 25px;
}
.form-grid label {
  margin: 15px 0;
  font-size: 11px;
  min-width: 0;
}
.form-grid .wide,
.form-grid fieldset {
  grid-column: 1/-1;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  font-size: 12px;
}
.form-grid .check input {
  width: auto;
}
.dialog-footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 0;
  font-size: 12px;
}
.detail-grid dt,
.detail-grid dd {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  margin: 0;
  word-break: break-word;
  white-space: pre-wrap;
}
.detail-grid dt {
  color: var(--muted);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 18px 0;
  padding: 16px;
  font-size: 11px;
}
legend {
  padding: 0 7px;
  color: var(--muted);
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.permission-grid > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.permission-grid strong {
  font-size: 11px;
}
.permission-grid label {
  margin: 9px 0;
  font-size: 10px;
}
.visual-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 24px;
}
.visual-grid .panel {
  min-width: 0;
}
.visual-grid label {
  font-size: 11px;
}
.layout-editor {
  margin-bottom: 25px;
}
.layout-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #0e1620;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 12px;
  margin: 8px 0;
}
.layout-row label {
  margin-right: auto;
  font-size: 11px;
}
.layout-row button {
  padding: 5px 10px;
}
.visual-preview iframe {
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
  height: 740px;
  margin: 25px auto 0;
  display: block;
  background: #0b1018;
}
.visual-preview iframe.mobile-preview {
  width: 375px;
  max-width: 100%;
  height: 740px;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1250px;
  padding: 50px;
}
.login-brand {
  position: relative;
  overflow: hidden;
  align-self: stretch;
  padding: 35px 20px;
}
.login-brand .eyebrow {
  margin-top: 110px;
}
.login-brand h1 {
  font-size: 54px;
  line-height: 1.5;
  font-weight: 500;
}
.login-brand p {
  font-size: 13px;
}
.login-geometry {
  position: absolute;
  font-size: 320px;
  opacity: 0.12;
  right: -60px;
  bottom: 10px;
  color: var(--accent);
  transform: rotate(-20deg);
}
.login-card {
  padding: 40px;
  max-width: 480px;
  background: #141f2c;
}
.login-card h2 {
  margin-top: 23px;
  font-size: 21px;
}
.login-card label {
  font-size: 11px;
}
.login-card .primary {
  width: 100%;
  padding: 14px;
}
.login-card > a {
  font-size: 11px;
  color: var(--muted);
}
.login-card p {
  font-size: 11px;
  line-height: 1.9;
}
.login-screen .panel {
  margin: 0;
}
#modal label {
  font-size: 12px;
}
#modal button.primary {
  width: 100%;
  padding: 12px;
}
#modal select {
  width: 100%;
}
#modal p {
  font-size: 11px;
}
#modal form > p.down {
  min-height: 0;
}
.toast {
  z-index: 9999;
}
body:has(dialog[open]) {
  overflow: hidden;
}
@media (min-width: 1650px) {
  .terminal {
    grid-template-columns: 260px minmax(450px, 1fr) 320px;
  }
  .canvas-wrap {
    height: 470px;
  }
  .watch-row {
    padding: 18px 20px;
  }
  .instrument {
    height: 105px;
  }
  .terminal aside {
    padding: 25px;
  }
  .terminal-orders {
    min-height: 260px;
  }
}
@media (max-width: 1200px) {
  .terminal {
    grid-template-columns: 190px minmax(350px, 1fr) 260px;
  }
  .exchange-header {
    padding: 0 16px;
    gap: 10px;
  }
  .exchange-header nav button {
    padding: 0 9px;
    font-size: 11px;
  }
  .exchange-header .demo-badge {
    display: none;
  }
  .exchange-header .account-chip {
    max-width: 130px;
    overflow: hidden;
    white-space: nowrap;
  }
  .instrument-stat {
    display: none;
  }
  .watch-row {
    padding: 14px 12px;
  }
  .current-price {
    margin-left: auto;
  }
  .instrument h1 small {
    display: block;
    margin: 5px 0;
  }
  .visual-grid {
    grid-template-columns: 300px 1fr;
  }
  .admin-app .admin-shell {
    grid-template-columns: 205px 1fr;
  }
  .admin-app .admin-body main {
    padding: 25px 20px;
  }
}
@media (max-width: 950px) {
  .terminal {
    grid-template-columns: 1fr 260px;
  }
  .watchlist {
    grid-column: 1/-1;
    padding: 0;
    border-bottom: 1px solid var(--line);
  }
  .watchlist > .section-heading,
  .watchlist > input,
  .watchlist .asset-filters,
  .watch-head,
  .watch-foot {
    display: none;
  }
  #watch-rows {
    display: flex;
    overflow: auto;
  }
  .watch-row {
    min-width: 160px;
    gap: 12px;
    border-right: 1px solid var(--line);
    padding: 12px;
  }
  .watch-row.selected {
    border-left: 0;
    border-bottom: 2px solid var(--accent);
    padding: 12px;
  }
  .exchange-header {
    height: auto;
    min-height: 65px;
    flex-wrap: wrap;
    padding: 14px 20px 0;
  }
  .exchange-header nav {
    order: 3;
    width: 100%;
    height: 43px;
    justify-content: center;
  }
  .exchange-header nav button {
    height: 43px;
  }
  .exchange-header .header-actions {
    gap: 10px;
  }
  .exchange-header #language {
    font-size: 11px;
  }
  .canvas-wrap {
    height: 350px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-grid,
  .offering-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .visual-grid {
    grid-template-columns: 1fr;
  }
  .visual-preview iframe {
    height: 600px;
  }
  .login-screen {
    gap: 30px;
    padding: 25px;
  }
  .login-brand h1 {
    font-size: 42px;
  }
  .hero-grid-orb {
    right: -50px;
    opacity: 0.5;
  }
}
@media (max-width: 650px) {
  .terminal {
    display: flex;
    flex-direction: column;
  }
  .terminal .order-panel {
    border: 0;
    border-top: 1px solid var(--line);
    padding: 22px;
  }
  .terminal .order-panel form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 15px;
  }
  .terminal .order-panel form .order-summary,
  .terminal .order-panel form .submit-order,
  .terminal .order-panel form #order-error {
    grid-column: 1/-1;
  }
  .terminal .order-panel .order-summary {
    margin-top: 10px;
  }
  .terminal .order-panel label {
    margin: 10px 0;
  }
  .terminal .order-panel .execution-note,
  .terminal .order-panel .security-note {
    display: none;
  }
  .terminal .order-panel .section-heading {
    margin-bottom: 12px;
  }
  .direction-tabs {
    margin: 15px 0;
  }
  .order-panel > .section-heading h2 {
    font-size: 16px;
  }
  .terminal-center {
    width: 100%;
  }
  .instrument {
    padding: 15px;
    min-height: 85px;
  }
  .instrument h1 {
    font-size: 17px;
  }
  .current-price strong {
    font-size: 22px;
  }
  .canvas-wrap {
    height: 330px;
    padding: 0 3px;
  }
  .kline-toolbar {
    padding: 7px 5px;
    gap: 5px;
  }
  .kline-toolbar button {
    padding: 5px 6px;
    font-size: 10px;
  }
  .ohlc {
    gap: 9px;
    padding-left: 12px;
    height: 36px;
    font-size: 8px;
  }
  .ohlc > span:first-child {
    display: none;
  }
  .chart-help {
    font-size: 8px;
  }
  .terminal-orders {
    min-height: 220px;
    padding: 0 10px;
  }
  .terminal-orders .tabs {
    gap: 4px;
  }
  .terminal-orders .tabs button {
    font-size: 10px;
    padding: 14px 8px;
  }
  .exchange-header {
    padding: 14px 12px 0;
  }
  .exchange-header .brand {
    font-size: 25px;
  }
  .exchange-header .account-chip {
    font-size: 9px;
    max-width: 90px;
  }
  .account-chip span {
    display: none;
  }
  .exchange-header #logout {
    font-size: 9px;
    padding: 6px;
  }
  .exchange-header nav {
    justify-content: space-between;
  }
  .exchange-header nav button {
    font-size: 11px;
    padding: 0 7px;
  }
  .exchange-header .header-actions {
    gap: 7px;
  }
  .market-tape {
    height: 35px;
  }
  .market-tape button {
    font-size: 9px;
    padding: 0 14px;
  }
  .exchange-footer {
    gap: 8px;
    padding: 14px;
    font-size: 8px;
  }
  .exchange-footer a {
    margin-left: 10px;
  }
  .site-main {
    padding: 24px 15px;
  }
  .landing-hero {
    padding: 35px 23px;
  }
  .landing-hero h1 {
    font-size: 35px;
  }
  .landing-hero p {
    font-size: 12px;
  }
  .hero-grid-orb {
    font-size: 250px;
    right: -65px;
    top: 20px;
    opacity: 0.4;
  }
  .hero-features {
    gap: 18px;
    font-size: 8px;
    margin-top: 40px;
  }
  .news-grid,
  .offering-grid {
    grid-template-columns: 1fr;
  }
  .site-main .page-heading {
    flex-wrap: wrap;
  }
  .site-main .page-heading h1 {
    font-size: 26px;
  }
  .site-main .page-heading input {
    width: 100%;
  }
  .site-main .stats {
    grid-template-columns: 1fr 1fr;
  }
  .admin-app .admin-shell {
    display: block;
  }
  .admin-sidebar {
    position: static;
    width: 100%;
    height: auto;
    display: block;
    padding: 12px 14px;
    overflow: visible;
    border-bottom: 1px solid var(--line);
  }
  .admin-sidebar .brand,
  .admin-sidebar .workspace-label,
  .admin-sidebar .sidebar-bottom {
    display: none;
  }
  .admin-sidebar > button {
    display: inline-flex;
    width: auto;
    min-width: 0;
    gap: 5px;
    padding: 8px;
    font-size: 10px;
    margin: 1px;
  }
  .admin-sidebar > button span {
    font-size: 12px;
    width: auto;
  }
  .admin-sidebar > button small {
    display: none;
  }
  .admin-sidebar .submenu {
    display: flex;
    flex-wrap: wrap;
    margin: 4px 0 8px;
    padding: 5px 0;
    border: 0;
  }
  .admin-sidebar .submenu button {
    width: auto;
    min-width: 0;
    padding: 7px 10px;
    font-size: 10px;
  }
  .admin-sidebar .group-btn i {
    margin: 0;
    font-size: 8px;
    padding: 1px 4px;
  }
  .admin-app .admin-body header {
    padding: 0 14px;
    height: 60px;
  }
  .admin-app .admin-body header > .muted {
    font-size: 9px;
  }
  .admin-app .admin-body .header-actions {
    gap: 7px;
  }
  .admin-app .admin-body header button {
    font-size: 9px;
    padding: 6px;
  }
  .admin-app .admin-body .avatar {
    display: none;
  }
  .admin-app .admin-body main {
    padding: 22px 13px;
  }
  .admin-app .admin-body h1 {
    font-size: 25px;
  }
  .admin-app .stats h2 {
    font-size: 25px;
  }
  .admin-app .stats .panel {
    padding: 17px;
  }
  .admin-app .stats small {
    font-size: 9px;
  }
  .table-tools {
    gap: 7px;
  }
  .table-tools > input:first-child {
    width: 100%;
  }
  .table-tools input[type='date'] {
    width: 125px;
  }
  .table-tools select {
    flex: 1;
  }
  .tool-spacer {
    display: none;
  }
  .record-stats {
    gap: 12px;
  }
  .record-stats > span:last-child {
    font-size: 9px;
  }
  .sticky-actions {
    min-width: 100px;
    max-width: 170px !important;
  }
  .row-actions {
    max-width: 150px;
  }
  .row-actions button {
    font-size: 9px;
    padding: 5px 7px;
  }
  .admin-table-panel {
    padding: 14px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .permission-grid {
    grid-template-columns: 1fr 1fr;
  }
  .detail-grid {
    grid-template-columns: 115px 1fr;
    font-size: 10px;
  }
  .dialog-scroll {
    max-height: 62vh;
  }
  .visual-grid {
    display: block;
  }
  .visual-preview iframe {
    height: 540px;
  }
  .login-screen {
    display: block;
    padding: 45px 22px;
    min-height: 100vh;
  }
  .login-brand {
    padding: 0 0 25px;
  }
  .login-brand .eyebrow {
    margin-top: 20px;
  }
  .login-brand h1,
  .login-brand p,
  .login-geometry {
    display: none;
  }
  .login-card {
    padding: 27px;
    max-width: none;
  }
  .login-card h2 {
    font-size: 18px;
  }
  .admin-dialog {
    padding: 20px;
  }
}
:root .report-controls {
  display: flex;
  align-items: center;
  gap: 25px;
  margin: -5px 0 22px;
  color: var(--muted);
  font-size: 11px;
}
.report-controls label {
  flex-direction: row;
  align-items: center;
  margin: 0;
  font-size: 11px;
}
.report-controls select {
  min-width: 100px;
}
.currency-cards,
.account-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 25px;
}
.currency-cards article,
.payout-card {
  background: #0c141e;
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.currency-cards article > span {
  color: var(--accent);
  font-size: 12px;
}
.currency-cards h2 {
  margin: 15px 0;
  font-size: 28px;
}
.currency-cards small {
  color: var(--muted);
  font-size: 10px;
}
.payout-card {
  font-size: 12px;
}
.payout-card p {
  font-size: 11px;
}
.totp-secret {
  display: block;
  background: #0b131f;
  border: 1px solid var(--line);
  padding: 20px;
  overflow-wrap: anywhere;
  color: var(--accent);
  font-size: 18px;
  letter-spacing: 2px;
}
@media (max-width: 650px) {
  .currency-cards,
  .account-grid {
    grid-template-columns: 1fr;
  }
  .report-controls {
    flex-wrap: wrap;
    gap: 12px;
  }
  .currency-cards h2 {
    font-size: 24px;
  }
  .account-chip {
    max-width: 100px;
  }
}
.document-preview {
  width: 100%;
  height: 240px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 12px;
  background: #0d141e;
}
/* Administration forms: identity verification, nested accounts and permission tree. */
.permission-editor {
  min-width: 0;
  border: 1px solid var(--line, #29364a);
  padding: 16px;
  border-radius: 10px;
}
.permission-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.permission-toolbar label,
.permission-node summary label,
.permission-leaf {
  display: flex;
  align-items: center;
  gap: 9px;
}
.permission-tree {
  max-height: 460px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line, #29364a);
  border-radius: 6px;
}
.permission-node {
  padding: 3px 0;
}
.permission-node summary {
  cursor: pointer;
  display: list-item;
  list-style-position: outside;
  margin-left: 18px;
}
.permission-node summary label {
  display: inline-flex;
  margin: 4px 0;
}
.permission-children {
  margin-left: 21px;
  padding-left: 13px;
  border-left: 1px solid var(--line, #29364a);
}
.permission-leaf {
  margin: 8px 0;
  font-weight: 400;
}
.permission-tree input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  flex: none;
}
.permission-tree .permission-node .permission-node {
  margin-top: 4px;
}
.identity-documents {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.identity-documents article {
  min-width: 0;
  border: 1px solid var(--line, #29364a);
  padding: 12px;
  border-radius: 10px;
}
.identity-preview {
  display: block;
  width: 100%;
  height: 260px;
  background: #fff;
  border: 0;
  margin: 10px 0;
}
.kyc-review {
  border-bottom: 1px solid var(--line, #29364a);
  padding-bottom: 18px;
  margin-bottom: 20px;
}
.kyc-review dd {
  white-space: normal;
  overflow-wrap: anywhere;
  user-select: text;
}
.upload-preview {
  max-width: 180px;
  max-height: 120px;
  object-fit: contain;
  margin: 12px 0;
  background: #fff;
  border-radius: 8px;
}
.user-accounts {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}
.api-settings {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--line, #29364a);
}
[hidden] {
  display: none !important;
}
.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  vertical-align: middle;
}
.trading-app {
  font-size: var(--editor-font-size, 14px);
}
.trading-app .panel,
.trading-app button,
.trading-app input,
.trading-app select,
.trading-app textarea {
  border-radius: var(--editor-radius, 12px);
}
.trading-app .site-main {
  max-width: var(--editor-width, 1440px);
}
.hero-custom-image {
  position: absolute;
  right: 4%;
  top: 10%;
  height: 80%;
  max-width: 40%;
  object-fit: contain;
  opacity: 0.85;
  pointer-events: none;
}
.site-login-gate {
  max-width: 460px;
  margin: 15vh auto;
  padding: 40px;
  text-align: center;
}
.site-login-gate button {
  margin-top: 16px;
}
.landing-hero h1,
.landing-hero p {
  white-space: pre-line;
}
.landing-hero h1,
.landing-hero p,
.landing-hero button {
  position: relative;
  z-index: 1;
}
@media (max-width: 850px) {
  .identity-documents {
    grid-template-columns: 1fr;
  }
  .identity-preview {
    height: 300px;
  }
  .hero-custom-image {
    opacity: 0.2;
    max-width: 65%;
  }
  .permission-toolbar {
    gap: 8px;
  }
}
/* Dense permissions: override global column labels and full-width inputs. */
.admin-dialog.role-dialog {
  width: 1280px;
  max-width: 96vw;
}
.role-dialog .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 20px;
}
.role-dialog .form-grid > label {
  margin: 8px 0;
}
.role-dialog .permission-editor {
  grid-column: 1/-1;
  margin: 8px 0;
  padding: 12px;
}
.admin-dialog .permission-toolbar label,
.admin-dialog .permission-node summary label,
.admin-dialog .permission-leaf {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 7px !important;
  margin: 4px 0 !important;
  text-align: left;
  line-height: 1.4;
}
.admin-dialog .permission-tree input,
.admin-dialog .permission-toolbar input {
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
  flex: 0 0 15px;
}
.role-dialog .permission-tree {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-height: 53vh;
  align-items: start;
  padding: 10px;
}
.role-dialog .permission-tree > .permission-node {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
}
.role-dialog .permission-children {
  margin-left: 7px;
  padding-left: 9px;
}
.role-dialog .permission-leaf {
  margin-right: 12px !important;
  min-width: 72px;
}
.role-dialog .permission-toolbar {
  margin-bottom: 6px;
}
.role-dialog .permission-node summary {
  margin-left: 12px;
}
.user-balances,
.multi-balance {
  font-size: 16px !important;
  line-height: 1.7;
  white-space: normal;
}
.account-chip {
  max-width: 350px;
  white-space: normal;
  text-align: right;
}
.document-tools {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.document-tools button {
  padding: 5px 9px;
}
.document-viewport {
  height: 280px;
  overflow: auto;
  background: #0a1018;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: grab;
  position: relative;
}
.document-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 0.12s;
  flex: none;
}
.document-pdf {
  height: 100%;
  width: 100%;
  border: 0;
  flex: none;
}
.document-expanded {
  grid-column: 1/-1;
}
.document-expanded .document-viewport {
  height: 65vh;
}
.document-replace {
  font-size: 11px;
  margin: 10px 0;
}
.modular-editor {
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.design-controls {
  max-height: calc(100vh - 150px);
  overflow: auto;
  padding: 18px;
  position: sticky;
  top: 90px;
}
.design-controls details {
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.design-controls summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 10px;
}
.design-controls label {
  margin: 9px 0;
  font-size: 11px;
}
.design-page-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
}
.design-controls .form-grid {
  gap: 8px;
}
.design-controls input,
.design-controls select,
.design-controls textarea {
  width: 100%;
  min-width: 0;
  font-size: 11px;
}
.design-controls .check {
  flex-direction: row;
  align-items: center;
}
.design-controls input[type='checkbox'] {
  width: 15px;
  flex: none;
}
.design-block-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  margin-bottom: 6px;
  border-radius: 6px;
}
.design-block-row label {
  flex: 1;
  margin: 0;
}
.design-block-row button {
  font-size: 10px;
  padding: 5px 7px;
}
.design-block-row.active {
  border-color: var(--accent);
}
.design-copy-row span {
  font-size: 10px;
  color: var(--muted);
  white-space: pre-line;
}
.design-canvas {
  padding: 14px;
  min-width: 0;
  position: sticky;
  top: 90px;
}
.design-canvas iframe {
  width: 100%;
  height: calc(100vh - 205px);
  min-height: 570px;
  border: 1px solid var(--line);
  background: #0c131c;
}
.design-canvas iframe.mobile-preview {
  width: 390px;
  max-width: 100%;
  display: block;
  margin: auto;
}
.design-preview [data-ui-block]:hover {
  outline: 1px dashed var(--accent);
  outline-offset: -2px;
}
.design-preview [data-ui-label]:hover {
  outline: 1px solid var(--accent);
  cursor: text;
}
.design-preview [data-ui-image]:hover {
  outline: 2px solid var(--accent);
  cursor: pointer;
}
.asset-logo {
  object-fit: contain;
}
.offering-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
}
.news-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
@media (max-width: 1100px) {
  .role-dialog .permission-tree {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .role-dialog .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .modular-editor {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  }
}
@media (max-width: 850px) {
  .role-dialog .permission-tree {
    grid-template-columns: 1fr;
  }
  .modular-editor {
    grid-template-columns: 1fr;
  }
  .design-controls,
  .design-canvas {
    position: static;
    max-height: none;
  }
  .design-canvas iframe {
    height: 650px;
  }
}

.document-viewport {
  overflow: hidden;
}
.design-canvas {
  overflow: hidden;
}
[data-ui-font='custom']
  :is(h1, h2, h3, h4, p, span, b, small, button, label, th, td, select, input) {
  font-size: inherit !important;
}
[data-ui-color='custom'] :is(h1, h2, h3, h4, p, span, b, small, button, label, th, td, a) {
  color: inherit;
}
.user-balance-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 180px;
  white-space: normal;
}
.user-balance-lines span {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.user-balance-lines b {
  font-variant-numeric: tabular-nums;
}
.design-preview-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
}
.design-canvas .design-preview-viewport iframe {
  max-width: none;
  margin: 0;
  display: block;
}
.kyc-dialog {
  width: 1120px;
  max-width: 96vw;
}
.kyc-dialog .dialog-scroll {
  padding-top: 12px;
}
.kyc-review {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}
.kyc-table-scroll {
  overflow-x: auto;
}
.kyc-info-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  white-space: normal;
}
.kyc-label-col {
  width: 12%;
}
.kyc-value-col {
  width: 21.333%;
}
.kyc-info-table th,
.kyc-info-table td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: none;
}
.kyc-info-table th {
  font-weight: 400;
  color: var(--muted);
  background: rgba(128, 145, 165, 0.035);
  font-size: 12px;
}
.kyc-info-table td {
  font-size: 12px;
}
.kyc-info-table input,
.kyc-info-table select {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 8px;
  font-size: 12px;
}
.kyc-document {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.kyc-thumb {
  position: relative;
  width: 118px;
  height: 110px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(128, 145, 165, 0.08);
}
.kyc-thumb-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.kyc-thumb-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kyc-thumb-actions {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.has-document .kyc-thumb:hover .kyc-thumb-actions,
.has-document .kyc-thumb:focus-within .kyc-thumb-actions {
  display: flex;
}
.kyc-thumb-actions button {
  pointer-events: auto;
  background: transparent;
  border: 0;
  color: white;
  padding: 5px;
  display: flex;
}
.kyc-thumb-actions button:hover {
  background: rgba(255, 255, 255, 0.2);
}
.kyc-thumb-actions button:focus-visible {
  outline: 2px solid var(--accent);
}
.kyc-document .kyc-file-label {
  position: relative;
  display: block;
  margin: 0;
  font-size: 11px;
  cursor: pointer;
  color: var(--muted);
  overflow: hidden;
}
.kyc-file-label input[type='file'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.kyc-file-label:focus-within {
  outline: 2px solid var(--accent);
}
.kyc-help {
  font-size: 11px;
  margin: 10px 0;
}
.kyc-decision-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}
.kyc-decision-grid > label {
  margin: 0;
  gap: 8px;
}
.kyc-decision-grid textarea {
  min-height: 64px;
  height: 64px;
}
.document-lightbox {
  width: 1100px;
  max-width: 94vw;
  max-height: 94vh;
  padding: 18px;
  background: var(--panel, #14202b);
  color: var(--text, #e6edf3);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.document-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.8);
}
.document-lightbox-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.document-lightbox-heading h2 {
  margin: 0;
  font-size: 16px;
}
.document-lightbox .document-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
}
.document-lightbox .document-tools button {
  min-width: 38px;
  height: 34px;
}
.document-lightbox output {
  min-width: 50px;
  font-size: 12px;
}
.document-lightbox .document-tools a {
  margin-left: auto;
  font-size: 12px;
}
.document-lightbox .document-viewport {
  height: 65vh;
  max-height: calc(94vh - 150px);
  background: #090e14;
  border-radius: 6px;
}
.document-lightbox .document-image {
  user-select: none;
  -webkit-user-drag: none;
}
.document-lightbox [hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  .kyc-info-table {
    min-width: 780px;
  }
  .kyc-decision-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .document-lightbox {
    padding: 10px;
  }
  .document-lightbox .document-tools {
    gap: 4px;
    flex-wrap: wrap;
  }
}
@media (hover: none) {
  .has-document .kyc-thumb-actions {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
  }
}
.kyc-info-table tbody tr:last-child td,
.kyc-info-table tbody tr:last-child th {
  border-bottom: 1px solid var(--line);
}
.has-document .kyc-thumb-actions {
  display: flex;
  opacity: 0;
  transition: opacity 0.15s;
}
.has-document .kyc-thumb:hover .kyc-thumb-actions,
.has-document .kyc-thumb:focus-within .kyc-thumb-actions {
  opacity: 1;
}
@media (hover: none) {
  .has-document .kyc-thumb-actions {
    opacity: 1;
  }
}
.kyc-info-table tbody tr:last-child td,
.kyc-info-table tbody tr:last-child th {
  border: 1px solid var(--line);
}
.details-dialog {
  width: 1160px;
  max-width: 96vw;
}
.details-scroll {
  overflow-x: auto;
}
.record-details-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  white-space: normal;
}
.detail-label-col {
  width: 12%;
}
.detail-value-col {
  width: 21.333%;
}
.record-details-table th,
.record-details-table td,
.record-details-table tbody tr:last-child td,
.record-details-table tbody tr:last-child th {
  border: 1px solid var(--line);
  padding: 11px 10px;
  vertical-align: middle;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 12px;
  max-width: none;
}
.record-details-table th {
  font-weight: 400;
  color: var(--muted);
  background: rgba(128, 145, 165, 0.04);
}
.detail-nested-table {
  width: 100%;
  table-layout: auto;
}
.detail-nested-table th,
.detail-nested-table td {
  padding: 5px;
  font-size: 11px;
}
.user-funds-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin: 18px 0;
}
.user-funds-tabs button {
  border: 0;
  border-radius: 0;
  padding: 12px 0;
  font-size: 13px;
  color: var(--muted);
}
.user-funds-tabs button[aria-selected='true'] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}
.user-currency-account {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.user-currency-account h3 {
  font-size: 13px;
  margin: 0;
  padding: 14px 16px;
  background: rgba(128, 145, 165, 0.04);
}
.user-balance-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}
.user-balance-table th,
.user-balance-table td,
.user-balance-table tr:last-child td {
  width: 33.333%;
  text-align: center;
  border: 1px solid var(--line);
  padding: 15px 8px;
}
.user-balance-table th {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
.user-balance-table td {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.user-currency-account > p {
  font-size: 11px;
  margin: 0;
  padding: 10px 16px;
}
.user-currency-account[hidden],
.funds-empty[hidden] {
  display: none;
}
.user-accounts .record-details-table {
  min-width: 650px;
}
@media (max-width: 700px) {
  .record-details-table {
    min-width: 800px;
  }
  .user-balance-table td {
    font-size: 14px;
  }
  .user-funds-tabs {
    gap: 14px;
  }
}
.user-detail-extra {
  margin-top: 18px;
}
.user-detail-extra > summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  padding: 12px 0;
}
.offering-details {
  width: 100%;
  border-collapse: collapse;
}
.offering-details th,
.offering-details td,
.offering-details tr:last-child td {
  padding: 10px;
  border: 1px solid var(--line);
  font-size: 12px;
  text-align: left;
}
.offering-details th {
  color: var(--muted);
  font-weight: 400;
}
.user-funds-list:has(> .empty:not(.funds-empty)) > .funds-empty {
  display: none;
}
.detail-status {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(128, 145, 165, 0.06);
  font-size: 11px;
}
/* Keep terminal sections independent of the shared mobile sidebar layout. */
.trading-app .terminal > *,
.trading-app .terminal-center,
.trading-app .kline,
.trading-app .terminal-orders {
  min-width: 0;
}
.trading-app .order-panel {
  display: block;
  overflow: visible;
  min-width: 0;
}
.market-product-row {
  cursor: pointer;
}
.market-product-row:hover {
  background: rgba(128, 145, 165, 0.05);
}
.market-product-link {
  color: inherit;
  min-width: 0;
}
.market-product-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.market-product-link > div {
  min-width: 0;
}
@media (min-width: 651px) and (max-width: 950px) {
  .trading-app .terminal {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .trading-app .kline-toolbar {
    flex-wrap: wrap;
  }
  .trading-app .kline-toolbar .periods {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
  }
}
@media (max-width: 650px) {
  .trading-app .terminal {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .trading-app .terminal .order-panel {
    display: block;
    flex: none;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 20px 16px;
    overflow: visible;
  }
  .trading-app .terminal .order-panel > .section-heading {
    display: flex;
    width: 100%;
    min-width: 0;
  }
  .trading-app .terminal .order-panel h2 {
    white-space: normal;
    word-break: normal;
  }
  .trading-app .terminal .order-panel form {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
  }
  .trading-app .terminal .order-panel form > * {
    min-width: 0;
  }
  .trading-app .terminal .order-panel label {
    width: 100%;
    min-width: 0;
  }
  .trading-app .terminal .order-panel input,
  .trading-app .terminal .order-panel select {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  .trading-app .terminal .order-panel .direction-tabs {
    display: flex;
    width: 100%;
    min-width: 0;
  }
  .trading-app .terminal .order-panel .direction-tabs button {
    min-width: 0;
    white-space: normal;
  }
  .trading-app .order-summary > div {
    min-width: 0;
    flex-wrap: wrap;
  }
  .trading-app .order-summary b {
    overflow-wrap: anywhere;
  }
  .trading-app .terminal .order-panel button span {
    width: auto;
    font-size: inherit;
  }
  .trading-app .terminal .order-panel .submit-order {
    min-width: 0;
    min-height: 44px;
  }
  .trading-app .terminal .instrument {
    min-width: 0;
    flex-wrap: wrap;
    gap: 10px;
  }
  .trading-app .instrument > div {
    min-width: 0;
  }
  .trading-app .instrument h1 {
    overflow-wrap: anywhere;
  }
  .trading-app .kline-toolbar {
    flex-wrap: wrap;
    min-width: 0;
    gap: 6px;
  }
  .trading-app .kline-toolbar .periods {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
  }
  .trading-app .kline-toolbar button {
    flex: none;
  }
  .trading-app .canvas-wrap {
    min-width: 0;
    max-width: 100%;
  }
  .trading-app .chart-help {
    height: auto;
    min-height: 29px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }
  .trading-app .terminal-orders > .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }
  .trading-app .terminal-orders .tabs {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
  }
  .trading-app .terminal-orders .tabs button {
    flex: none;
  }
  .trading-app #watch-rows {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  .trading-app .watch-row {
    flex-shrink: 0;
  }
  .trading-app .exchange-header {
    min-width: 0;
    max-width: 100%;
  }
  .trading-app .exchange-header nav {
    min-width: 0;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .trading-app .exchange-header nav button {
    flex: none;
  }
  .trading-app .exchange-header .header-actions {
    min-width: 0;
    gap: 5px;
  }
  .trading-app .exchange-header .brand {
    font-size: 23px;
  }
  .trading-app .exchange-footer {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .trading-app .site-main {
    width: 100%;
    min-width: 0;
  }
  .trading-app #market-rows .asset {
    gap: 8px;
  }
  .trading-app #market-rows .coin {
    width: 28px;
    height: 28px;
    flex: none;
    font-size: 13px;
  }
  .trading-app #market-rows .asset small {
    max-width: 115px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .trading-app .table-wrap:has(#market-rows) {
    overflow: visible;
  }
  .trading-app table:has(#market-rows) {
    width: 100%;
    table-layout: fixed;
    white-space: normal;
  }
  .trading-app table:has(#market-rows) th,
  .trading-app table:has(#market-rows) td {
    padding: 14px 5px;
    overflow-wrap: anywhere;
  }
  .trading-app table:has(#market-rows) :is(th, td):nth-child(1) {
    width: 46%;
  }
  .trading-app table:has(#market-rows) :is(th, td):nth-child(4) {
    width: 32%;
    text-align: right;
  }
  .trading-app table:has(#market-rows) :is(th, td):nth-child(5) {
    width: 22%;
    text-align: right;
  }
  .trading-app table:has(#market-rows) :is(th, td):nth-child(2),
  .trading-app table:has(#market-rows) :is(th, td):nth-child(3),
  .trading-app table:has(#market-rows) :is(th, td):nth-child(6) {
    display: none;
  }
  .trading-app #market-rows td:nth-child(4) small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
  }
  .trading-app .site-main .panel:has(#market-rows) {
    padding: 10px;
  }
  .trading-app .page-heading > div {
    min-width: 0;
  }
}
.mobile-trade-tab {
  display: none;
}
.trade-record-content {
  display: contents;
}
.trade-record-content[hidden] {
  display: none !important;
}
.order-panel[hidden] {
  display: none !important;
}
@media (max-width: 650px) {
  .terminal-orders .mobile-trade-tab {
    display: block;
  }
  .terminal-orders.show-trade-form .tabs [data-order-tab].active {
    color: var(--muted);
    border-bottom-color: transparent;
  }
  .terminal-orders .tabs .mobile-trade-tab.active,
  .terminal-orders .tabs .mobile-record-active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
  }
  .terminal-orders .tabs {
    gap: 0;
    scrollbar-width: thin;
  }
  .terminal-orders .tabs button {
    padding: 14px 7px;
    font-size: 10px;
  }
  .trading-app .terminal-orders .order-panel {
    padding: 16px 6px;
    border-top: 0;
  }
  .terminal-orders .order-panel > .section-heading {
    display: none !important;
  }
  .terminal-orders .order-panel .direction-tabs {
    margin: 4px 0 14px;
  }
  .trade-record-content {
    display: block;
  }
}
.admin-table-panel table td.log-description {
  min-width: 330px;
  max-width: 520px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.8;
}
.ledger-description {
  display: block;
  white-space: normal;
  min-width: 240px;
  max-width: 480px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.7;
}
.proof-upload {
  margin: 20px 0;
  min-width: 0;
}
.proof-upload > label {
  margin: 0 0 10px;
}
.proof-upload > input[type='file'] {
  width: 100%;
  max-width: 100%;
  font-size: 12px;
}
.proof-upload > small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 9px;
}
.proof-thumbnail {
  display: flex;
  width: 160px;
  height: 120px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0b131d;
  overflow: hidden;
}
.proof-upload .proof-thumbnail {
  margin-top: 12px;
}
.proof-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.proof-thumbnail span {
  font-size: 12px;
  padding: 12px;
  text-align: center;
  overflow-wrap: anywhere;
}
.proof-thumbnail[hidden],
.proof-thumbnail [hidden] {
  display: none !important;
}
.payment-panel .proof-thumbnail {
  width: 82px;
  height: 64px;
}
.payment-panel .proof-thumbnail span {
  padding: 6px;
  font-size: 10px;
}
.trading-app .support-float {
  position: fixed;
  z-index: 50;
  right: max(20px, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  width: auto;
  height: auto;
}
.support-contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  background: #fff;
  padding: 12px;
  border-radius: 23px;
  box-shadow: 0 12px 35px #13244038;
  max-height: 75vh;
  overflow-y: auto;
}
.support-contact-list[hidden] {
  display: none !important;
}
.trading-app .support-float .support-contact {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  color: white;
  box-shadow: 0 5px 12px #142b4d18;
  transition: transform 0.15s;
}
.support-float .support-contact:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.support-float .support-contact svg,
.support-float-toggle svg {
  width: 25px;
  height: 25px;
  display: block;
}
.support-contact img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.support-whatsapp {
  background: #1dcc64;
}
.support-telegram {
  background: #21a4d4;
}
.support-facebook {
  background: #1877f2;
}
.support-agent,
.support-chat {
  background: #263248;
}
.trading-app .support-float .support-float-toggle {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 21px;
  background: #316cf6;
  color: #fff;
  box-shadow: 0 10px 25px #316cf64d;
}
.support-float [aria-disabled='true'] {
  cursor: help;
}
.support-float a:focus-visible,
.support-float button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 650px) {
  .trading-app .support-float {
    right: max(10px, env(safe-area-inset-right));
    gap: 8px;
  }
  .support-contact-list {
    padding: 9px;
    gap: 8px;
    border-radius: 20px;
    max-height: 65dvh;
  }
  .trading-app .support-float .support-contact {
    width: 42px;
    height: 42px;
  }
  .trading-app .support-float .support-float-toggle {
    width: 46px;
    height: 46px;
    border-radius: 16px;
  }
  .support-float .support-contact svg,
  .support-float-toggle svg {
    width: 22px;
    height: 22px;
  }
}
.trading-app .support-contact-list {
  background: var(--support-panel-background, var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--editor-radius, 12px);
  box-shadow: 0 12px 32px #0006;
}
.trading-app .support-float .support-contact {
  background: var(
    --support-contact-background,
    color-mix(in srgb, var(--accent) 12%, var(--panel))
  );
  color: var(--accent);
  border: 1px solid var(--line);
  box-shadow: none;
}
.trading-app .support-float .support-contact:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.trading-app .support-float .support-float-toggle {
  background: var(--support-toggle-background, var(--accent));
  color: var(--support-toggle-contrast, var(--accent-contrast, #0b1018));
  border: 1px solid var(--line);
  border-radius: var(--editor-radius, 12px);
  box-shadow: 0 8px 22px #0005;
}
.support-float-toggle img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.support-design-controls > button {
  margin: 10px 0;
}
.support-design-controls .form-grid {
  gap: 12px;
}
.support-design-controls label {
  font-size: 12px;
}
.upload-thumbnail {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 120px;
  max-width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d151e;
  overflow: hidden;
}
.upload-thumbnail .upload-preview {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: 0;
  border-radius: 0;
  background: transparent;
}
.upload-file-fallback {
  font-size: 11px;
  line-height: 1.6;
  padding: 12px;
  text-align: center;
  color: var(--muted);
}
.upload-thumbnail[hidden],
.upload-thumbnail [hidden] {
  display: none !important;
}
input[type='file'][data-upload] {
  max-width: 100%;
  min-width: 0;
}
.identity-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.identity-upload-grid > label {
  min-width: 0;
  margin: 10px 0;
  font-size: 11px;
  gap: 7px;
}
.identity-upload-grid input[type='file'] {
  width: 100%;
  font-size: 10px;
  padding: 6px;
}
.identity-upload-grid .upload-thumbnail {
  width: 100%;
  height: 90px;
  margin-top: 0;
}
@media (max-width: 380px) {
  .identity-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-table-panel .payment-proof-cell {
  display: block;
  clear: both;
  margin-top: 10px;
  min-height: 64px;
}
.admin-table-panel .payment-proof-cell .proof-thumbnail,
.admin-table-panel td > .proof-thumbnail {
  position: static;
  float: none;
  display: flex;
  width: 88px;
  height: 64px;
  margin: 0;
}
.admin-table-panel td:has(.payment-proof-cell) {
  white-space: normal;
  min-width: 165px;
  vertical-align: top;
}
.payment-review .kyc-document {
  max-width: 200px;
}
.payment-review .payment-decision th {
  width: 130px;
}
.payment-review .payment-decision td {
  white-space: normal;
}
.payment-review .payment-decision label {
  max-width: 100%;
}

.client-payment-history tbody tr[data-payment-detail] {
  cursor: pointer;
}
.client-payment-history tbody tr[data-payment-detail]:hover,
.client-payment-history tbody tr[data-payment-detail]:focus-visible {
  background: var(--panel-light, #182634);
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}
.payment-history-empty[hidden] {
  display: none;
}
.client-payment-details {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.client-payment-details th,
.client-payment-details td {
  padding: 16px 12px;
  border: 1px solid var(--line);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.client-payment-details th {
  width: 110px;
  color: var(--muted);
  font-weight: 500;
}
.client-payment-details td {
  color: var(--text);
}
.payment-detail-dialog {
  width: min(660px, calc(100% - 32px));
}
.payment-currency {
  color: var(--muted);
  font-size: 11px;
}
.client-payment-history th,
.client-payment-history td {
  white-space: nowrap;
}
@media (max-width: 650px) {
  .client-payment-history .payment-desktop {
    display: none;
  }
  .client-payment-history {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }
  .client-payment-history th,
  .client-payment-history td {
    padding: 15px 8px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .client-payment-history th:first-child {
    width: 22%;
  }
  .client-payment-history th:nth-child(2) {
    width: 46%;
  }
  .client-payment-history th:nth-child(3) {
    width: 32%;
  }
  .payment-detail-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 20px 16px;
  }
  .payment-detail-dialog form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .client-payment-details th {
    width: 88px;
  }
  .client-payment-details th,
  .client-payment-details td {
    padding: 14px 10px;
  }
  .client-payment-details .proof-thumbnail {
    width: 120px;
    height: 90px;
  }
}

.live-range-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  flex-wrap: wrap;
}
.live-range-controls[hidden] {
  display: none;
}
.live-range-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
}
.live-range-controls select {
  padding: 5px 8px;
  width: auto;
  max-width: 150px;
  font-size: 11px;
}
.live-range-controls [data-live-window] {
  color: var(--muted);
}
.live-range-controls button {
  margin-left: auto;
  font-size: 11px;
  padding: 5px 8px;
}
@media (max-width: 650px) {
  .live-range-controls {
    padding: 8px;
    gap: 8px;
  }
  .live-range-controls [data-live-window] {
    font-size: 10px;
  }
}
.api-help {
  display: block;
  margin-top: 7px;
  line-height: 1.65;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.api-settings .form-grid > div {
  min-width: 0;
}
#api-update-result {
  margin-top: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.catalog-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.catalog-filters select {
  flex: 1;
  min-width: 100px;
  max-width: 220px;
}
.watchlist .catalog-filters {
  padding: 0 10px;
}
.watchlist .catalog-filters select {
  min-width: 0;
  width: 45%;
}

.product-sort-input {
  width: 95px;
  min-width: 75px;
}
#api-update-result {
  white-space: pre-wrap;
}

/* The market list owns its scrolling; compact layouts use a left drawer. */
.trading-app .watchlist {
  min-height: 0;
  overflow: hidden;
}
.trading-app .watchlist > #watch-rows {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
}
.trading-app .watchlist > .pagination,
.trading-app .watchlist > .watch-foot,
.trading-app .watchlist > .watch-head,
.trading-app .watchlist > .asset-filters,
.trading-app .watchlist > .catalog-filters,
.trading-app .watchlist > .section-heading,
.trading-app .watchlist > input {
  flex-shrink: 0;
}
.mobile-market-open,
.market-drawer-close,
.market-drawer-backdrop {
  display: none;
}
@media (min-width: 951px) {
  .trading-app .watchlist {
    position: sticky;
    top: 0;
    align-self: start;
    height: calc(100dvh - 152px);
    max-height: 100dvh;
  }
  .trading-app .watchlist .watch-row {
    min-width: 0;
  }
  .trading-app .watchlist .watch-row > div:first-child {
    min-width: 0;
  }
  .trading-app .watchlist .watch-row small {
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .trading-app .watchlist .pagination {
    gap: 6px;
    padding: 8px;
    font-size: 10px;
  }
  .trading-app .watchlist .pagination button {
    padding: 6px 9px;
  }
}
@media (max-width: 950px) {
  .trading-app .mobile-market-open {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 13px 16px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: var(--panel);
    color: var(--text);
    text-align: left;
  }
  .mobile-market-open > span:last-child {
    font-size: 11px;
    color: var(--accent);
  }
  .trading-app .watchlist {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-self: auto;
    width: min(88vw, 360px);
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    margin: 0;
    padding: max(18px, env(safe-area-inset-top)) 0 max(8px, env(safe-area-inset-bottom));
    border: 0;
    border-right: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 14px 0 45px #0006;
    transform: translateX(-100%);
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.2s ease,
      visibility 0.2s;
    overscroll-behavior: none;
  }
  .trading-app .watchlist.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  .trading-app .watchlist > .section-heading {
    display: flex;
    margin: 0 16px 16px;
    gap: 10px;
  }
  .trading-app .watchlist > .section-heading .muted {
    margin-left: auto;
  }
  .trading-app .market-drawer-close {
    display: block;
    padding: 4px 10px;
    font-size: 23px;
    line-height: 1.2;
  }
  .trading-app .watchlist > input {
    display: block;
    margin: 0 16px 12px;
    font-size: 16px;
  }
  .trading-app .watchlist .asset-filters {
    display: flex;
    flex-wrap: wrap;
    padding: 0 10px;
  }
  .trading-app .watchlist .asset-filters button {
    font-size: 12px;
    padding: 9px;
  }
  .trading-app .watchlist > .watch-head {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 11px;
    color: var(--muted);
  }
  .trading-app .watchlist .watch-row {
    min-width: 0;
    width: 100%;
    padding: 15px 16px;
    border-right: 0;
    gap: 10px;
  }
  .trading-app .watchlist .watch-row.selected {
    border-left: 2px solid var(--accent);
    border-bottom: 1px solid var(--line);
    padding-left: 14px;
  }
  .trading-app .watchlist .watch-row > div:first-child {
    min-width: 0;
  }
  .trading-app .watchlist .watch-row b {
    font-size: 13px;
  }
  .trading-app .watchlist .watch-row small {
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
  }
  .trading-app .watchlist .pagination {
    padding: 8px 12px;
    margin: 0;
    gap: 8px;
    font-size: 11px;
  }
  .trading-app .watchlist > .watch-foot {
    display: block;
    padding: 10px 16px;
    font-size: 10px;
    color: var(--muted);
  }
  .trading-app .market-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100%;
    height: 100dvh;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #0009;
    backdrop-filter: blur(2px);
    touch-action: none;
  }
  .trading-app .market-drawer-backdrop[hidden] {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .trading-app .watchlist {
    transition: none;
  }
}
.trading-app #watch-rows:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}
.mobile-order-login {
  display: none;
}

@media (max-width: 650px) {
  .trading-app .order-panel[data-authenticated='false'] > :not(.mobile-order-login) {
    display: none;
  }

  .trading-app .order-panel .mobile-order-login {
    display: flex;
    min-height: 180px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--muted);
    text-align: center;
  }
}
/* Trading policies are grouped so switches never displace paired session times. */
.trade-config-form {
  gap: 16px;
}
.trade-config-section {
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.trade-config-section legend {
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
}
.trade-config-fields,
.trade-session-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  align-items: center;
}
.trade-config-fields label {
  margin: 0;
}
.trade-config-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}
.trade-session-row {
  grid-column: 1 / -1;
}
.calendar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.calendar-tag {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: inherit;
}
input:is([type='date'], [type='time'], [type='datetime-local'], [type='month'], [type='week']):not(
    :disabled
  ):not([readonly]) {
  cursor: pointer;
}
@media (max-width: 600px) {
  .trade-config-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .trade-session-row {
    gap: 12px;
  }
}
.record-quick-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  white-space: nowrap;
  padding: 6px;
}
.quick-switch-track {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 20px;
  background: #536070;
  flex-shrink: 0;
}
.quick-switch-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  transition: transform 120ms;
}
.record-quick-switch[aria-checked='true'] .quick-switch-track {
  background: #31956b;
}
.record-quick-switch[aria-checked='true'] .quick-switch-track::after {
  transform: translateX(14px);
}
.record-quick-switch:disabled {
  opacity: 0.5;
  cursor: wait;
}
.timezone-select input[type='search'] {
  margin-bottom: 6px;
}
.timezone-select select {
  min-width: 0;
  text-overflow: ellipsis;
}
/* Destructive actions share a warning treatment in both application surfaces. */
button:is(
  .danger-action,
  [data-action='delete'],
  [data-account-delete],
  [data-document-remove],
  [data-calendar-remove],
  [data-exchange-remove]
) {
  color: #ffabb5;
  background: #48212b;
  border-color: #9e4656;
}
button:is(
    .danger-action,
    [data-action='delete'],
    [data-account-delete],
    [data-document-remove],
    [data-calendar-remove],
    [data-exchange-remove]
  ):hover:not(:disabled) {
  color: #fff0f2;
  background: #722f3d;
  border-color: #ee8293;
}
button:is(
    .danger-action,
    [data-action='delete'],
    [data-account-delete],
    [data-document-remove],
    [data-calendar-remove],
    [data-exchange-remove]
  ):focus-visible {
  outline: 2px solid #ff95a6;
  outline-offset: 2px;
}
.timezone-select {
  min-width: 0;
  margin: 15px 0;
}
.timezone-field-label {
  display: block;
  font-size: 11px;
  margin-bottom: 8px;
}
.timezone-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  text-align: left;
  width: 100%;
  min-height: 40px;
}
.timezone-trigger [data-timezone-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timezone-picker {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(480px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 22px;
  color: #e4edf3;
  background: #14202c;
}
.timezone-picker[open] {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.timezone-picker::backdrop {
  background: #0008;
}
.timezone-picker-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.timezone-picker-heading h2 {
  margin: 0;
  font-size: 18px;
}
.timezone-picker [data-timezone-search] {
  width: 100%;
  flex-shrink: 0;
}
.timezone-picker [data-timezone-count] {
  margin: 0;
  font-size: 12px;
}
.timezone-picker-results {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
}
.timezone-picker-results button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  margin-bottom: 6px;
}
.timezone-picker-results button[aria-selected='true'] {
  border-color: var(--accent);
  color: var(--accent);
}
.trade-config-fields .timezone-select {
  margin: 0;
}
/* Searchable time-zone menu is anchored to its field, including inside modal forms. */
.timezone-picker {
  inset: auto;
  margin: 0;
  height: auto;
  padding: 12px;
  border-radius: 10px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 12px 32px #0006;
}
.timezone-picker-heading h2 {
  font-size: 13px;
}
.timezone-picker-results button {
  padding: 10px;
  font-size: 12px;
}
.page-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.page-jump input {
  width: 76px;
  min-width: 0;
}
.order-id-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#channel-qr .proof-thumbnail img {
  width: 160px;
  height: 160px;
  object-fit: contain;
}

.support-float-toggle {
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.support-float-toggle:active {
  cursor: grabbing;
}
.settings-section {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 18px;
  margin: 0 0 12px;
}
.settings-section legend {
  padding: 0 8px;
  font-weight: 600;
}

.design-content-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 16px 0;
}
.design-content-group > h3 {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--accent);
}
.design-content-group > details:first-of-type {
  border-top: 0;
}

/* Shared brand accents; up/down, warnings and destructive actions retain semantic colors. */
.trading-app .primary,
.trading-app .primary:hover {
  color: var(--accent-contrast, #0b1018);
}
.trading-app .exchange-header nav button.active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.trading-app .landing-hero {
  background:
    radial-gradient(
      ellipse at 80% 60%,
      color-mix(in srgb, var(--accent) 20%, var(--panel)),
      transparent 60%
    ),
    var(--panel);
}
.trading-app .hero-grid-orb {
  color: color-mix(in srgb, var(--accent) 32%, transparent);
  text-shadow: 30px 10px 0 color-mix(in srgb, var(--accent) 12%, transparent);
}

.device-timezone-note {
  padding: 6px 24px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: end;
  overflow-wrap: anywhere;
}
@media (max-width: 650px) {
  .device-timezone-note {
    padding: 4px 12px;
  }
}

/* Preview tools live outside the customer UI and only appear after authorized preview setup. */
.design-canvas {
  position: relative;
}
.preview-edit-panel {
  position: absolute;
  top: 70px;
  right: 20px;
  max-height: calc(100vh - 200px);
  overflow: auto;
  z-index: 100;
  width: min(420px, 100%);
  margin: -20px 0 0 auto;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 12px 40px #0005;
}
.preview-edit-panel textarea {
  width: 100%;
}
.preview-edit-panel .section-heading {
  margin: 0;
}
.preview-edit-panel .upload-preview {
  max-height: 130px;
  object-fit: contain;
}
[data-preview-toolbar] {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  gap: 6px;
  padding: 6px;
  background: #111d2e;
  border: 1px solid #369aff;
  border-radius: 8px;
  box-shadow: 0 4px 20px #0005;
}
[data-preview-toolbar] button {
  background: #24354a;
  color: #fff;
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
}
[data-preview-toolbar] [aria-pressed='true'] {
  background: #159bfa;
}
