:root {
  color-scheme: light;
  --fxm-primary-red: #c62828;
  --fxm-primary-red-hover: #a91f1f;
  --fxm-primary-green: #0b8f55;
  --fxm-primary-green-hover: #087446;
  --fxm-positive: #16a365;
  --fxm-negative: #d63b3b;
  --fxm-warning: #d99a19;
  --fxm-background: #f5f7f8;
  --fxm-surface: #ffffff;
  --fxm-surface-dark: #111716;
  --fxm-border: #dce3e1;
  --fxm-text-primary: #15201d;
  --fxm-text-secondary: #62716c;
  --ink: var(--fxm-text-primary);
  --muted: var(--fxm-text-secondary);
  --line: var(--fxm-border);
  --panel: var(--fxm-surface);
  --surface: var(--fxm-background);
  --brand: var(--fxm-primary-green);
  --brand-dark: var(--fxm-primary-green-hover);
  --nav: var(--fxm-surface-dark);
  --gold: var(--fxm-warning);
  --danger: var(--fxm-negative);
  --success: var(--fxm-positive);
  --shadow-soft: 0 16px 42px rgba(17, 23, 22, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.5;
  overflow-x: hidden;
  font-size: 15px;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar,
.nav {
  background: var(--nav);
  color: #fff;
}

.topbar-inner,
.nav-inner,
.section-inner,
.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  font-size: 13px;
  color: #d7dde7;
}

.topbar-links,
.nav-links,
.actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.mobile-only,
.mobile-nav-button,
.nav-backdrop,
.drawer-backdrop {
  display: none;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 76px;
  gap: 28px;
}

.logo {
  display: block;
  height: 42px;
  width: auto;
}

.nav-links {
  justify-content: center;
  font-size: 15px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}

.btn-primary {
  color: #fff;
  background: var(--brand);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn:not(.btn-primary):not(.btn-secondary) {
  color: #17213a;
  background: #fff;
  border-color: #cfd8e5;
}

.full-width {
  width: 100%;
}

.link-button {
  color: #fff;
  background: var(--fxm-primary-red);
}

.hero {
  background:
    linear-gradient(90deg, rgba(17, 23, 22, 0.94), rgba(11, 143, 85, 0.76), rgba(198, 40, 40, 0.58)),
    url("/assets/bonus-offerings.webp") center/cover;
  color: #fff;
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: min(680px, calc(100vh - 112px));
  display: grid;
  align-items: center;
  padding: 72px 0 52px;
}

.hero-copy {
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 16px;
  color: #f5d87a;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  margin-bottom: 22px;
  letter-spacing: 0;
}

h2 {
  font-size: 34px;
  line-height: 1.15;
  margin-bottom: 14px;
}

h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.lead {
  color: #e8edf4;
  font-size: 20px;
  max-width: 650px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 30px 0 34px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  max-width: 620px;
  gap: 12px;
}

.metric {
  border-left: 3px solid var(--brand);
  background: rgba(255, 255, 255, 0.08);
  padding: 14px;
}

.metric strong {
  display: block;
  font-size: 22px;
}

.metric span {
  color: #dce3ec;
  font-size: 13px;
}

.band {
  padding: 72px 0;
}

.band.white {
  background: #fff;
}

.section-head {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-head p,
.card p,
.risk p {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  min-height: 190px;
}

.card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 16px;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 42px;
  align-items: center;
}

.split img {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.market-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.market-table th,
.market-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

.market-table th {
  color: var(--muted);
  background: #f8fafc;
}

.risk {
  border-top: 4px solid var(--gold);
  background: #fff;
  padding: 26px;
  border-radius: 8px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

footer {
  background: #111827;
  color: #d7dde7;
  padding: 44px 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
}

.footer-inner p {
  color: #aeb7c5;
  margin-bottom: 8px;
}

@media (max-width: 860px) {
  .topbar-links {
    display: none;
  }

  .nav-inner {
    grid-template-columns: auto auto 1fr;
    min-height: 68px;
    gap: 12px;
  }

  .mobile-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    background: transparent;
    font-weight: 700;
  }

  .nav-links {
    position: fixed;
    z-index: 30;
    top: 104px;
    left: 12px;
    right: 12px;
    display: none;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 4px;
    max-height: calc(100vh - 126px);
    overflow-y: auto;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #111827;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  }

  .nav-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 6px;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .mobile-only {
    display: flex;
  }

  .public-nav-open .nav-links {
    display: grid;
  }

  .public-nav-open,
  .drawer-open {
    overflow: hidden;
  }

  .public-nav-open .nav-backdrop {
    display: block;
    position: fixed;
    z-index: 20;
    inset: 104px 0 0;
    width: 100%;
    border: 0;
    background: rgba(8, 13, 22, 0.42);
  }

  .actions {
    gap: 8px;
    justify-self: end;
  }

  .btn {
    min-height: 42px;
    padding: 0 12px;
    font-size: 14px;
  }

  .hero-inner {
    min-height: auto;
    padding: 58px 0;
  }

  .metrics,
  .grid,
  .copy-grid,
  .filter-grid,
  .split,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .band {
    padding: 52px 0;
  }
}

/* Public broker homepage */
.public-home {
  --home-dark: var(--fxm-surface-dark);
  --home-dark-2: #17211f;
  --home-panel: var(--fxm-surface);
  --home-soft: var(--fxm-background);
  --home-line: var(--fxm-border);
  --home-copy: var(--fxm-text-primary);
  --home-muted: var(--fxm-text-secondary);
  --home-red: var(--fxm-primary-red);
  --home-green: var(--fxm-primary-green);
  --home-gold: var(--fxm-warning);
  background: #fff;
  color: var(--home-copy);
  font-family: Arial, Helvetica, sans-serif;
}

.public-home .home-shell {
  width: min(1230px, calc(100% - 40px));
  margin: 0 auto;
}

.public-home .risk-strip {
  background: #3f3f40;
  color: #eceff4;
  font-size: 12px;
}

.public-home .risk-strip-inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.public-home .risk-strip p {
  margin: 0;
  line-height: 1.35;
}

.public-home .risk-strip-links {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.public-home .risk-strip button,
.public-home .country-pill {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  min-height: 28px;
  padding: 0 10px;
}

.public-home .home-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #101010;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.public-home .home-nav {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}

.public-home .brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.public-home .brand-lockup img {
  width: 46px;
  height: 40px;
  object-fit: contain;
}

.public-home .home-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
  color: #d9dde5;
}

.public-home .home-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  font-size: 13px;
}

.public-home .home-menu-button {
  display: none;
}

.public-home .login-link {
  color: #fff;
}

.public-home .home-btn,
.public-home .outline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 24px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  border: 1px solid transparent;
  white-space: nowrap;
}

.public-home .home-btn-primary {
  color: #fff;
  background: var(--home-green);
  box-shadow: 0 10px 28px rgba(15, 159, 88, 0.22);
}

.public-home .home-btn-primary:hover {
  background: #0b8549;
}

.public-home .home-btn-large {
  min-width: 190px;
}

.public-home .outline-action {
  color: #2d3138;
  background: #fff;
  border-color: #d4d6dc;
}

.public-home .home-hero {
  color: #fff;
  background: radial-gradient(circle at 75% 45%, rgba(215, 25, 32, 0.12), transparent 32%), #050607;
  overflow: hidden;
}

.public-home .hero-layout {
  min-height: 560px;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: stretch;
  gap: 28px;
}

.public-home .hero-copy-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 560px;
  padding: 74px 0 78px;
  position: relative;
  z-index: 2;
}

.public-home .home-badge,
.public-home .section-kicker {
  margin: 0 0 14px;
  color: var(--home-red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.public-home h1,
.public-home h2,
.public-home h3,
.public-home p {
  margin-top: 0;
}

.public-home h1 {
  margin-bottom: 22px;
  max-width: 520px;
  font-size: clamp(44px, 5.8vw, 78px);
  line-height: 0.96;
  text-transform: uppercase;
  letter-spacing: 0;
}

.public-home .hero-lede {
  margin-bottom: 30px;
  max-width: 560px;
  color: #d6dbe3;
  font-size: 17px;
  line-height: 1.55;
}

.public-home .hero-cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.public-home .demo-link {
  color: #e7ebf2;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.public-home .hero-visual {
  position: relative;
  min-height: 560px;
  margin-right: calc((100vw - min(1230px, calc(100vw - 40px))) / -2);
}

.public-home .hero-visual::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -32%;
  width: 60%;
  z-index: 1;
  background: linear-gradient(90deg, #050607 0%, rgba(5, 6, 7, 0.86) 36%, rgba(5, 6, 7, 0) 100%);
  pointer-events: none;
}

.public-home .hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
  object-position: center right;
  display: block;
}

.public-home .floating-card {
  position: absolute;
  z-index: 2;
  width: 164px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(13, 17, 22, 0.78);
  color: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
}

.public-home .floating-card span,
.public-home .floating-card small {
  display: block;
  color: #aeb7c5;
  font-size: 11px;
}

.public-home .floating-card strong {
  display: block;
  margin: 3px 0;
  font-size: 20px;
}

.public-home .spread-card {
  left: 12%;
  top: 34%;
}

.public-home .gold-card {
  right: 13%;
  top: 50%;
}

.public-home .balance-card {
  left: 28%;
  bottom: 15%;
}

.public-home .funding-strip {
  background: #fff;
  border-bottom: 1px solid var(--home-line);
  padding: 24px 0;
}

.public-home .funding-strip .home-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 30px;
  align-items: center;
}

.public-home .funding-strip h2 {
  margin: 0;
  max-width: 170px;
  color: #555d68;
  font-size: 12px;
  line-height: 1.35;
  text-transform: uppercase;
}

.public-home .funding-methods {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.public-home .funding-methods article {
  min-height: 76px;
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--home-line);
  border-radius: 6px;
  background: #fff;
}

.public-home .funding-methods article[data-status="disabled"],
.public-home .funding-methods article[data-status="provider_pending"],
.public-home .funding-methods article[data-status="manual_review"] {
  background: #fbfbfb;
}

.public-home .funding-methods strong,
.public-home .funding-methods small {
  display: block;
}

.public-home .funding-methods strong {
  font-size: 13px;
}

.public-home .funding-methods small {
  color: var(--home-muted);
  font-size: 11px;
}

.public-home .method-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #5c445a;
  background: #f4e9ef;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.public-home .method-icon,
.public-home .platform-icon {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--home-red), #f2bd4b);
  position: relative;
}

.public-home .method-icon::after,
.public-home .platform-icon::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 2px;
}

.public-home .method-icon.crypto {
  background: linear-gradient(135deg, #111827, #14b26a);
}

.public-home .method-icon.mobile {
  background: linear-gradient(135deg, #d71920, #20252d);
}

.public-home .method-icon.bank {
  background: linear-gradient(135deg, #2c3440, #c8a24d);
}

.public-home .method-icon.usd {
  background: linear-gradient(135deg, #0f9f58, #c8a24d);
}

.public-home .home-section {
  padding: 86px 0;
}

.public-home .accounts-section,
.public-home .promo-section,
.public-home .platforms-section {
  background: #fff;
}

.public-home .center-head {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}

.public-home .center-head h2,
.public-home .instruments-copy h2,
.public-home .app-copy h2,
.public-home .loyalty-card h2,
.public-home .campaign-inner h2 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  text-transform: uppercase;
}

.public-home .center-head p,
.public-home .instruments-copy p,
.public-home .app-copy p,
.public-home .loyalty-card p {
  color: var(--home-muted);
}

.public-home .account-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.public-home .account-card {
  grid-column: span 2;
  min-height: 214px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--home-line);
  border-radius: 6px;
  background: #f8f8f8;
  box-shadow: 0 12px 28px rgba(15, 21, 31, 0.05);
}

.public-home .account-card:nth-child(4),
.public-home .account-card:nth-child(5) {
  grid-column: span 3;
}

.public-home .account-card h3,
.public-home .promo-card h3,
.public-home .platform-grid h3,
.public-home .trust-grid h3 {
  color: #151922;
  font-size: 20px;
  line-height: 1.2;
}

.public-home .account-card p,
.public-home .account-card li,
.public-home .promo-card li,
.public-home .platform-grid p {
  color: var(--home-muted);
  font-size: 13px;
}

.public-home .account-card ul,
.public-home .promo-card ul,
.public-home .feature-list {
  padding: 0;
  margin: 16px 0;
  list-style: none;
}

.public-home .account-card li,
.public-home .promo-card li,
.public-home .feature-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.public-home .account-card li::before,
.public-home .promo-card li::before,
.public-home .feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--home-green);
}

.public-home .account-card a {
  align-self: flex-end;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #2b3038;
  background: #fff;
  border: 1px solid #d9dde4;
  font-weight: 800;
}

.public-home .center-action {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

.public-home .promo-section {
  padding-top: 42px;
}

.public-home .promo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  max-width: 820px;
  margin: 0 auto;
}

.public-home .promo-card {
  min-height: 230px;
  padding: 28px;
  border: 1px solid var(--home-line);
  border-radius: 6px;
  background: #f5f5f5;
}

.public-home .promo-note {
  margin: 22px auto 0;
  max-width: 760px;
  color: var(--home-muted);
  text-align: center;
  font-size: 13px;
}

.public-home .instruments-section {
  background: #f0f0f0;
}

.public-home .instruments-layout {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  align-items: center;
  gap: 66px;
}

.public-home .instruments-copy h2 span {
  display: block;
  color: var(--home-red);
}

.public-home .market-watch {
  overflow-x: auto;
  border: 1px solid var(--home-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
}

.public-home .market-watch table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.public-home .market-watch th,
.public-home .market-watch td {
  padding: 16px 18px;
  border-bottom: 1px solid #edf0f3;
  text-align: left;
  font-size: 14px;
}

.public-home .market-watch th {
  color: #727986;
  background: #fafafa;
  font-size: 12px;
  text-transform: uppercase;
}

.public-home .market-watch td:first-child {
  font-weight: 800;
}

.public-home .market-watch .up {
  color: var(--home-green);
}

.public-home .market-watch .down {
  color: var(--home-red);
}

.public-home .market-source-note {
  margin: 10px 16px 14px;
  color: #6d7480;
  font-size: 12px;
}

.public-home .loyalty-band {
  padding: 58px 0;
  background: #fff;
}

.public-home .loyalty-card {
  min-height: 280px;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  align-items: center;
  gap: 30px;
  padding: 42px 54px;
  border-radius: 8px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 50%, rgba(215, 25, 32, 0.56), transparent 24%),
    linear-gradient(125deg, #070809 0%, #111821 48%, #050607 100%);
  overflow: hidden;
}

.public-home .loyalty-card p {
  max-width: 620px;
  color: #d8dde6;
}

.public-home .reward-visual {
  position: relative;
  min-height: 210px;
}

.public-home .reward-visual span {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: linear-gradient(135deg, #d71920, #f4c457);
  box-shadow: 0 18px 50px rgba(215, 25, 32, 0.35);
}

.public-home .reward-visual span:nth-child(1) {
  width: 170px;
  height: 170px;
  right: 20%;
  top: 20px;
}

.public-home .reward-visual span:nth-child(2) {
  width: 100px;
  height: 100px;
  right: 8%;
  bottom: 20px;
  background: linear-gradient(135deg, #111827, #0f9f58);
}

.public-home .reward-visual span:nth-child(3) {
  width: 64px;
  height: 64px;
  right: 48%;
  bottom: 40px;
  background: linear-gradient(135deg, #c8a24d, #fff2b8);
}

.public-home .app-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 64px;
}

.public-home .phone-mockup {
  text-align: center;
}

.public-home .phone-mockup img {
  max-width: min(100%, 520px);
  height: auto;
  filter: drop-shadow(0 20px 34px rgba(17, 24, 39, 0.12));
}

.public-home .feature-list {
  columns: 2;
  column-gap: 26px;
  margin-bottom: 24px;
}

.public-home .feature-list li {
  break-inside: avoid;
  color: #4c545f;
  font-size: 14px;
}

.public-home .qr-placeholder {
  width: 120px;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 11px;
}

.public-home .qr-placeholder img,
.public-home .qr-placeholder span {
  width: 86px;
  height: 86px;
  display: block;
}

.public-home .qr-placeholder img {
  padding: 6px;
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 4px;
}

.public-home .qr-placeholder span {
  background:
    linear-gradient(90deg, #111 10px, transparent 10px 18px, #111 18px 28px, transparent 28px 36px, #111 36px 46px, transparent 46px 54px, #111 54px 64px, transparent 64px),
    linear-gradient(#111 10px, transparent 10px 18px, #111 18px 28px, transparent 28px 36px, #111 36px 46px, transparent 46px 54px, #111 54px 64px, transparent 64px);
  background-color: #fff;
  border: 10px solid #fff;
  box-shadow: 0 0 0 1px #dfe3ea;
}

.public-home .trust-section {
  padding: 86px 0;
  color: #fff;
  background: #111;
}

.public-home .trust-section .center-head h2 {
  color: #fff;
}

.public-home .trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.public-home .trust-grid article {
  min-height: 238px;
  padding: 28px 24px;
  background: #202020;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.public-home .trust-grid span {
  color: var(--home-red);
  font-size: 12px;
  font-weight: 900;
}

.public-home .trust-grid h3 {
  margin-top: 18px;
  color: #fff;
}

.public-home .trust-grid p {
  color: #c6cbd4;
  font-size: 13px;
}

.public-home .platforms-section {
  background: #f2f2f2;
}

.public-home .platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 920px;
  margin: 0 auto;
}

.public-home .platform-grid article {
  min-height: 176px;
  padding: 28px;
  border: 1px solid var(--home-line);
  border-radius: 6px;
  background: #fff;
}

.public-home .platform-grid a {
  color: var(--home-red);
  font-size: 13px;
  font-weight: 800;
}

.public-home .platform-icon {
  margin-bottom: 16px;
}

.public-home .platform-icon.mt5 {
  background: linear-gradient(135deg, #0f9f58, #1f2937);
}

.public-home .platform-icon.mobile-app {
  background: linear-gradient(135deg, #d71920, #c8a24d);
}

.public-home .platform-icon.copy {
  background: linear-gradient(135deg, #111827, #d71920);
}

.public-home .campaign-banner {
  min-height: 340px;
  display: flex;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(6, 8, 10, 0.95), rgba(6, 8, 10, 0.6) 52%, rgba(6, 8, 10, 0.2)),
    url("/assets/xcoin-hero-trader.webp") center right/cover;
}

.public-home .campaign-inner h2 {
  max-width: 520px;
}

.public-home .home-footer {
  padding: 58px 0 38px;
  color: #d9dde5;
  background: #111;
}

.public-home .footer-top {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 54px;
}

.public-home .footer-brand p,
.public-home .footer-risk p,
.public-home .copyright {
  color: #aab1bd;
  font-size: 12px;
}

.public-home .social-row {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}

.public-home .social-row a {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: #24272d;
  font-size: 11px;
  font-weight: 800;
}

.public-home .download-placeholder {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 9px 12px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  font-size: 12px;
}

.public-home .legal-entity {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.public-home .legal-entity p {
  margin-bottom: 7px;
}

.public-home .footer-menus {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 34px;
}

.public-home .footer-menus h3 {
  color: #fff;
  font-size: 14px;
}

.public-home .footer-menus a {
  display: block;
  margin-bottom: 8px;
  color: #9fa6b2;
  font-size: 12px;
}

.public-home .footer-risk {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.public-home .footer-risk h2 {
  color: #fff;
  font-size: 16px;
}

.public-home .copyright {
  margin: 26px 0 0;
}

@media (max-width: 1060px) {
  .public-home .home-nav {
    gap: 16px;
  }

  .public-home .home-nav-links {
    gap: 14px;
  }

  .public-home .home-nav-actions .country-pill {
    display: none;
  }

  .public-home .hero-layout,
  .public-home .instruments-layout,
  .public-home .app-layout,
  .public-home .loyalty-card,
  .public-home .footer-top {
    grid-template-columns: 1fr;
  }

  .public-home .hero-copy-block {
    max-width: 680px;
    padding-bottom: 20px;
  }

  .public-home .hero-visual {
    min-height: 430px;
    margin: 0 -20px;
  }

  .public-home .hero-visual img {
    min-height: 430px;
  }

  .public-home .funding-strip .home-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .public-home .funding-strip h2 {
    max-width: none;
  }

  .public-home .funding-methods {
    grid-template-columns: repeat(3, 1fr);
  }

  .public-home .trust-grid,
  .public-home .footer-menus {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .public-home .home-shell {
    width: min(100% - 28px, 1230px);
  }

  .public-home .risk-strip-inner {
    min-height: 42px;
  }

  .public-home .risk-strip-links {
    display: none;
  }

  .public-home .home-nav {
    min-height: 66px;
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .public-home .home-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 4px;
    color: #fff;
    background: transparent;
    font-weight: 800;
  }

  .public-home .home-nav-links {
    position: fixed;
    z-index: 60;
    top: 108px;
    left: 14px;
    right: 14px;
    display: none;
    grid-template-columns: 1fr;
    gap: 4px;
    align-items: stretch;
    padding: 12px;
    border-radius: 8px;
    background: #101010;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.36);
  }

  .public-home.public-nav-open .home-nav-links {
    display: grid;
  }

  .public-home.public-nav-open .nav-backdrop {
    display: block;
    position: fixed;
    z-index: 30;
    inset: 108px 0 0;
    width: 100%;
    border: 0;
    background: rgba(8, 10, 13, 0.48);
  }

  .public-home .home-nav-links a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 4px;
  }

  .public-home .home-nav-links a:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .public-home .home-nav-actions {
    display: none;
  }

  .public-home .home-nav-links .mobile-only {
    display: flex;
  }

  .public-home h1 {
    font-size: clamp(42px, 13vw, 62px);
  }

  .public-home .home-section,
  .public-home .trust-section {
    padding: 62px 0;
  }

  .public-home .funding-methods,
  .public-home .promo-grid,
  .public-home .platform-grid,
  .public-home .trust-grid,
  .public-home .footer-menus {
    grid-template-columns: 1fr;
  }

  .public-home .account-grid {
    grid-template-columns: 1fr;
  }

  .public-home .account-card,
  .public-home .account-card:nth-child(4),
  .public-home .account-card:nth-child(5) {
    grid-column: auto;
  }

  .public-home .feature-list {
    columns: 1;
  }

  .public-home .loyalty-card {
    padding: 30px 24px;
  }

  .public-home .campaign-banner {
    min-height: 300px;
    background-position: center right 32%;
  }
}

@media (max-width: 520px) {
  .public-home .brand-lockup span {
    font-size: 14px;
  }

  .public-home .hero-layout {
    min-height: auto;
  }

  .public-home .hero-copy-block {
    padding: 52px 0 14px;
  }

  .public-home .hero-lede {
    font-size: 15px;
  }

  .public-home .hero-visual,
  .public-home .hero-visual img {
    min-height: 330px;
  }

  .public-home .floating-card {
    width: 136px;
    padding: 10px;
  }

  .public-home .floating-card strong {
    font-size: 17px;
  }

  .public-home .spread-card {
    left: 6%;
    top: 18%;
  }

  .public-home .gold-card {
    right: 5%;
    top: 43%;
  }

  .public-home .balance-card {
    left: 18%;
    bottom: 8%;
  }

  .public-home .funding-methods article {
    grid-template-columns: 28px 1fr;
  }

  .public-home .center-head h2,
  .public-home .instruments-copy h2,
  .public-home .app-copy h2,
  .public-home .loyalty-card h2,
  .public-home .campaign-inner h2 {
    font-size: 30px;
  }

  .public-home .market-watch {
    margin-right: -14px;
  }

  .public-home .reward-visual {
    min-height: 150px;
  }

  .public-home .reward-visual span:nth-child(1) {
    width: 120px;
    height: 120px;
  }

  .public-home .footer-top {
    gap: 30px;
  }
}

/* Public legal documentation */
.public-doc {
  margin: 0;
  color: #141922;
  background: #f4f6f8;
  font-family: Arial, Helvetica, sans-serif;
}

.public-doc .doc-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(20px, calc((100vw - 1120px) / 2));
  color: #fff;
  background: #101010;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.public-doc .brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
}

.public-doc .brand-lockup img {
  width: 46px;
  height: 40px;
  object-fit: contain;
}

.public-doc .doc-header nav {
  display: flex;
  gap: 18px;
  color: #d9dde5;
  font-size: 13px;
  font-weight: 700;
}

.public-doc .doc-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.public-doc .doc-article {
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid #e0e4ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.06);
}

.public-doc .section-kicker {
  margin: 0 0 12px;
  color: #d71920;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-doc h1 {
  margin: 0 0 14px;
  color: #0f141d;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1;
  text-transform: uppercase;
}

.public-doc h2 {
  margin: 34px 0 10px;
  color: #151922;
  font-size: 22px;
}

.public-doc p {
  max-width: 880px;
  color: #4c5563;
}

.public-doc a {
  color: inherit;
  text-decoration: none;
}

.public-doc .doc-updated {
  padding-bottom: 22px;
  border-bottom: 1px solid #e5e8ee;
  color: #6b7280;
}

.public-doc .doc-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 30px 0 8px;
}

.public-doc .doc-link-grid a {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 22px;
  border: 1px solid #e3e7ee;
  border-radius: 7px;
  background: #f8fafc;
}

.public-doc .doc-link-grid strong {
  color: #111827;
  font-size: 18px;
}

.public-doc .doc-link-grid span {
  color: #5f6876;
  font-size: 14px;
}

.public-doc .doc-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 38px;
  color: #6b7280;
  font-size: 12px;
}

@media (max-width: 720px) {
  .public-doc .doc-header {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .public-doc .doc-header nav {
    width: 100%;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .public-doc .doc-main {
    padding: 34px 0;
  }

  .public-doc .doc-link-grid {
    grid-template-columns: 1fr;
  }
}

/* Auth portal */
.portal-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #eef0f4;
  color: #08142b;
}

.portal-header {
  background: #101010;
  color: #fff;
  min-height: 66px;
}

.portal-header-inner {
  width: min(1450px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.portal-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #aeb4bf;
  font-size: 12px;
  font-weight: 700;
}

.language-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(135deg, #1d3e8a 0 45%, #fff 45% 55%, #c8102e 55%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.auth-main {
  flex: 1;
  width: min(1450px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  place-items: start center;
  padding: 66px 0 54px;
}

.auth-card {
  width: min(448px, 100%);
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 16px 34px rgba(23, 31, 47, 0.08);
  padding: 36px 30px 34px;
}

.auth-card.register {
  width: min(448px, 100%);
  padding-top: 8px;
}

.auth-title {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 500;
  color: #061332;
}

.auth-copy {
  margin-bottom: 24px;
  color: #6d7684;
  font-size: 14px;
}

.field-group {
  margin-bottom: 18px;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.field-row label,
.field-group > label {
  display: block;
  color: #111b38;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.field-row label {
  margin-bottom: 0;
}

.minor-link {
  color: #d60000;
  font-size: 13px;
  font-weight: 700;
}

.input-control,
.select-control,
.textarea-control {
  width: 100%;
  border: 1px solid #d7deea;
  border-radius: 5px;
  color: #07142f;
  background: #fff;
  font: inherit;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input-control,
.select-control {
  height: 44px;
  padding: 0 14px;
}

.textarea-control {
  min-height: 126px;
  padding: 12px 14px;
  resize: vertical;
}

.input-control::placeholder {
  color: #9aa3b2;
}

.input-control:focus,
.select-control:focus {
  border-color: #8fb1de;
  box-shadow: 0 0 0 3px rgba(45, 107, 181, 0.12);
}

.password-wrap {
  position: relative;
}

.password-wrap .input-control {
  padding-right: 62px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #7d8797;
  font-weight: 700;
  cursor: pointer;
  min-height: 36px;
  padding: 6px 8px;
}

.resend-form {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.phone-control {
  display: grid;
  grid-template-columns: 38px 1fr;
}

.phone-prefix {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7deea;
  border-right: 0;
  border-radius: 5px 0 0 5px;
  background: #f4f7fb;
  color: #0b1630;
}

.phone-control .input-control {
  border-radius: 0 5px 5px 0;
}

.checkbox-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #29364f;
  font-size: 13px;
  line-height: 1.45;
  margin: 8px 0 18px;
}

.checkbox-line input {
  margin-top: 3px;
}

.submit-wide {
  width: 100%;
  min-height: 44px;
  background: #0f9146;
  color: #fff;
  border: 0;
  border-radius: 5px;
  font-weight: 700;
  cursor: pointer;
}

.submit-wide:hover {
  background: #0a7b39;
}

.submit-inline {
  display: flex;
  justify-content: flex-end;
}

.submit-inline .submit-wide {
  width: auto;
  min-width: 78px;
  padding: 0 16px;
  background: #84bd9b;
}

.auth-switch {
  margin: 34px 0 0;
  color: #17213a;
  font-size: 15px;
}

.auth-switch a {
  color: #d60000;
  font-weight: 800;
}

.form-message {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.4;
}

.form-message.error {
  background: #fff1f1;
  color: #9f1117;
  border: 1px solid #f1bbbb;
}

.form-message.success {
  background: #edf9f2;
  color: #126335;
  border: 1px solid #b8e2c8;
}

.trust-panel {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid #dbe2ec;
  border-radius: 5px;
  background: #f8fafc;
}

.trust-panel strong {
  display: block;
  margin-bottom: 6px;
  color: #101a33;
}

.trust-panel p {
  margin: 0;
  color: #667181;
  font-size: 12px;
}

.legal-footer {
  width: min(1450px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 22px;
  background: transparent;
  color: #8a93a3;
  font-size: 12px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
  color: #061332;
}

.legal-links a {
  color: #061332;
}

.legal-links a:not(:last-child)::after {
  content: "|";
  margin-left: 10px;
  color: #061332;
}

.legal-footer p {
  max-width: 1280px;
  margin-bottom: 14px;
}

/* App dashboards */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: #f5f7fb;
}

.side-nav {
  background: linear-gradient(180deg, #0a0f1a 0%, #111827 100%);
  color: #dce4ee;
  padding: 22px 18px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.side-brand img {
  width: 82px;
  height: auto;
}

.side-brand span {
  font-size: 12px;
  color: #8f9bad;
}

.drawer-close-button {
  display: none;
  margin-left: auto;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #344158;
  border-radius: 7px;
  background: #172235;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.nav-account-panel {
  display: none;
}

.side-nav a,
.quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 7px;
  color: #c8d2df;
  margin-bottom: 5px;
  font-size: 14px;
  letter-spacing: 0;
}

.nav-group {
  margin: 10px 0;
}

.nav-group-toggle {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #e3eaf3;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.nav-group-toggle:hover {
  background: #172235;
}

.nav-icon {
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  opacity: 0.8;
}

.nav-icon.chart {
  border-radius: 50%;
}

.nav-icon.wallet {
  border-radius: 3px;
}

.nav-icon.analytics {
  transform: rotate(45deg);
}

.nav-icon.user {
  border-radius: 50% 50% 4px 4px;
}

.nav-caret {
  transition: transform 160ms ease;
}

.nav-group[data-open="false"] .nav-caret {
  transform: rotate(-90deg);
}

.nav-group-links {
  display: none;
  margin: 4px 0 8px;
}

.nav-group[data-open="true"] .nav-group-links {
  display: block;
}

.nav-group-links a {
  margin-left: 22px;
  color: #b9c5d4;
}

.nav-referral {
  margin-top: 22px;
  border: 1px solid #344158;
  background: #161f31;
  color: #fff !important;
}

.side-nav a.active,
.side-nav a:hover,
.quick-link:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.app-main {
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

.app-topbar {
  min-height: 72px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e3e9f2;
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
}

.drawer-button {
  display: none;
  border: 1px solid #d7deea;
  background: #fff;
  border-radius: 6px;
  min-height: 44px;
  padding: 0 12px;
  font-weight: 700;
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e1e7f0;
  border-radius: 999px;
  padding: 5px 10px 5px 6px;
  color: #17213a;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #d71920;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

.profile-pill [data-user-name] {
  display: none;
}

.workspace {
  padding: 28px;
  min-width: 0;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-heading h1 {
  color: #111827;
  font-size: clamp(25px, 2.1vw, 34px);
  line-height: 1.12;
  margin-bottom: 6px;
}

.page-heading p {
  color: #667181;
  margin-bottom: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card,
.panel {
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.stat-card {
  padding: 20px;
}

.add-account-card {
  border-style: dashed;
  display: grid;
  align-content: center;
  min-height: 210px;
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
}

.add-account-card .stat-value {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #111827;
  color: #fff;
}

.stat-label {
  color: #667181;
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 26px;
  line-height: 1.1;
  color: #111827;
  font-weight: 800;
}

.stat-note {
  margin-top: 8px;
  color: #0f9146;
  font-size: 12px;
}

.stat-value-small {
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 18px;
  min-width: 0;
}

[data-portal-page="deposit"] .content-grid {
  grid-template-columns: minmax(0, 860px);
}

[data-portal-page="withdrawal"] .content-grid {
  grid-template-columns: minmax(0, 860px);
}

.performance-workspace {
  max-width: 1180px;
}

.compact-heading {
  margin-bottom: 14px;
}

.performance-controls {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.performance-controls .field-group {
  width: min(360px, 100%);
}

.performance-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 34px;
}

.performance-kpis article {
  min-width: 0;
}

.performance-kpis span {
  display: block;
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 8px;
}

.performance-kpis strong {
  display: block;
  color: #111827;
  font-size: 20px;
  margin-bottom: 24px;
}

.performance-kpis small {
  color: #6b7280;
  line-height: 1.8;
}

.performance-chart-section {
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  padding: 22px;
}

.performance-chart-section h2 {
  margin: 0 0 18px;
}

.performance-tabs {
  display: inline-flex;
  border: 1px solid #d7deea;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 26px;
}

.performance-tabs button {
  min-height: 42px;
  border: 0;
  border-right: 1px solid #d7deea;
  background: #fff;
  padding: 0 18px;
  color: #667181;
  cursor: pointer;
}

.performance-tabs button:last-child {
  border-right: 0;
}

.performance-tabs button.active {
  background: #f3f6fa;
  color: #101827;
  font-weight: 800;
}

.performance-chart {
  min-height: 360px;
  border-top: 1px solid #edf1f6;
  border-bottom: 1px solid #edf1f6;
  background: repeating-linear-gradient(to bottom, #fff 0, #fff 88px, #eef2f6 89px), repeating-linear-gradient(to right, transparent 0, transparent 48px, rgba(15, 23, 42, 0.04) 49px, transparent 84px);
  padding: 20px 18px 0;
  position: relative;
}

.performance-grid {
  height: 330px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  align-items: end;
  gap: 12px;
}

.performance-column {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: 8px;
  cursor: crosshair;
}

.performance-bar {
  display: block;
  width: min(34px, 70%);
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  background: #16a34a;
  opacity: 0.9;
}

.performance-bar.loss {
  background: #334155;
}

.performance-column small {
  color: #8a93a3;
  font-size: 11px;
}

.performance-legend {
  display: flex;
  gap: 26px;
  margin: 14px 0 22px;
  color: #667181;
  font-size: 12px;
}

.performance-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.performance-legend i {
  width: 14px;
  height: 14px;
  display: inline-block;
  background: #16a34a;
}

.performance-legend i.loss {
  background: #334155;
}

.performance-note {
  color: #667181;
  font-size: 12px;
}

.performance-crosshair {
  position: absolute;
  top: 20px;
  bottom: 26px;
  width: 1px;
  background: rgba(15, 23, 42, 0.24);
  pointer-events: none;
}

.performance-tooltip {
  position: absolute;
  z-index: 3;
  min-width: 170px;
  padding: 10px 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
  pointer-events: none;
}

.performance-tooltip strong,
.performance-tooltip span,
.performance-tooltip small {
  display: block;
}

.performance-tooltip strong {
  color: #111827;
  font-size: 12px;
}

.performance-tooltip span {
  color: #111827;
  font-weight: 800;
}

.performance-tooltip small {
  color: #667181;
  font-size: 11px;
}

.copy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.copy-card {
  min-width: 0;
}

.copy-command-heading {
  padding: 22px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f7fbff);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.copy-command-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.copy-command-strip article {
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.mini-profile-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
  position: relative;
  overflow: hidden;
}

.mini-profile-card:hover {
  transform: translateY(-2px);
  border-color: #b9c9dc;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.mini-profile-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #0f9146, #22c55e);
}

.mini-profile-card .panel-head {
  align-items: flex-start;
  gap: 12px;
  padding-top: 4px;
}

.mini-profile-card h2 {
  margin: 0;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.mini-profile-card .table-actions {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #edf1f6;
}

.copy-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.copy-metrics div {
  padding: 13px;
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  background: #fbfcfe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.copy-metrics strong,
.copy-metrics span {
  display: block;
}

.copy-metrics strong {
  overflow-wrap: anywhere;
}

.copy-metrics span {
  color: #6b7483;
  font-size: 12px;
}

.copy-compare-panel {
  overflow: hidden;
}

.copy-compare-scroll {
  overflow-x: auto;
}

.copy-compare-table {
  min-width: 1180px;
}

.copy-compare-table a {
  color: #101828;
  text-decoration: none;
}

.copy-compare-table a:hover {
  color: #0f9146;
}

.equity-sparkline {
  display: flex;
  align-items: end;
  gap: 4px;
  min-height: 72px;
  padding: 10px 0;
  border-top: 1px solid #edf1f6;
  border-bottom: 1px solid #edf1f6;
}

.equity-sparkline span {
  flex: 1 1 0;
  min-width: 5px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #22c55e, #0f9146);
}

.equity-sparkline.empty {
  align-items: center;
  color: #6b7483;
  font-size: 12px;
}

.equity-sparkline.empty span {
  background: none;
}

.provider-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: #6b7483;
  font-size: 13px;
}

.country-flag {
  display: inline-block;
  margin-right: 8px;
}

.star-rating {
  color: #e0a400;
  white-space: nowrap;
}

.admin-user-form,
.admin-provider-form {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #edf1f6;
}

.admin-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.admin-provider-row {
  align-items: flex-start;
}

.provider-admin-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.provider-admin-metrics span {
  padding: 5px 8px;
  border: 1px solid #edf1f6;
  border-radius: 999px;
  background: #fbfcfe;
  color: #344054;
  font-size: 12px;
  line-height: 1.2;
}

@media (max-width: 700px) {
  .admin-check-grid {
    grid-template-columns: 1fr;
  }
}

.risk-validation {
  border: 1px solid #e7edf5;
  border-radius: 7px;
  background: #fbfcfe;
  padding: 14px;
  margin-bottom: 14px;
}

.risk-validation.warning {
  border-color: #f1d38a;
  background: #fffaf0;
}

.risk-validation.blocked {
  border-color: #f0b8bd;
  background: #fff6f7;
}

.risk-validation ul {
  margin: 10px 0 0 18px;
  color: #384152;
  font-size: 13px;
}

.risk-question-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.panel {
  padding: 20px;
  margin-bottom: 18px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head h2 {
  font-size: 18px;
  margin: 0;
}

.table-lite {
  width: 100%;
  border-collapse: collapse;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.scroll-hint {
  display: none;
  margin: -6px 0 10px;
  color: #7a8494;
  font-size: 12px;
}

.table-lite th,
.table-lite td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  font-size: 14px;
}

.table-lite th {
  color: #6b7483;
  font-size: 12px;
  text-transform: uppercase;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d7deea;
  border-radius: 6px;
  color: #17213a;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.table-actions button:hover {
  border-color: #b9c6d7;
  background: #f4f7fb;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.green {
  background: #eaf8f0;
  color: #126335;
}

.badge.amber {
  background: #fff8e5;
  color: #85600f;
}

.badge.red {
  background: #fff1f1;
  color: #9f1117;
}

.watch-list,
.activity-list,
.quick-list {
  display: grid;
  gap: 10px;
}

.quick-list .quick-link {
  color: #17213a;
  background: #fbfcfe;
  border: 1px solid #edf1f6;
}

.quick-list .quick-link:hover {
  background: #f2f6fb;
  color: #0d1320;
}

.watch-row,
.activity-row,
.kyc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #edf1f6;
  border-radius: 7px;
  background: #fbfcfe;
  min-width: 0;
}

.symbol {
  font-weight: 800;
  color: #101a33;
}

.muted {
  color: #6b7483;
  font-size: 13px;
}

.positive {
  color: #0f9146;
}

.negative {
  color: #c6262e;
}

.risk-strip {
  border-left: 4px solid #c69a2b;
  background: #fffaf0;
  color: #6f530f;
  padding: 14px 16px;
  border-radius: 7px;
  font-size: 13px;
}

.admin-shell .side-nav {
  background: #161018;
}

.admin-shell .side-nav a.active,
.admin-shell .side-nav a:hover {
  background: #2a1a2b;
}

.admin-shell .avatar,
.admin-accent {
  background: #7c2d8f;
}

/* Institutional admin */
.admin-body {
  background: #eef2f7;
  color: #111827;
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: #0b1220;
  color: #e5edf8;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.admin-brand strong,
.admin-brand span {
  display: block;
}

.admin-brand span,
.admin-nav-group-title,
.admin-profile span {
  color: #91a0b6;
  font-size: 12px;
}

.admin-drawer-close,
.admin-backdrop {
  display: none;
}

.admin-nav {
  padding: 14px 12px 28px;
}

.admin-nav-group {
  margin-bottom: 18px;
}

.admin-nav-group-title {
  padding: 8px 10px;
  text-transform: uppercase;
  font-weight: 800;
}

.admin-nav button.admin-nav-group-title {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #91a0b6;
  cursor: pointer;
}

.admin-nav-group[data-open="false"] .admin-nav-group-links {
  display: none;
}

.admin-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 7px;
  color: #d7e0ed;
  font-size: 14px;
}

.admin-nav a:hover,
.admin-nav a.active {
  color: #fff;
  background: #1c2a3f;
}

.admin-nav a[data-locked="true"] {
  color: #728197;
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 70px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #dfe6ef;
}

.admin-menu-toggle {
  display: none;
}

.admin-search input,
.admin-filterbar input,
.admin-filterbar select,
.admin-setting-grid input,
.admin-setting-grid select,
.admin-setting-grid textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d5deea;
  border-radius: 7px;
  background: #fff;
  color: #111827;
  padding: 9px 11px;
  font: inherit;
}

.admin-top-actions,
.admin-profile,
.admin-page-actions,
.admin-filterbar,
.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-top-actions button,
.admin-page-actions button,
.admin-row-actions button,
.admin-modal button,
.admin-menu-toggle,
.admin-drawer-close {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #d6deea;
  border-radius: 7px;
  background: #fff;
  color: #122033;
  font-weight: 800;
  cursor: pointer;
}

.admin-top-actions button[data-logout],
.admin-row-actions button[data-danger],
.admin-modal [data-admin-modal-confirm] {
  color: #fff;
  border-color: #b91c1c;
  background: #b91c1c;
}

.admin-alert-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #eef4ff;
  color: #214a8f;
  font-size: 12px;
  font-weight: 900;
}

.admin-profile {
  min-width: 0;
}

.admin-profile strong {
  display: block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-content {
  width: min(100%, 1520px);
  margin: 0 auto;
  padding: 24px;
}

.admin-breadcrumbs {
  margin-bottom: 10px;
  color: #667085;
  font-size: 13px;
}

.admin-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-page-head h1 {
  margin-bottom: 6px;
  font-size: 30px;
  line-height: 1.1;
}

.admin-page-head p {
  max-width: 820px;
  margin: 0;
  color: #667085;
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.admin-metric,
.admin-panel,
.admin-table-card {
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.admin-metric {
  padding: 16px;
  min-width: 0;
}

.admin-metric span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.admin-grid-2,
.admin-grid-3 {
  display: grid;
  gap: 16px;
}

.admin-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-panel {
  padding: 18px;
  min-width: 0;
  margin-bottom: 16px;
}

.admin-panel h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.admin-filterbar {
  margin-bottom: 14px;
}

.admin-filterbar > * {
  flex: 1 1 160px;
}

.admin-table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.admin-table th {
  color: #667085;
  font-size: 11px;
  text-transform: uppercase;
}

.admin-mobile-list {
  display: none;
}

.admin-card-row {
  padding: 14px;
  border: 1px solid #e3e9f2;
  border-radius: 8px;
  background: #fbfcfe;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-card-row + .admin-card-row {
  margin-top: 10px;
}

.admin-kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 10px;
  margin: 10px 0;
  color: #475467;
  font-size: 13px;
  min-width: 0;
}

.admin-kv > *,
.admin-card-row strong,
.admin-card-row code,
.admin-panel code {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.admin-status.green,
.admin-status.active,
.admin-status.approved,
.admin-status.healthy,
.admin-status.ok {
  background: #eaf8f0;
  color: #126335;
}

.admin-status.amber,
.admin-status.pending,
.admin-status.queue,
.admin-status.placeholder,
.admin-status.warning,
.admin-status.under_review {
  background: #fff8e5;
  color: #85600f;
}

.admin-status.red,
.admin-status.suspended,
.admin-status.rejected,
.admin-status.failed,
.admin-status.disabled,
.admin-status.error {
  background: #fff1f1;
  color: #9f1117;
}

.admin-setting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-setting-grid label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.admin-wide {
  grid-column: 1 / -1;
}

.admin-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.admin-field textarea {
  min-height: 96px;
  border: 1px solid #d5deea;
  border-radius: 7px;
  padding: 9px 11px;
  font: inherit;
}

.admin-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-check-list label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.admin-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-setting-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.admin-toast {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 7px;
  background: #eef4ff;
  color: #214a8f;
  font-weight: 800;
}

.admin-empty,
.admin-error {
  padding: 18px;
  border: 1px dashed #c8d3e0;
  border-radius: 8px;
  background: #fbfcfe;
  color: #667085;
}

.admin-error {
  border-color: #f0b8bd;
  background: #fff6f7;
  color: #9f1117;
}

.admin-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-skeleton-grid span {
  min-height: 118px;
  border-radius: 8px;
  background: linear-gradient(90deg, #edf2f7, #f8fafc, #edf2f7);
  background-size: 220% 100%;
  animation: admin-skeleton 1.2s ease infinite;
}

@keyframes admin-skeleton {
  to { background-position: -220% 0; }
}

.admin-modal {
  width: min(520px, calc(100% - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
}

.admin-modal::backdrop {
  background: rgba(9, 14, 23, 0.58);
}

.admin-modal header,
.admin-modal footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #edf1f6;
}

.admin-modal footer {
  border-top: 1px solid #edf1f6;
  border-bottom: 0;
}

.admin-modal [data-admin-modal-body] {
  max-height: 60vh;
  overflow-y: auto;
  padding: 16px;
}

@media (max-width: 1180px) {
  .admin-metric-grid,
  .admin-skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    width: min(310px, calc(100vw - 40px));
    transform: translateX(-105%);
    transition: transform 180ms ease;
    display: none;
  }

  .admin-drawer-open .admin-sidebar {
    display: block;
    transform: translateX(0);
  }

  .admin-drawer-open .admin-backdrop {
    display: block;
    position: fixed;
    z-index: 25;
    inset: 0;
    border: 0;
    background: rgba(9, 14, 23, 0.55);
  }

  .admin-drawer-close,
  .admin-menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .admin-topbar {
    grid-template-columns: auto 1fr;
  }

  .admin-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .admin-top-actions {
    justify-content: flex-end;
  }

  .admin-top-actions > button:not([data-logout]),
  .admin-profile div {
    display: none;
  }

  .admin-page-head,
  .admin-grid-2,
  .admin-grid-3 {
    display: block;
  }
}

@media (max-width: 640px) {
  .admin-content,
  .admin-topbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .admin-page-head h1 {
    font-size: 24px;
  }

  .admin-metric-grid,
  .admin-skeleton-grid,
  .admin-setting-grid {
    grid-template-columns: 1fr;
  }

  .admin-panel {
    padding: 14px;
  }

  .admin-table-wrap {
    display: none;
  }

  .admin-mobile-list {
    display: block;
  }

  .admin-kv {
    grid-template-columns: 92px 1fr;
  }

  .admin-row-actions button,
  .admin-page-actions button {
    flex: 1 1 100%;
  }
}

@media (max-width: 1020px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: fixed;
    z-index: 20;
    inset: 0 auto 0 0;
    width: min(292px, calc(100vw - 48px));
    transform: translateX(-100%);
    transition: transform 180ms ease;
    display: none;
  }

  .drawer-close-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .side-brand {
    margin-bottom: 14px;
  }

  .nav-account-panel {
    display: block;
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid #27344a;
    border-radius: 10px;
    background: #101827;
  }

  .nav-account-panel .topbar-account {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    justify-content: stretch;
  }

  .nav-account-panel .topbar-account > span,
  .nav-account-panel .topbar-account > strong,
  .nav-account-panel .notification-bell,
  .nav-account-panel .topbar-account-select,
  .nav-account-panel .topbar-account button,
  .nav-account-panel .profile-pill {
    width: 100%;
    min-width: 0;
    justify-content: center;
    border-color: #2c3a52;
    background-color: #172235;
    color: #f8fafc;
    box-shadow: none;
  }

  .nav-account-panel .topbar-account-select {
    background-color: #172235;
    color: #f8fafc;
  }

  .drawer-open .side-nav {
    display: block;
    transform: translateX(0);
  }

  .drawer-open .drawer-backdrop {
    display: block;
    position: fixed;
    z-index: 15;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(9, 14, 23, 0.48);
  }

  .drawer-button {
    display: inline-flex;
    align-items: center;
  }

  .portal-topbar .topbar-account {
    display: none;
  }

  .dashboard-grid,
  .content-grid,
  .performance-kpis,
  .risk-question-grid {
    grid-template-columns: 1fr;
  }

  .performance-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .performance-tabs button:nth-child(2) {
    border-right: 0;
  }

  .performance-tabs button:nth-child(-n+2) {
    border-bottom: 1px solid #d7deea;
  }

  .app-topbar strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settings-shell {
    grid-template-columns: 1fr;
  }

  .settings-rail {
    position: static;
    display: flex;
    overflow-x: auto;
    padding: 8px;
  }

  .settings-rail a {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .portal-header-inner,
  .auth-main,
  .legal-footer {
    width: min(100% - 24px, 1450px);
  }

  .auth-main {
    padding: 30px 0 34px;
  }

  .auth-card,
  .auth-card.register {
    padding: 26px 18px;
  }

  .legal-footer {
    font-size: 11px;
  }

  .app-topbar,
  .workspace {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-heading {
    display: block;
  }

  .page-heading .actions {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }

  .page-heading .btn {
    width: 100%;
  }

  .panel {
    padding: 16px;
  }

  .settings-form-grid,
  .security-control-grid,
  .settings-status-grid,
  .copy-command-strip {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 23px;
  }

  .watch-row,
  .activity-row,
  .kyc-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .table-lite {
    min-width: 0;
  }

  .table-lite thead {
    display: none;
  }

  .table-lite,
  .table-lite tbody,
  .table-lite tr,
  .table-lite td {
    display: block;
    width: 100%;
  }

  .table-lite tr {
    border: 1px solid #edf1f6;
    border-radius: 7px;
    background: #fbfcfe;
    padding: 10px;
    margin-bottom: 10px;
  }

  .table-lite th,
  .table-lite td {
    padding: 7px 0;
    border-bottom: 0;
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .table-lite td {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    text-align: right;
  }

  .table-lite td::before {
    content: attr(data-label);
    color: #6b7483;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
  }

  .table-scroll {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .scroll-hint {
    display: none;
  }

  .market-table {
    display: block;
    max-width: 100%;
    table-layout: fixed;
    overflow-x: hidden;
  }

  .market-table th,
  .market-table td {
    padding: 10px 8px;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 12px;
  }
}

@media (max-width: 520px) {
  .topbar {
    display: none;
  }

  .nav-inner {
    width: min(100% - 24px, 1180px);
  }

  .nav-inner > .actions {
    display: none;
  }

  .nav-links {
    top: 76px;
    max-height: calc(100vh - 96px);
  }

  .public-nav-open .nav-backdrop {
    inset: 76px 0 0;
  }

  .logo {
    max-width: 118px;
    height: auto;
  }

  .hero-inner,
  .section-inner,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 27px;
  }

  .lead {
    font-size: 17px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .card,
  .risk {
    padding: 18px;
  }

  .portal-logo {
    max-width: 120px;
    height: auto;
  }

  .portal-tools {
    gap: 10px;
  }

  .legal-links {
    display: grid;
    gap: 8px;
  }

  .legal-links a::after {
    content: "" !important;
    margin: 0 !important;
  }

  .app-topbar {
    min-height: 64px;
    gap: 10px;
  }

  .profile-pill {
    padding: 6px;
  }

  .profile-pill span:not(.avatar) {
    display: none;
  }

  .workspace {
    padding-top: 20px;
  }
}

@media (max-width: 360px) {
  .portal-header-inner,
  .auth-main,
  .legal-footer,
  .hero-inner,
  .section-inner,
  .footer-inner {
    width: min(100% - 20px, 1450px);
  }

  .auth-card,
  .auth-card.register {
    padding: 22px 14px;
  }

  .page-heading .actions {
    grid-template-columns: 1fr;
  }

  .workspace,
  .app-topbar {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Institutional client portal extensions */
.portal-topbar {
  gap: 14px;
}

.topbar-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.topbar-account > span,
.topbar-account > strong,
.notification-bell,
.topbar-account-select {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #e1e7f0;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

[data-topbar-account-type] {
  display: none !important;
}

.topbar-account-select {
  appearance: none;
  min-width: 132px;
  padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 16px) 14px, calc(100% - 11px) 14px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  font-weight: 700;
}

.notification-menu,
.profile-menu {
  position: relative;
}

.notification-bell {
  min-width: 42px;
  justify-content: center;
  cursor: pointer;
  font-weight: 800;
}

.notification-bell::before {
  content: "";
  width: 13px;
  height: 15px;
  margin-right: 6px;
  border: 2px solid #111827;
  border-top-left-radius: 9px;
  border-top-right-radius: 9px;
  border-bottom: 0;
}

.notification-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 60;
  width: min(340px, calc(100vw - 32px));
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
  padding: 8px;
}

.notification-item {
  padding: 10px;
  border-radius: 8px;
}

.notification-item[data-read="false"] {
  background: #f8fafc;
}

.notification-item strong,
.notification-item p,
.notification-item small {
  display: block;
}

.notification-item p {
  margin: 4px 0;
  color: #526071;
  font-size: 13px;
}

.notification-item small {
  color: #8a93a3;
  font-size: 11px;
}

.profile-menu .profile-pill {
  cursor: pointer;
}

.profile-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 60;
  width: min(320px, calc(100vw - 32px));
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
  padding: 10px;
}

.profile-popover-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 8px 12px;
  border-bottom: 1px solid #edf1f6;
}

.profile-popover-head strong,
.profile-popover-head small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-popover-head small,
.profile-detail-row span {
  color: #6b7483;
  font-size: 12px;
}

.profile-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid #f1f4f8;
}

.profile-detail-row strong {
  color: #111827;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.profile-settings-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 8px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.settings-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.settings-rail {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.settings-rail a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 7px;
  color: #17213a;
  font-size: 13px;
  font-weight: 800;
}

.settings-rail a:hover {
  background: #f3f6fb;
}

.settings-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.settings-panel .panel-head p {
  margin-top: 4px;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-form-grid [data-form-message],
.settings-form-grid .submit-wide {
  grid-column: 1 / -1;
}

.settings-form-grid label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.security-control-grid,
.settings-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.security-control-grid article,
.settings-status-grid article {
  min-width: 0;
  border: 1px solid #e4eaf2;
  border-radius: 8px;
  background: #fbfcfe;
  padding: 14px;
}

.security-control-grid article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
}

.security-control-grid p {
  margin: 5px 0 12px;
  color: #667085;
  font-size: 13px;
}

.security-control-grid button,
.security-control-grid .btn {
  min-height: 36px;
  width: fit-content;
  padding: 0 12px;
  border: 1px solid #cfd8e5;
  border-radius: 7px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.settings-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #111827;
  position: relative;
}

.settings-icon::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid #fff;
  border-radius: 4px;
}

.settings-icon.key::before {
  border-radius: 50%;
  width: 9px;
  height: 9px;
  inset: 8px auto auto 8px;
}

.settings-icon.key::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 16px;
  width: 10px;
  height: 2px;
  background: #fff;
}

.settings-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.settings-status-grid span,
.settings-status-grid small {
  display: block;
  color: #667085;
  font-size: 12px;
}

.settings-status-grid strong {
  display: block;
  margin: 5px 0;
  color: #111827;
  font-size: 18px;
}

.server-time-block {
  display: inline-grid;
  gap: 2px;
  min-width: 138px;
  text-align: left;
  line-height: 1.2;
}

.server-time-block strong {
  font-size: 11px;
  text-transform: uppercase;
}

.server-time-block span {
  font-size: 12px;
  font-weight: 800;
}

.support-ticket-form {
  display: grid;
  gap: 12px;
}

.support-ticket-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 860px) {
  [data-portal-page="settings"] {
    overflow-x: hidden;
  }

  .settings-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .settings-rail {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 0 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
    scroll-snap-type: x mandatory;
  }

  .settings-rail a {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #dce5ef;
    border-radius: 999px;
    background: #fff;
    scroll-snap-align: start;
  }

  .settings-stack,
  .settings-panel,
  .settings-form-grid,
  .security-control-grid,
  .settings-status-grid,
  .settings-toggle-list,
  .settings-actions {
    min-width: 0;
    width: 100%;
  }

  .settings-form-grid,
  .security-control-grid,
  .settings-status-grid {
    grid-template-columns: 1fr;
  }

  .settings-panel .panel-head {
    align-items: flex-start;
    gap: 10px;
  }

  .security-control-grid article {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 14px;
  }

  .security-control-grid button,
  .security-control-grid .btn,
  .settings-form-grid .submit-wide,
  .settings-actions button {
    width: 100%;
    min-height: 44px;
  }

  .settings-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.settings-toggle-list {
  display: grid;
  gap: 10px;
}

.settings-toggle-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #e4eaf2;
  border-radius: 8px;
  background: #fbfcfe;
  color: #17213a;
  font-weight: 800;
}

.settings-actions {
  gap: 10px;
}

.copy-command-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.copy-command-strip article {
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.copy-command-strip span,
.copy-command-strip small {
  display: block;
  color: #667085;
  font-size: 12px;
}

.copy-command-strip strong {
  display: block;
  margin: 5px 0;
  color: #101828;
  font-size: 18px;
}

.realtime-market-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  border-color: #dbe4ef;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.market-sparkline {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 34px;
  margin: 12px 0;
  padding: 6px;
  border-radius: 7px;
  background: #f5f8fc;
}

.market-sparkline span {
  flex: 1;
  min-width: 4px;
  border-radius: 999px 999px 0 0;
  background: #143d74;
}

.market-sparkline.large {
  height: 58px;
}

.market-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.market-detail-modal .copy-metrics,
.trade-modal .copy-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.funding-form {
  display: grid;
  gap: 12px;
}

.account-card {
  position: relative;
  display: grid;
  gap: 12px;
}

.account-card.selected {
  border-color: #0f9146;
  box-shadow: 0 0 0 2px rgba(15, 145, 70, 0.12), var(--shadow-soft);
}

.account-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.account-plan-grid {
  display: grid;
  gap: 10px;
}

.account-plan-option {
  display: grid;
  gap: 4px;
  grid-template-columns: auto 1fr;
  align-items: start;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.account-plan-option input {
  margin-top: 3px;
}

.account-plan-option strong,
.account-plan-option span {
  grid-column: 2;
}

.account-plan-option span {
  color: #667085;
  font-size: 12px;
}

.open-account-modal {
  width: min(760px, calc(100vw - 24px));
}

.funding-method-row {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.9));
  color: #f8fafc;
  border-radius: 14px;
  padding: 16px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.16);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.funding-method-row + .funding-method-row {
  margin-top: 12px;
}

.funding-method-row.active,
.funding-method-row:focus-visible,
.funding-method-row:hover {
  border-color: rgba(34, 197, 94, 0.5);
  background: linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(7, 89, 66, 0.72));
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28), 0 0 0 3px rgba(34, 197, 94, 0.12);
  transform: translateY(-1px);
}

.funding-method-row:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.funding-method-copy {
  min-width: 0;
}

.funding-method-copy strong {
  display: block;
  color: #f8fafc;
  font-size: 0.98rem;
  letter-spacing: 0;
}

.funding-method-copy small,
.funding-method-copy em {
  display: block;
  font-style: normal;
  margin-top: 4px;
  color: #94a3b8;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.funding-method-copy em {
  color: #cbd5e1;
  font-size: 0.78rem;
}

.funding-method-row .badge.green {
  background: #0f9146;
  color: #fff;
  border-color: #0f9146;
  box-shadow: 0 6px 16px rgba(15, 145, 70, 0.22);
}

.funding-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 16px;
  display: inline-flex;
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(2, 6, 23, 0.22);
}

.funding-icon svg {
  width: 82%;
  height: 82%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}

.funding-icon-list {
  width: 56px;
  height: 56px;
}

.funding-icon-hero {
  width: 72px;
  height: 52px;
  border-radius: 16px;
}

.funding-icon-provider {
  width: 52px;
  height: 36px;
  border-radius: 12px;
  box-shadow: none;
}

.funding-icon-card,
.funding-icon-visa,
.funding-icon-mastercard {
  background: rgba(255, 255, 255, 0.98);
}

.funding-icon-crypto {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.95), rgba(15, 23, 42, 0.98));
}

.funding-icon-mpesa {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.95), rgba(5, 46, 22, 0.98));
}

.funding-icon-skrill {
  background: linear-gradient(135deg, rgba(76, 13, 63, 0.98), rgba(112, 26, 117, 0.96));
}

.funding-modal {
  width: min(760px, calc(100vw - 24px));
  max-height: min(860px, calc(100vh - 24px));
  border: 0;
  border-radius: 18px;
  padding: 0;
  color: #e5e7eb;
  background: linear-gradient(145deg, #050816, #111827 54%, #07131f);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
  overflow: hidden;
}

.funding-modal::backdrop {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.funding-modal form {
  max-height: inherit;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.funding-modal header,
.funding-modal footer {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.funding-modal footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  border-bottom: 0;
  background: rgba(2, 6, 23, 0.38);
}

.funding-modal-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.funding-modal-title strong {
  display: block;
  color: #f8fafc;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.funding-modal-title p {
  margin: 4px 0 0;
  color: #94a3b8;
  line-height: 1.4;
  max-width: 560px;
}

.funding-modal section {
  padding: 20px;
  display: grid;
  gap: 16px;
  overflow: auto;
  min-height: 0;
}

.funding-modal label {
  display: grid;
  gap: 8px;
  font-size: 0.86rem;
  color: #cbd5e1;
  font-weight: 700;
}

.funding-modal input,
.funding-modal select {
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.74);
  color: #f8fafc;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.funding-modal input::placeholder {
  color: #64748b;
}

.funding-modal input:focus,
.funding-modal select:focus {
  border-color: rgba(34, 197, 94, 0.62);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.13);
  background: rgba(15, 23, 42, 0.96);
}

.funding-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.funding-facts span {
  min-height: 84px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 14px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.funding-facts small,
.provider-card small,
.card-brand-preview small,
.funding-info-panel span {
  display: block;
  color: #94a3b8;
  line-height: 1.4;
}

.funding-facts strong {
  display: block;
  margin-top: 8px;
  color: #f8fafc;
  line-height: 1.25;
}

.card-brand-preview {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.56);
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-brand-preview strong,
.provider-card strong,
.funding-info-panel strong {
  display: block;
  color: #f8fafc;
}

.card-brand-preview span {
  display: block;
  color: #cbd5e1;
  margin: 3px 0;
  line-height: 1.35;
}

.provider-card,
.funding-info-panel,
.funding-requirement {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  padding: 13px;
  background: rgba(15, 23, 42, 0.58);
}

.provider-card {
  display: flex;
  align-items: center;
  gap: 13px;
}

.provider-card span {
  display: block;
  color: #cbd5e1;
  margin: 3px 0;
}

.funding-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible {
  border-color: rgba(248, 250, 252, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.funding-modal .btn-primary,
.funding-modal .btn-secondary {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.funding-modal .btn-primary {
  border: 1px solid rgba(34, 197, 94, 0.62);
  background: linear-gradient(135deg, #16a34a, #0f766e);
  color: #fff;
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.28);
}

.funding-modal .btn-secondary {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
}

.funding-secure-note {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 10px;
  background: rgba(22, 163, 74, 0.08);
  color: #bbf7d0;
  font-size: 12px;
  line-height: 1.45;
}

.crypto-payment-box {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
}

.crypto-payment-box img {
  width: min(180px, 100%);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: #fff;
}

.crypto-payment-box code {
  max-width: 100%;
  overflow-wrap: anywhere;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 6px;
  padding: 8px;
}

[data-crypto-countdown] {
  font-size: 1.6rem;
  color: #22c55e;
}

@media (max-width: 640px) {
  [data-portal-page="deposit"] .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .funding-method-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .funding-method-row .badge {
    grid-column: 2;
    justify-self: start;
  }

  .funding-icon-list {
    width: 52px;
    height: 52px;
  }

  .funding-modal {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
  }

  .funding-modal header,
  .funding-modal footer {
    padding: 14px;
  }

  .funding-modal-title {
    align-items: flex-start;
  }

  .funding-icon-hero {
    width: 62px;
    height: 46px;
  }

  .funding-modal section {
    padding: 14px;
  }

  .funding-facts,
  .funding-field-grid {
    grid-template-columns: 1fr;
  }

  .funding-facts span {
    min-height: auto;
  }

  .funding-modal footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .funding-modal .btn-primary,
  .funding-modal .btn-secondary {
    width: 100%;
  }
}

.admin-debug-output {
  margin-top: 14px;
  max-height: 420px;
  overflow: auto;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #0b1220;
  color: #dbeafe;
  padding: 14px;
  font-size: 12px;
  white-space: pre-wrap;
}

.topbar-account button,
.trade-ticket button,
.market-card button,
.inline-message-form button,
.table-actions button {
  min-height: 38px;
  border: 1px solid #cfd8e5;
  border-radius: 6px;
  background: #fff;
  color: #17213a;
  font-weight: 700;
  padding: 0 12px;
}

.topbar-account button:hover,
.trade-ticket button:hover,
.market-card button:hover,
.inline-message-form button:hover,
.table-actions button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.trading-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.85fr) minmax(320px, 2fr) minmax(250px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.trade-side-panel,
.trade-chart-panel,
.trade-ticket,
.market-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.trade-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.chart-placeholder {
  min-height: 430px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(17, 24, 39, 0.04) 1px, transparent 1px),
    #f8fafc;
  background-size: 36px 36px;
  color: #111827;
  text-align: center;
}

.chart-placeholder span {
  font-size: 22px;
  font-weight: 800;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.segmented button.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.trade-ticket form {
  display: grid;
  gap: 12px;
}

.trading-terminal {
  padding: 0;
  overflow: hidden;
  background: #11151a;
  color: #e5e7eb;
}

.terminal-topbar {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 8px;
  border-bottom: 1px solid #242a33;
  background: #151a21;
}

.terminal-topbar select,
.terminal-topbar button {
  min-height: 30px;
  border: 1px solid #2d3542;
  border-radius: 4px;
  background: #0f141b;
  color: #d8dee8;
  padding: 0 9px;
}

.terminal-topbar [data-trade-symbols] {
  min-width: 190px;
}

.terminal-body {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 220px;
  min-height: 520px;
}

.terminal-tools {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 8px 6px;
  background: #0e1319;
  border-right: 1px solid #242a33;
}

.terminal-tools button {
  width: 30px;
  height: 30px;
  border: 1px solid #2d3542;
  border-radius: 4px;
  background: #151a21;
  color: #d8dee8;
  font-size: 11px;
}

.terminal-canvas-wrap {
  position: relative;
  min-width: 0;
  min-height: 520px;
  background: #fff;
}

.terminal-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.trading-terminal.crosshair-enabled .terminal-canvas-wrap canvas {
  cursor: crosshair;
}

.terminal-price-label {
  position: absolute;
  top: 10px;
  left: 12px;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.88);
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.terminal-symbols {
  border-left: 1px solid #242a33;
  background: #151a21;
  padding: 10px;
  overflow: auto;
}

.terminal-symbols input {
  margin-bottom: 10px;
  background: #0f141b;
  color: #e5e7eb;
  border-color: #2d3542;
}

.terminal-symbols button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  border: 0;
  border-bottom: 1px solid #252d38;
  background: transparent;
  color: #e5e7eb;
  padding: 10px 2px;
  text-align: left;
}

.terminal-symbols button span {
  grid-column: 1 / -1;
  color: #9aa4b2;
  font-size: 11px;
}

.terminal-symbols button b {
  color: #14b8a6;
  font-size: 11px;
}

.terminal-bottom {
  border-top: 1px solid #242a33;
  background: #101419;
  min-height: 118px;
  font-size: 12px;
}

.terminal-table-head,
.terminal-position-row {
  display: grid;
  grid-template-columns: 1.1fr 0.7fr 0.7fr 1fr 1fr 1fr 0.8fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #242a33;
}

.terminal-table-head {
  color: #9aa4b2;
  font-weight: 800;
}

.terminal-empty {
  display: grid;
  min-height: 72px;
  place-items: center;
  color: #9aa4b2;
}

.market-mini-graph {
  width: 100%;
  height: 42px;
  display: block;
}

.market-mini-graph polyline {
  fill: none;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.market-mini-graph.up polyline {
  stroke: #0f9146;
}

.market-mini-graph.down polyline {
  stroke: #dc2626;
}

.market-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.activity-list.compact {
  margin: 14px 0;
}

.chat-transcript {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.chat-transcript p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.inline-message-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.support-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  width: min(320px, calc(100vw - 28px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.2);
}

@media (max-width: 1180px) {
  .trading-layout {
    grid-template-columns: 1fr;
  }

  .market-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terminal-body {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .terminal-symbols {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid #242a33;
    max-height: 190px;
  }
}

@media (max-width: 760px) {
  .portal-topbar {
    align-items: stretch;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .topbar-account {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 8px;
  }

  .terminal-topbar {
    overflow-x: auto;
  }

  .terminal-canvas-wrap {
    min-height: 380px;
  }

  .terminal-table-head,
  .terminal-position-row {
    min-width: 620px;
  }

  .terminal-bottom {
    overflow-x: auto;
  }

  .topbar-account .profile-pill,
  .topbar-account > span,
  .topbar-account > strong,
  .topbar-account button,
  .topbar-account-select,
  .notification-menu,
  .notification-bell,
  .profile-menu {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .topbar-account .profile-pill {
    max-width: 100%;
  }

  .notification-popover,
  .profile-popover {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 16px;
    width: auto;
    max-height: min(70vh, 420px);
  }

  .trade-toolbar,
  .market-card-grid,
  .inline-message-form {
    grid-template-columns: 1fr;
  }

  .chart-placeholder {
    min-height: 280px;
  }
}

.terminal-body-page {
  margin: 0;
  overflow: hidden;
  background: #080d14;
  color: #d8e2ef;
}

/* Premium trading board and copy-trading marketplace */
.markets-workspace,
.copy-trading-workspace {
  min-height: calc(100vh - 72px);
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 34%),
    linear-gradient(180deg, #0b111b 0%, #101725 46%, #111827 100%);
  color: #e7edf7;
}

.markets-workspace .muted,
.copy-trading-workspace .muted {
  color: #94a3b8;
}

.market-command-heading,
.copy-command-heading {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(17, 24, 39, 0.82));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
}

.markets-workspace .page-heading h1,
.copy-trading-workspace .page-heading h1 {
  color: #f8fafc;
  font-size: clamp(24px, 2vw, 32px);
}

.markets-workspace .page-heading p,
.copy-trading-workspace .page-heading p {
  color: #a7b4c7;
}

.premium-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.premium-eyebrow span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.09);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.markets-workspace .panel,
.copy-trading-workspace .panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.markets-workspace .panel-head,
.copy-trading-workspace .panel-head {
  padding: 16px 16px 0;
}

.markets-workspace .panel-head h2,
.copy-trading-workspace .panel-head h2 {
  color: #f8fafc;
  font-size: 16px;
}

.markets-workspace .filter-grid,
.copy-trading-workspace .filter-grid {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 10px;
  padding: 16px;
  margin: 0;
}

.markets-workspace .input-control,
.markets-workspace .select-control,
.copy-trading-workspace .input-control,
.copy-trading-workspace .select-control {
  min-height: 40px;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.42);
  color: #e5edf8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.markets-workspace .input-control:focus,
.markets-workspace .select-control:focus,
.copy-trading-workspace .input-control:focus,
.copy-trading-workspace .select-control:focus {
  border-color: rgba(34, 197, 94, 0.68);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.13);
  outline: 0;
}

.copy-command-strip {
  margin-bottom: 14px;
}

.copy-command-strip article {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  column-gap: 12px;
  padding: 14px;
  border-color: rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.68));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.copy-command-strip i,
.market-asset-icon,
.provider-avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.2), rgba(15, 23, 42, 0.8));
  color: #d1fae5;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.copy-command-strip span,
.copy-command-strip strong,
.copy-command-strip small {
  grid-column: 2;
}

.copy-command-strip strong {
  color: #f8fafc;
  font-size: 18px;
}

.copy-filter-panel {
  margin: 14px 0;
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 16px 16px;
}

.active-filter-chips span {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 5px 9px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.08);
  font-size: 12px;
}

.copy-grid {
  gap: 14px;
}

.premium-provider-card {
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.9)),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 32%);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.premium-provider-card:hover,
.premium-provider-card.is-selected {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, 0.46);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.3);
}

.premium-provider-card::before {
  height: 2px;
  background: linear-gradient(90deg, #22c55e, rgba(34, 197, 94, 0));
}

.provider-card-head,
.market-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.provider-card-head > div:nth-child(2),
.market-symbol-lockup > div {
  min-width: 0;
}

.provider-card-head h2,
.market-card h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 17px;
  line-height: 1.2;
}

.provider-card-head p,
.market-symbol-lockup p {
  margin: 3px 0 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.35;
}

.provider-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #9fb0c7;
  font-size: 12px;
}

.star-rating {
  color: #fbbf24;
  letter-spacing: 1px;
}

.copy-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.copy-kpi-row div,
.provider-stat-list div,
.copy-trading-workspace .copy-metrics div,
.market-quote-row div {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.32);
  padding: 9px;
}

.copy-kpi-row strong,
.provider-stat-list strong,
.copy-trading-workspace .copy-metrics strong,
.market-quote-row strong {
  display: block;
  color: #f8fafc;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.copy-kpi-row span,
.provider-stat-list span,
.copy-trading-workspace .copy-metrics span,
.market-quote-row span {
  color: #91a1b7;
  font-size: 11px;
}

.provider-stat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.provider-stat-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
}

.equity-sparkline {
  min-height: 62px;
  padding: 8px 0;
  border-color: rgba(148, 163, 184, 0.14);
}

.equity-sparkline svg {
  width: 100%;
  height: 58px;
  display: block;
}

.equity-sparkline polygon {
  fill: rgba(34, 197, 94, 0.12);
}

.equity-sparkline polyline {
  fill: none;
  stroke: #22c55e;
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.provider-capacity,
.market-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #94a3b8;
  font-size: 12px;
}

.provider-capacity strong {
  color: #e2e8f0;
}

.copy-trading-workspace .tag-row {
  gap: 6px;
}

.copy-trading-workspace .table-actions,
.markets-workspace .table-actions,
.market-actions {
  gap: 8px;
}

.copy-trading-workspace button,
.copy-trading-workspace .btn,
.markets-workspace button,
.markets-workspace .btn {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.88);
  color: #e5edf8;
  font-weight: 800;
}

.copy-trading-workspace .btn-primary,
.copy-trading-workspace button:not(.subtle),
.markets-workspace .btn-primary,
.markets-workspace button:not(.subtle) {
  border-color: rgba(34, 197, 94, 0.42);
  background: linear-gradient(180deg, #22c55e, #15803d);
  color: #04130a;
}

.copy-trading-workspace .subtle,
.markets-workspace .subtle {
  background: rgba(148, 163, 184, 0.08);
  color: #cbd5e1;
}

.positive {
  color: #4ade80 !important;
}

.negative {
  color: #f87171 !important;
}

.warning {
  color: #fbbf24 !important;
}

.copy-compare-panel {
  margin: 14px 0;
}

.copy-compare-scroll,
.market-table-wrap {
  overflow-x: auto;
  padding: 0 16px 16px;
}

.premium-copy-table,
.premium-market-table {
  border-collapse: separate;
  border-spacing: 0;
  color: #dbe6f3;
}

.premium-copy-table {
  min-width: 1160px;
}

.premium-market-table {
  min-width: 1040px;
}

.premium-copy-table th,
.premium-market-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111827;
  color: #9fb0c7;
  font-size: 11px;
  text-transform: uppercase;
  padding: 10px 8px;
}

.premium-copy-table td,
.premium-market-table td {
  border-bottom-color: rgba(148, 163, 184, 0.14);
  color: #dbe6f3;
  vertical-align: middle;
  padding: 10px 8px;
  font-size: 12px;
}

.premium-copy-table tr:hover td,
.premium-copy-table tr.is-selected td,
.premium-market-table tr:hover td {
  background: rgba(34, 197, 94, 0.06);
}

.provider-table-cell,
.market-table-symbol,
.market-symbol-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.provider-table-cell small,
.market-table-symbol small {
  display: block;
  color: #94a3b8;
  font-size: 11px;
}

.premium-copy-table .table-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.premium-copy-table .table-actions > * {
  min-height: 30px;
  padding: 0 8px;
  font-size: 11px;
  text-align: center;
}

.premium-copy-table .provider-actions {
  width: 92px;
}

.premium-copy-table .provider-actions > * {
  min-height: 27px;
  padding: 0 5px;
  font-size: 10px;
  line-height: 1.12;
  white-space: normal;
}

.copy-trading-workspace .watch-row {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.34);
  color: #dbe6f3;
}

.copy-trading-workspace .watch-row span {
  color: #94a3b8;
}

.market-header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.market-time {
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.markets-terminal {
  overflow: hidden;
}

.market-view-toggle {
  min-height: 40px;
  align-self: stretch;
  background: rgba(2, 6, 23, 0.3);
}

.markets-workspace .market-view-toggle button {
  border-color: rgba(148, 163, 184, 0.18);
  background: transparent;
  color: #94a3b8;
}

.markets-workspace .market-view-toggle button.active {
  background: rgba(34, 197, 94, 0.16);
  color: #dcfce7;
}

.market-card-grid {
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
}

.market-card-grid.is-table-view {
  display: block;
}

.market-card {
  min-height: 260px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.88)),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.1), transparent 35%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transition: transform 160ms ease, border-color 160ms ease;
}

.market-skeleton {
  min-height: 260px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.06), rgba(148, 163, 184, 0.16), rgba(148, 163, 184, 0.06)),
    rgba(15, 23, 42, 0.82);
  background-size: 220% 100%;
  animation: marketSkeleton 1.3s ease-in-out infinite;
}

@keyframes marketSkeleton {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.market-card.down {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.88)),
    radial-gradient(circle at top right, rgba(248, 113, 113, 0.1), transparent 35%);
}

.market-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, 0.42);
}

.market-mini-graph {
  height: 58px;
  margin: 12px 0;
  color: #22c55e;
}

.market-mini-graph.down {
  color: #f87171;
}

.market-mini-graph polyline {
  stroke-width: 2.2;
}

.market-mini-graph.up polyline {
  stroke: #22c55e;
}

.market-mini-graph.down polyline {
  stroke: #f87171;
}

.market-quote-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.market-actions {
  display: flex;
  margin-top: 12px;
}

.market-actions button {
  flex: 1;
  min-height: 36px;
}

.premium-empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 190px;
  padding: 24px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  color: #94a3b8;
  text-align: center;
  background: rgba(15, 23, 42, 0.5);
}

.premium-empty-state strong {
  color: #f8fafc;
}

.copy-compare-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 80;
  width: min(980px, calc(100vw - 28px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.2fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(34, 197, 94, 0.34);
  border-radius: 10px;
  background: rgba(8, 13, 22, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  color: #e5edf8;
}

.copy-compare-bar strong,
.copy-compare-bar span {
  display: block;
}

.copy-compare-bar span {
  color: #94a3b8;
  font-size: 12px;
}

.compare-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.compare-pills button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 11px;
}

.copy-compare-modal,
.copy-trade-modal {
  width: min(1120px, calc(100vw - 24px));
}

.copy-compare-modal header > div,
.copy-trade-modal header > div {
  display: grid;
  gap: 4px;
}

.copy-compare-modal header span,
.copy-trade-modal header span {
  display: block;
}

.copy-compare-modal section,
.copy-trade-modal section {
  display: grid;
  gap: 14px;
}

.comparison-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.comparison-provider-grid article,
.comparison-chart-grid article,
.copy-modal-step {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 12px;
  background: rgba(2, 6, 23, 0.38);
}

.comparison-provider-grid article {
  display: grid;
  gap: 7px;
}

.comparison-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.comparison-chart-grid h3,
.copy-modal-step h3 {
  margin: 0 0 10px;
  color: #f8fafc;
  font-size: 14px;
}

.compare-bar-meter {
  position: relative;
  height: 24px;
  margin: 5px 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.compare-bar-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #15803d, #22c55e);
}

.compare-bar-meter span.negative {
  background: linear-gradient(90deg, #991b1b, #f87171);
}

.compare-bar-meter strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #f8fafc;
  font-size: 11px;
}

.comparison-table {
  min-width: 760px;
}

.comparison-decision {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 10px;
  padding: 12px;
  background: rgba(34, 197, 94, 0.06);
}

.comparison-decision h3,
.comparison-decision p {
  grid-column: 1 / -1;
  margin: 0;
}

.comparison-decision span {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  padding: 8px;
}

.comparison-decision small,
.comparison-decision strong {
  display: block;
}

.copy-mode-grid,
.copy-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.copy-mode-grid label,
.copy-check-grid label {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 11px;
  background: rgba(15, 23, 42, 0.58);
  color: #dbe6f3;
}

.copy-mode-grid label.disabled {
  opacity: 0.55;
}

.copy-mode-grid strong,
.copy-mode-grid span {
  display: block;
}

.copy-mode-grid span,
.real-copy-blockers span {
  color: #94a3b8;
  font-size: 12px;
}

.real-copy-blockers {
  display: grid;
  gap: 4px;
  border-left: 3px solid #f59e0b;
  padding: 9px 11px;
  background: rgba(245, 158, 11, 0.08);
}

.copy-profile-shell {
  display: grid;
  gap: 14px;
}

.copy-profile-hero {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(17, 24, 39, 0.82));
}

.provider-avatar.large {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  font-size: 17px;
}

.copy-profile-hero h1 {
  margin: 4px 0 6px;
  color: #f8fafc;
  font-size: clamp(27px, 2.4vw, 38px);
}

.copy-profile-hero p {
  color: #a7b4c7;
  margin: 0 0 10px;
}

.profile-cta,
.profile-sticky-cta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.copy-profile-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.copy-profile-kpis article {
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 9px;
  padding: 10px;
  background: rgba(2, 6, 23, 0.34);
}

.copy-profile-kpis span,
.copy-profile-kpis strong {
  display: block;
}

.copy-profile-kpis span {
  color: #94a3b8;
  font-size: 11px;
}

.copy-profile-kpis strong {
  color: #f8fafc;
  font-size: 16px;
}

.profile-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 14px;
}

.profile-chart-main {
  grid-row: span 2;
}

.drawdown-bars {
  display: flex;
  align-items: start;
  gap: 8px;
  min-height: 130px;
  padding: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.13);
}

.drawdown-bars span {
  flex: 1;
  min-height: 8px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #f87171, #991b1b);
}

.monthly-return-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.monthly-return-grid span {
  border-radius: 8px;
  padding: 9px;
  color: #f8fafc;
}

.monthly-return-grid .profit {
  background: rgba(34, 197, 94, 0.18);
}

.monthly-return-grid .loss {
  background: rgba(248, 113, 113, 0.18);
}

.monthly-return-grid small,
.monthly-return-grid strong {
  display: block;
}

.profile-sticky-cta {
  position: sticky;
  bottom: 12px;
  z-index: 12;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(34, 197, 94, 0.26);
  border-radius: 10px;
  padding: 10px;
  background: rgba(8, 13, 22, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

@media (max-width: 1440px) {
  .market-card-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 1080px) {
  .markets-workspace .filter-grid,
  .copy-trading-workspace .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .copy-grid,
  .market-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .markets-workspace,
  .copy-trading-workspace {
    padding: 16px;
  }

  .market-command-heading,
  .copy-command-heading,
  .markets-workspace .page-heading,
  .copy-trading-workspace .page-heading {
    display: grid;
  }

  .markets-workspace .filter-grid,
  .copy-trading-workspace .filter-grid,
  .copy-command-strip,
  .copy-grid,
  .market-card-grid {
    grid-template-columns: 1fr;
  }

  .copy-kpi-row,
  .provider-stat-list,
  .market-quote-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .premium-copy-table,
  .premium-market-table,
  .premium-copy-table thead,
  .premium-market-table thead,
  .premium-copy-table tbody,
  .premium-market-table tbody,
  .premium-copy-table tr,
  .premium-market-table tr,
  .premium-copy-table td,
  .premium-market-table td {
    display: block;
    min-width: 0;
  }

  .premium-copy-table thead,
  .premium-market-table thead {
    display: none;
  }

  .premium-copy-table tr,
  .premium-market-table tr {
    margin-bottom: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.82);
    overflow: hidden;
  }

  .premium-copy-table td,
  .premium-market-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
  }

  .premium-copy-table td::before,
  .premium-market-table td::before {
    content: attr(data-label);
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
  }

  .copy-trading-workspace .table-actions,
  .markets-workspace .table-actions,
  .market-actions {
    width: 100%;
  }

  .copy-trading-workspace .table-actions > *,
  .markets-workspace .table-actions > *,
  .market-actions > * {
    flex: 1;
  }

  .copy-compare-bar {
    grid-template-columns: 1fr;
    bottom: 8px;
    max-height: 48vh;
    overflow: auto;
  }

  .comparison-chart-grid,
  .copy-mode-grid,
  .copy-check-grid,
  .profile-analytics-grid,
  .copy-profile-hero,
  .copy-profile-kpis {
    grid-template-columns: 1fr;
  }

  .profile-cta,
  .profile-sticky-cta {
    justify-content: stretch;
  }

  .profile-cta > *,
  .profile-sticky-cta > * {
    flex: 1;
  }

  .monthly-return-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.trading-workspace {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 46px 1fr;
  background: #080d14;
}

.terminal-appbar,
.chart-toolbar,
.terminal-tabs,
.panel-head.compact,
.terminal-userbar,
.terminal-status-strip,
.terminal-brand {
  display: flex;
  align-items: center;
}

.terminal-appbar {
  gap: 14px;
  padding: 0 12px;
  border-bottom: 1px solid #1b2735;
  background: #0b111a;
}

.terminal-brand {
  gap: 8px;
  color: #eef5ff;
  text-decoration: none;
  font-weight: 700;
  min-width: 230px;
}

.terminal-brand img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.terminal-status-strip {
  gap: 12px;
  flex: 1;
  color: #90a4bc;
  font-size: 12px;
}

.terminal-userbar {
  gap: 8px;
  font-size: 12px;
}

.terminal-userbar button,
.chart-toolbar button,
.drawing-rail button,
.terminal-tabs button,
.stake-chips button,
.mode-switch button,
.contract-tabs button,
.submit-wide {
  border: 1px solid #263649;
  background: #101926;
  color: #d8e2ef;
  border-radius: 6px;
  padding: 7px 9px;
  cursor: pointer;
}

.terminal-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  grid-template-rows: minmax(420px, 1fr) 230px;
  grid-template-areas: "chart market" "bottom bottom";
}

.trading-workspace.ticket-open .terminal-grid {
  grid-template-columns: minmax(0, 1fr) 270px 300px;
  grid-template-areas: "chart market ticket" "bottom bottom ticket";
}

.chart-shell {
  grid-area: chart;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 40px 1fr;
  border-right: 1px solid #1b2735;
  background: #f7faff;
}

.chart-toolbar {
  gap: 6px;
  padding: 4px 7px;
  border-bottom: 1px solid #1b2735;
  background: #0c131d;
  overflow-x: auto;
}

.chart-toolbar .terminal-select {
  width: auto;
  min-width: 118px;
  min-height: 30px;
  padding: 5px 8px;
}

.chart-toolbar button,
.compact-order-button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.toolbar-segment,
.contract-tabs,
.mode-switch,
.stake-chips {
  display: flex;
  gap: 4px;
}

.toolbar-segment button.active,
.contract-tabs button.active,
.mode-switch button.active,
.terminal-tabs button.active,
.drawing-rail button.active {
  background: #1e80ff;
  border-color: #3390ff;
  color: #fff;
}

.terminal-select,
.terminal-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #263649;
  border-radius: 6px;
  background: #0c1420;
  color: #e8f0fb;
  padding: 7px 9px;
}

.chart-stage {
  min-height: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
}

.drawing-rail {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 4px;
  border-right: 1px solid #d9e1ec;
  background: #f7faff;
}

.drawing-rail button {
  width: 29px;
  height: 29px;
  padding: 0;
  border-color: #d5deeb;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 1px 1px rgba(15, 23, 42, .04);
}

.chart-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fbfdff;
}

.tv-chart-host {
  position: absolute;
  inset: 0;
}

.chart-watermark {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(15, 23, 42, .045);
  font-size: clamp(42px, 9vw, 120px);
  font-weight: 800;
  letter-spacing: .04em;
  pointer-events: none;
}

.chart-instrument-card {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 14px;
  display: grid;
  gap: 3px;
  max-width: min(360px, calc(100% - 120px));
  padding: 9px 10px;
  border: 1px solid rgba(214, 222, 233, .88);
  border-radius: 6px;
  background: rgba(255, 255, 255, .78);
  color: #1e293b;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.chart-instrument-card strong {
  font-size: 17px;
}

.chart-instrument-card span,
.chart-instrument-card b {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.chart-session-strip {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: calc(100% - 28px);
  color: #475569;
  font-size: 11px;
  pointer-events: none;
}

.chart-session-strip span {
  padding: 5px 7px;
  border: 1px solid rgba(214, 222, 233, .88);
  border-radius: 5px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 5px 18px rgba(15, 23, 42, .06);
}

.chart-price-badge {
  position: absolute;
  z-index: 2;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 4px 0 0 4px;
  padding: 5px 7px;
  background: #089981;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(8, 153, 129, .28);
  pointer-events: none;
}

.market-panel {
  grid-area: market;
  min-height: 0;
  overflow: auto;
  border-right: 1px solid #1b2735;
  background: #0b111a;
}

.trade-ticket-panel {
  grid-area: ticket;
  min-height: 0;
  overflow: auto;
  background: #0d1520;
  border-left: 1px solid #1b2735;
  padding: 10px;
}

.trade-ticket-panel[hidden] {
  display: none;
}

.trade-ticket-panel form,
.symbol-card {
  display: grid;
  gap: 10px;
}

.panel-head.compact {
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid #1b2735;
}

.ticket-head-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.ticket-head-actions button {
  border: 1px solid #263649;
  border-radius: 5px;
  background: #101926;
  color: #cbd5e1;
  padding: 5px 7px;
  cursor: pointer;
}

.panel-head.compact h2 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.watchlist {
  display: grid;
}

.watchlist button,
.symbol-card {
  border: 0;
  border-bottom: 1px solid #172233;
  background: transparent;
  color: #d8e2ef;
  padding: 10px;
  text-align: left;
}

.watchlist button.active,
.watchlist button:hover {
  background: #111c2a;
}

.watchlist-row,
.symbol-metric,
.ticket-preview,
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.positive {
  color: #25c48f;
}

.negative {
  color: #ff5d6c;
}

.connection-dot::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #f59e0b;
}

.connection-dot.connected::before {
  background: #25c48f;
}

.connection-dot.stale::before,
.connection-dot.disconnected::before {
  background: #ff5d6c;
}

.terminal-bottom-panel {
  grid-area: bottom;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 40px 1fr;
  border-top: 1px solid #1b2735;
  background: #0a1018;
}

.terminal-tabs {
  gap: 4px;
  padding: 5px 8px;
  border-bottom: 1px solid #1b2735;
  overflow-x: auto;
}

.terminal-table {
  overflow: auto;
  font-size: 12px;
}

.terminal-row,
.terminal-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr .7fr .9fr .9fr .8fr .8fr;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #172233;
}

.terminal-head {
  color: #8296ad;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
}

.terminal-empty {
  padding: 24px;
  color: #8296ad;
}

.countdown-pill,
.badge {
  white-space: nowrap;
}

.risk-strip.compact {
  margin: 8px 0;
  padding: 8px;
  font-size: 12px;
}

.dashboard-workspace {
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 34%),
    linear-gradient(135deg, #07111f 0%, #0b1324 46%, #050914 100%);
  color: #dbeafe;
  min-height: calc(100vh - 64px);
  overflow-x: hidden;
}

.dashboard-workspace .dashboard-hero {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.82));
  box-shadow: 0 22px 56px rgba(2, 6, 23, 0.28);
}

.dashboard-workspace .page-heading h1 {
  color: #f8fafc;
}

.dashboard-workspace .page-heading p,
.dashboard-workspace .muted {
  color: #94a3b8;
}

.dashboard-hero-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.dashboard-workspace .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-workspace .btn,
.dashboard-workspace .table-actions .btn,
.dashboard-workspace .table-actions button,
.dashboard-workspace .minor-link {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  box-shadow: none;
}

.dashboard-workspace .btn-primary,
.dashboard-workspace .table-actions .btn-primary {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #03120a;
}

.premium-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.premium-kpi-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 16px;
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.88)),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.2), transparent 42%);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.26);
}

.premium-kpi-card.is-negative {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.88)),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.17), transparent 42%);
}

.kpi-topline,
.kpi-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: #86efac;
  font-size: 11px;
}

.kpi-value {
  color: #f8fafc;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1;
}

.kpi-meta {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.kpi-meta em {
  color: #86efac;
  font-style: normal;
  white-space: nowrap;
}

.dashboard-sparkline {
  width: 100%;
  height: 38px;
}

.dashboard-sparkline polyline {
  fill: none;
  stroke: #22c55e;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.72fr);
  grid-auto-flow: dense;
  gap: 12px;
  align-items: start;
}

.dashboard-workspace .panel {
  min-width: 0;
  padding: 14px;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.82);
  color: #e2e8f0;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.22);
}

.dashboard-workspace .panel-head h2 {
  color: #f8fafc;
}

.dashboard-performance-panel,
.dashboard-trades-panel {
  grid-column: 1;
}

.dashboard-market-panel,
.dashboard-transactions-panel,
.dashboard-health-panel,
.dashboard-copy-panel,
.dashboard-actions-panel,
.dashboard-alerts-panel {
  grid-column: 2;
}

.dashboard-range-tabs,
.dashboard-market-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dashboard-range-tabs button,
.dashboard-market-tabs button {
  min-height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.48);
  color: #94a3b8;
  font-weight: 800;
  font-size: 11px;
}

.dashboard-range-tabs button.active,
.dashboard-market-tabs button.active {
  color: #052e16;
  background: #22c55e;
}

.dashboard-performance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 10px;
}

.dashboard-equity-chart {
  min-height: 168px;
  display: grid;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.62));
}

.dashboard-equity-chart .dashboard-sparkline {
  height: 130px;
}

.dashboard-equity-chart .dashboard-sparkline polyline {
  stroke-width: 3;
}

.dashboard-performance-metrics,
.dashboard-copy-grid,
.dashboard-eligibility {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-performance-metrics span,
.dashboard-copy-grid span,
.dashboard-eligibility span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.36);
}

.dashboard-performance-metrics small,
.dashboard-copy-grid small,
.dashboard-eligibility small {
  color: #94a3b8;
  font-size: 11px;
}

.dashboard-table-wrap {
  overflow-x: auto;
}

.dashboard-table {
  min-width: 980px;
}

.dashboard-workspace .table-lite th {
  background: rgba(2, 6, 23, 0.72);
  color: #94a3b8;
  border-bottom-color: rgba(148, 163, 184, 0.16);
}

.dashboard-workspace .table-lite td {
  border-bottom-color: rgba(148, 163, 184, 0.12);
  color: #dbeafe;
}

.dashboard-table td small {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
}

.dashboard-ledger-list,
.dashboard-health-list,
.dashboard-alert-list {
  display: grid;
  gap: 7px;
}

.dashboard-ledger-list.compact .dashboard-ledger-row {
  padding: 9px 10px;
}

.dashboard-ledger-row,
.dashboard-alert,
.dashboard-watch-row {
  color: inherit;
  text-decoration: none;
}

.dashboard-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.34);
}

.dashboard-ledger-row span:last-child {
  text-align: right;
}

.dashboard-ledger-row small,
.dashboard-ledger-row em {
  display: block;
  margin-top: 4px;
}

.dashboard-watch-list {
  margin-top: 10px;
}

.dashboard-watch-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(82px, auto) minmax(72px, auto) 68px;
  align-items: center;
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.34);
  box-sizing: border-box;
  min-width: 0;
}

.dashboard-watch-row:hover,
.dashboard-ledger-row:hover,
.dashboard-alert:hover,
.dashboard-action-grid a:hover {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(15, 23, 42, 0.82);
}

.dashboard-watch-row .dashboard-sparkline {
  height: 24px;
  min-width: 0;
}

.dashboard-watch-row small {
  display: block;
  color: #94a3b8;
  font-size: 10px;
}

.dashboard-progress {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
  margin-bottom: 12px;
}

.dashboard-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.dashboard-health-list .kyc-card {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.34);
}

.dashboard-eligibility {
  margin-top: 12px;
}

.dashboard-eligibility .ok {
  border-color: rgba(34, 197, 94, 0.2);
}

.dashboard-eligibility .blocked {
  border-color: rgba(245, 158, 11, 0.26);
}

.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.dashboard-action-grid a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.34);
}

.dashboard-alert {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-left-width: 3px;
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.34);
}

.dashboard-alert.warning,
.dashboard-alert.info {
  border-left-color: #f59e0b;
}

.dashboard-alert.danger {
  border-left-color: #ef4444;
}

.dashboard-alert span,
.dashboard-alert em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.dashboard-risk-note {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.1);
  color: #f8e7bb;
}

.dashboard-workspace .premium-empty-state {
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.34);
  color: #dbeafe;
}

.dashboard-workspace .premium-empty-state.compact-empty {
  padding: 12px;
  min-height: auto;
}

.skeleton-block {
  min-height: 150px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.7), rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.7));
  background-size: 220% 100%;
  animation: dashboardSkeleton 1.4s ease-in-out infinite;
}

@keyframes dashboardSkeleton {
  0% { background-position: 0 0; }
  100% { background-position: -220% 0; }
}

@media (max-width: 1180px) {
  .premium-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-performance-panel,
  .dashboard-trades-panel,
  .dashboard-transactions-panel,
  .dashboard-market-panel,
  .dashboard-health-panel,
  .dashboard-copy-panel,
  .dashboard-actions-panel,
  .dashboard-alerts-panel {
    grid-column: 1;
  }
}

@media (max-width: 720px) {
  .dashboard-workspace {
    padding-left: 12px;
    padding-right: 12px;
  }

  .dashboard-workspace .dashboard-hero {
    padding: 14px;
  }

  .dashboard-workspace .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-action-grid,
  .premium-kpi-grid,
  .dashboard-performance-grid,
  .dashboard-performance-metrics,
  .dashboard-copy-grid,
  .dashboard-eligibility {
    grid-template-columns: 1fr;
  }

  .dashboard-watch-row,
  .dashboard-ledger-row {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .dashboard-workspace .dashboard-table {
    min-width: 0;
  }

  .dashboard-workspace .table-lite tr {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.38);
  }

  .dashboard-workspace .table-lite td {
    color: #dbeafe;
    text-align: right;
  }

  .dashboard-workspace .table-lite td::before {
    color: #94a3b8;
  }

  .dashboard-ledger-row span:last-child {
    text-align: left;
  }

  .dashboard-equity-chart {
    min-height: 160px;
  }

  .dashboard-equity-chart .dashboard-sparkline {
    height: 120px;
  }
}

.ticket-preview {
  padding: 10px;
  border: 1px solid #263649;
  border-radius: 6px;
  background: #0a111b;
}

.terminal-primary {
  background: #12845f;
  border-color: #1baa7c;
}

.submit-wide.danger {
  background: #7f1d1d;
  border-color: #b91c1c;
}

.advanced-ticket summary {
  cursor: pointer;
  color: #9fb0c4;
  margin-bottom: 8px;
}

.result-modal {
  width: min(520px, calc(100vw - 24px));
  border: 1px solid #263649;
  border-radius: 8px;
  background: #0d1520;
  color: #e8f0fb;
}

@media (max-width: 1180px) {
  .terminal-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(50vh, 1fr) 250px auto;
    grid-template-areas: "chart" "bottom" "market";
  }

  .trading-workspace.ticket-open .terminal-grid {
    grid-template-columns: minmax(0, 1fr) 285px;
    grid-template-rows: minmax(50vh, 1fr) 250px auto;
    grid-template-areas: "chart ticket" "bottom ticket" "market market";
  }
}

@media (max-width: 820px) {
  .terminal-body-page {
    overflow: auto;
  }

  .trading-workspace {
    min-height: 100dvh;
  }

  .terminal-appbar {
    min-height: 96px;
    flex-wrap: wrap;
    align-content: center;
  }

  .terminal-brand,
  .terminal-status-strip,
  .terminal-userbar {
    min-width: 0;
    width: 100%;
    flex-wrap: wrap;
  }

  .terminal-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(50dvh, 58dvh) auto auto;
    grid-template-areas: "chart" "bottom" "market";
  }

  .trading-workspace.ticket-open .terminal-grid {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(50dvh, 58dvh) auto auto auto;
    grid-template-areas: "chart" "ticket" "bottom" "market";
  }

  .chart-toolbar {
    min-height: 88px;
    flex-wrap: wrap;
  }

  .market-panel,
  .trade-ticket-panel,
  .terminal-bottom-panel {
    max-height: none;
  }

  .terminal-row,
  .terminal-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .topbar-account > span,
  .topbar-account > strong,
  .notification-bell,
  .topbar-account button,
  .topbar-account-select,
  .profile-menu {
    width: 100%;
    justify-content: center;
  }

  .topbar-account {
    grid-template-columns: 1fr;
  }

  .chart-placeholder span {
    font-size: 18px;
  }
}

/* Live Trading terminal replica */
.terminal-body-page {
  margin: 0;
  overflow: hidden;
  background: #12171d;
  color: #e6edf5;
}

.terminal-body-page .global-disclosure-footer {
  display: none;
}

.trading-workspace {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-rows: 1fr;
  background: #11161c;
  font-family: Arial, Helvetica, sans-serif;
}

.terminal-brand-rail {
  display: grid;
  grid-template-rows: 42px 34px 80px 80px 1fr 28px 28px 28px;
  gap: 8px;
  align-items: start;
  justify-items: center;
  background: #303940;
  border-right: 1px solid #1e252b;
  overflow: hidden;
}

.rail-logo {
  width: 54px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #163f2d;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}

.rail-logo img {
  max-width: 28px;
  max-height: 28px;
}

.rail-logo span {
  display: none;
}

.rail-icon,
.rail-action {
  border: 0;
  background: transparent;
  color: #c9d4df;
  text-decoration: none;
  cursor: pointer;
}

.rail-icon {
  width: 38px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  font-size: 15px;
}

.rail-icon.active,
.rail-icon:hover,
.rail-action:hover {
  color: #58a6ff;
}

.rail-action {
  width: 52px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 6px 0;
  font-size: 10px;
  text-align: center;
  text-transform: uppercase;
}

.rail-action span {
  font-size: 20px;
}

.rail-action b {
  font-size: 8px;
  line-height: 1.15;
  font-weight: 700;
}

.rail-spacer {
  min-height: 1px;
}

.rail-collapsed {
  grid-template-columns: 42px minmax(0, 1fr);
}

.rail-collapsed .terminal-brand-rail,
.rail-collapsed .rail-logo {
  width: 42px;
}

.rail-collapsed .rail-action b {
  display: none;
}

.terminal-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr) 144px;
  background: #15191e;
}

.chart-toolbar {
  min-width: 0;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-bottom: 1px solid #262c33;
  background: #11161c;
  overflow-x: auto;
  scrollbar-width: none;
}

.chart-toolbar::-webkit-scrollbar {
  display: none;
}

.toolbar-cluster {
  display: flex;
  align-items: center;
  gap: 2px;
}

.chart-toolbar button {
  min-width: 28px;
  height: 28px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #aeb8c3;
  font-size: 12px;
  cursor: pointer;
}

.chart-toolbar button:hover,
.chart-toolbar button.active,
.new-order-button {
  color: #58a6ff;
  background: #1c2430;
}

.new-order-button {
  min-width: 84px !important;
  color: #e8f2ff !important;
}

.toolbar-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: #9eadbd;
  font-size: 12px;
}

.terminal-content {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 32px 0 minmax(0, 1fr) 224px;
  grid-template-areas: "tools order chart watch";
  transition: grid-template-columns .18s ease;
}

.trading-workspace.order-open .terminal-content {
  grid-template-columns: 32px 268px minmax(0, 1fr) 224px;
}

.trading-workspace.watchlist-hidden .terminal-content {
  grid-template-columns: 32px 0 minmax(0, 1fr) 0;
}

.trading-workspace.order-open.watchlist-hidden .terminal-content {
  grid-template-columns: 32px 268px minmax(0, 1fr) 0;
}

.drawing-rail {
  grid-area: tools;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding-top: 8px;
  border-right: 1px solid #22272d;
  background: #0d1116;
}

.drawing-rail button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #b7c2ce;
  cursor: pointer;
}

.drawing-rail button:hover,
.drawing-rail button.active {
  color: #58a6ff;
  background: #192230;
}

.order-drawer {
  grid-area: order;
  min-width: 0;
  overflow: auto;
  border-right: 1px solid #242b33;
  background: #151b22;
  padding: 10px;
}

.order-drawer[hidden] {
  display: block;
  visibility: hidden;
  padding: 0;
  border: 0;
}

.order-drawer-head,
.mode-switch,
.market-buttons,
.stepper,
.ticket-preview {
  display: flex;
  align-items: center;
}

.order-drawer-head {
  justify-content: space-between;
  margin-bottom: 10px;
}

.order-drawer-head h2 {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.order-drawer-head button {
  width: 26px;
  height: 26px;
  border: 1px solid #303b47;
  border-radius: 3px;
  background: #10161d;
  color: #d8e2ef;
  cursor: pointer;
}

.order-drawer form {
  display: grid;
  gap: 9px;
}

.order-drawer label {
  display: grid;
  gap: 4px;
  color: #93a3b5;
  font-size: 11px;
}

.terminal-select,
.terminal-input {
  width: 100%;
  min-height: 31px;
  border: 1px solid #303b47;
  border-radius: 2px;
  background: #0f151c;
  color: #e7eef7;
  padding: 5px 7px;
  font-size: 12px;
}

.mode-switch {
  gap: 4px;
  margin-bottom: 10px;
}

.mode-switch button,
.stepper button,
.submit-wide {
  border: 1px solid #303b47;
  border-radius: 2px;
  background: #0f151c;
  color: #dce6f1;
  padding: 7px 8px;
  cursor: pointer;
}

.mode-switch button.active {
  color: #fff;
  border-color: #2d66d6;
  background: #1a438f;
}

.stepper {
  gap: 4px;
}

.stepper button {
  width: 30px;
  height: 31px;
  padding: 0;
}

.ticket-preview {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 8px;
  padding: 8px;
  border: 1px solid #303b47;
  background: #10161d;
  color: #93a3b5;
  font-size: 11px;
}

.ticket-preview strong {
  color: #e8f2ff;
}

.market-buttons {
  gap: 8px;
}

.market-buttons button {
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .22);
}

.market-buttons .sell-button {
  background: linear-gradient(180deg, #ef4444, #b91c1c);
}

.market-buttons .buy-button {
  background: linear-gradient(180deg, #22c55e, #15803d);
}

.market-buttons button:disabled {
  opacity: .62;
  cursor: wait;
}

.mode-switch.single-mode button {
  width: 100%;
}

[data-trading-sound] {
  min-width: 82px;
}
  cursor: pointer;
}

.sell-button {
  background: #b84855;
}

.buy-button {
  background: #158b72;
}

.market-buttons button:disabled {
  opacity: .55;
  cursor: wait;
}

.chart-shell {
  grid-area: chart;
  min-width: 0;
  min-height: 0;
  background: #fff;
}

.chart-wrap,
.tv-chart-host {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.tv-chart-host {
  position: absolute;
  inset: 0;
}

.chart-title-line {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  gap: 8px;
  align-items: center;
  color: rgba(28, 38, 50, .35);
  font-size: 12px;
  pointer-events: none;
}

.chart-title-line strong {
  color: rgba(28, 38, 50, .25);
}

.chart-watermark {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: rgba(40, 55, 75, .035);
  font-size: clamp(46px, 11vw, 150px);
  font-weight: 800;
  pointer-events: none;
}

.chart-price-badge {
  position: absolute;
  z-index: 2;
  top: 118px;
  right: 0;
  padding: 5px 8px;
  background: #d94b64;
  color: #fff;
  font-size: 11px;
  pointer-events: none;
}

.chart-float-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.chart-float-controls button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(25, 31, 38, .76);
  color: #fff;
  cursor: pointer;
}

.chart-session-strip {
  position: absolute;
  left: 8px;
  bottom: 5px;
  z-index: 2;
  display: flex;
  gap: 8px;
  color: #7b8794;
  font-size: 10px;
  pointer-events: none;
}

.market-panel {
  grid-area: watch;
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid #242b33;
  background: #15191e;
  transition: opacity .18s ease;
}

.watchlist-hidden .market-panel {
  opacity: 0;
  pointer-events: none;
}

.asset-search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 8px;
  border-bottom: 1px solid #242b33;
  color: #7d8b99;
}

.asset-search input {
  min-height: 26px;
  border: 0;
  background: transparent;
}

.asset-table-head,
.asset-row {
  display: grid;
  grid-template-columns: 1.35fr .8fr .8fr .8fr;
  gap: 8px;
  align-items: center;
}

.asset-table-head {
  height: 30px;
  padding: 0 8px;
  border-bottom: 1px solid #242b33;
  color: #b3beca;
  font-size: 10px;
  font-weight: 700;
}

.watchlist {
  height: calc(100% - 64px);
  overflow: auto;
}

.asset-row {
  width: 100%;
  min-height: 33px;
  border: 0;
  border-bottom: 1px solid rgba(36, 43, 51, .72);
  background: transparent;
  color: #cbd5e1;
  padding: 3px 8px;
  text-align: left;
  font-size: 11px;
  cursor: pointer;
}

.asset-row:hover,
.asset-row.active {
  background: #1d242c;
}

.asset-symbol {
  display: grid;
  gap: 1px;
}

.asset-symbol small {
  color: #7d8b99;
  font-size: 9px;
}

.positive {
  color: #50a9e8;
}

.negative {
  color: #d94b64;
}

.connection-dot::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #f59e0b;
}

.connection-dot.connected::before {
  background: #1db184;
}

.connection-dot.stale::before,
.connection-dot.disconnected::before {
  background: #d94b64;
}

.terminal-bottom-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 30px;
  border-top: 1px solid #2b3138;
  background: #15191e;
}

.terminal-table-scroll {
  overflow: auto;
}

.terminal-head,
.terminal-row {
  display: grid;
  grid-template-columns: .85fr .9fr 1fr .8fr .9fr .9fr .8fr .8fr .9fr .7fr .85fr 1fr;
  gap: 8px;
  align-items: center;
  min-width: 1050px;
  padding: 0 8px;
}

.terminal-head {
  height: 24px;
  border-bottom: 1px solid #2b3138;
  color: #c8d2df;
  font-size: 10px;
  font-weight: 700;
}

.terminal-row {
  min-height: 28px;
  border-bottom: 1px solid rgba(43, 49, 56, .7);
  color: #d8e2ef;
  font-size: 11px;
}

.account-summary-row {
  min-width: 1050px;
  height: 25px;
  padding: 6px 8px 0;
  color: #cbd5e1;
  border-bottom: 1px solid #2b3138;
  font-size: 11px;
}

.terminal-empty-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 48px;
  bottom: 30px;
  display: grid;
  place-content: center;
  gap: 10px;
  color: #d8e2ef;
  font-size: 11px;
  pointer-events: none;
}

.terminal-empty-overlay[hidden] {
  display: none;
}

.terminal-empty-overlay button {
  pointer-events: auto;
  border: 0;
  background: #1d2a38;
  color: #58a6ff;
  padding: 5px 10px;
  cursor: pointer;
}

.terminal-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  border-top: 1px solid #2b3138;
  background: #101419;
  overflow-x: auto;
}

.terminal-tabs button {
  height: 29px;
  border: 0;
  border-right: 1px solid #2b3138;
  background: transparent;
  color: #9ba8b5;
  padding: 0 10px;
  font-size: 11px;
  cursor: pointer;
}

.terminal-tabs button.active {
  color: #58a6ff;
  background: #151d27;
}

.terminal-empty {
  padding: 18px;
  color: #93a3b5;
  font-size: 12px;
}

.floating-support {
  position: fixed;
  z-index: 40;
  right: 16px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #1dbf73;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .32);
  cursor: pointer;
}

.result-modal {
  width: min(520px, calc(100vw - 24px));
  border: 1px solid #303b47;
  border-radius: 4px;
  background: #151b22;
  color: #e8f2ff;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 12px;
}

@media (max-width: 1080px) {
  .terminal-content,
  .trading-workspace.order-open .terminal-content {
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-areas: "tools chart";
  }

  .order-drawer {
    position: fixed;
    z-index: 25;
    left: 54px;
    top: 38px;
    bottom: 0;
    width: min(320px, calc(100vw - 54px));
    box-shadow: 18px 0 30px rgba(0, 0, 0, .24);
  }

  .order-drawer[hidden] {
    display: none;
  }

  .market-panel {
    position: fixed;
    z-index: 24;
    right: 0;
    top: 38px;
    bottom: 144px;
    width: min(300px, 88vw);
    box-shadow: -18px 0 30px rgba(0, 0, 0, .24);
  }

  .watchlist-hidden .market-panel {
    transform: translateX(100%);
  }
}

@media (max-width: 720px) {
  .terminal-body-page {
    overflow: hidden;
  }

  .trading-workspace {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .terminal-brand-rail {
    width: 42px;
  }

  .rail-logo {
    width: 42px;
  }

  .rail-action b {
    display: none;
  }

  .terminal-main {
    grid-template-rows: 74px minmax(0, 1fr) 136px;
  }

  .chart-toolbar {
    height: 74px;
    flex-wrap: wrap;
    align-content: center;
  }

  .toolbar-status {
    width: 100%;
    margin-left: 0;
  }

  .order-drawer {
    left: 42px;
    top: auto;
    height: min(72vh, 560px);
    width: calc(100vw - 42px);
  }

  .market-panel {
    top: 74px;
    bottom: 136px;
  }

  .terminal-head,
  .terminal-row,
  .account-summary-row {
    min-width: 980px;
  }
}

@media (max-width: 760px) {
  .side-nav .notification-popover,
  .side-nav .profile-popover {
    position: static;
    width: 100%;
    max-height: 260px;
    margin-top: 8px;
    box-shadow: none;
  }

  .side-nav .notification-item,
  .side-nav .profile-popover {
    color: #111827;
  }
}

/* Final Live Trading layout guards. Keep these last to override legacy terminal styles above. */
.terminal-body-page .trading-workspace {
  height: 100vh;
  width: 100vw;
  min-height: 0;
  max-width: 100vw;
  overflow: hidden;
}

.terminal-body-page .terminal-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 38px minmax(0, 1fr) 144px !important;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.terminal-body-page .chart-toolbar {
  grid-column: 1;
  grid-row: 1;
  width: auto;
  min-width: 0;
}

.terminal-body-page .terminal-content {
  display: grid;
  grid-column: 1;
  grid-row: 2;
  grid-template-columns: 32px 0 minmax(0, 1fr) 224px !important;
  grid-template-rows: minmax(0, 1fr) !important;
  grid-template-areas: "tools order chart watch" !important;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.terminal-body-page .trading-workspace.order-open .terminal-content {
  grid-template-columns: 32px 268px minmax(0, 1fr) 224px !important;
}

.terminal-body-page .trading-workspace.watchlist-hidden .terminal-content {
  grid-template-columns: 32px 0 minmax(0, 1fr) 0 !important;
}

.terminal-body-page .trading-workspace.order-open.watchlist-hidden .terminal-content {
  grid-template-columns: 32px 268px minmax(0, 1fr) 0 !important;
}

.terminal-body-page .chart-shell {
  grid-area: chart;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 0;
}

.terminal-body-page .chart-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.terminal-body-page .tv-chart-host {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.terminal-body-page .drawing-rail {
  grid-area: tools;
}

.terminal-body-page .market-panel {
  grid-area: watch;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.terminal-body-page .terminal-bottom-panel {
  grid-column: 1;
  grid-row: 3;
  min-width: 0;
  overflow: hidden;
}

.terminal-body-page .terminal-table-scroll {
  min-width: 0;
  overflow: auto;
}

.terminal-body-page .terminal-empty-overlay {
  z-index: 3;
}

@media (max-width: 1080px) {
  .terminal-body-page .terminal-content,
  .terminal-body-page .trading-workspace.order-open .terminal-content,
  .terminal-body-page .trading-workspace.watchlist-hidden .terminal-content,
  .terminal-body-page .trading-workspace.order-open.watchlist-hidden .terminal-content {
    grid-template-columns: 32px minmax(0, 1fr) !important;
    grid-template-areas: "tools chart" !important;
  }
}

@media (max-width: 720px) {
  .terminal-body-page .terminal-main {
    grid-template-rows: 74px minmax(0, 1fr) 136px !important;
  }
}

/* Live Trading right sidebar and dedicated mobile terminal */
.mobile-trading-shell {
  display: none;
}

.terminal-body-page .terminal-content {
  grid-template-columns: 32px 0 minmax(0, 1fr) clamp(280px, 17vw, 340px) !important;
}

.terminal-body-page .trading-workspace.order-open .terminal-content {
  grid-template-columns: 32px 268px minmax(0, 1fr) clamp(280px, 17vw, 340px) !important;
}

.terminal-body-page .market-panel {
  background: #14191f;
  border-left: 1px solid #252d35;
}

.asset-search {
  height: 42px;
  gap: 8px;
  padding: 0 9px;
  background: #11161c;
}

.asset-search .terminal-input,
.asset-search input {
  min-width: 0;
  color: #cbd5e1;
  font-size: 12px;
}

.asset-search button {
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: #8996a5;
  cursor: pointer;
}

.asset-table-head,
.asset-row {
  grid-template-columns: minmax(78px, 1.28fr) minmax(58px, .72fr) minmax(58px, .72fr) minmax(66px, .78fr);
  gap: 6px;
}

.asset-table-head {
  height: 34px;
  padding: 0 10px;
  overflow: hidden;
  white-space: nowrap;
  color: #d9e7ff;
  font-size: 11px;
}

.watchlist {
  height: calc(100% - 76px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #5e6875 #11161c;
}

.asset-row {
  min-height: 74px;
  padding: 8px 10px;
  overflow: hidden;
  border-bottom: 1px solid rgba(43, 49, 56, .82);
  font-size: 11px;
}

.asset-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.asset-row.active {
  background: #122033;
  box-shadow: inset 3px 0 0 #2f8cff;
}

.asset-row:hover {
  background: #1c252e;
}

.asset-symbol b {
  display: block;
  color: #eaf3ff;
  font-size: 12px;
  line-height: 1.25;
}

.asset-symbol small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.2;
  color: #8f9cab;
}

.neutral {
  color: #9aa7b6;
}

.toolbar-title-lockup {
  display: grid;
  min-width: 150px;
  color: #e5edf7 !important;
  line-height: 1.05;
}

.toolbar-title-lockup strong {
  color: #f8fafc !important;
  font-size: 12px;
  font-weight: 900;
}

.toolbar-title-lockup span {
  color: #8fa0b3 !important;
  font-size: 10px;
  font-weight: 700;
}

.demo-mode-locked [data-account-mode="live"]:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.verification-workspace {
  min-height: calc(100vh - 72px);
  overflow-x: hidden;
  color: #dbeafe;
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 197, 94, .14), transparent 34%),
    linear-gradient(135deg, #07111f 0%, #0b1324 52%, #050914 100%);
}

.verification-hero,
.verification-status-grid article,
.verification-progress,
.verification-summary-panel,
.verification-card {
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .82);
  box-shadow: 0 18px 48px rgba(2, 6, 23, .22);
}

.verification-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(2, 6, 23, .82));
}

.verification-hero h1 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.verification-hero p {
  max-width: 720px;
  margin: 0;
  color: #94a3b8;
}

.verification-hero-actions {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.verification-workspace .btn,
.verification-hero-actions button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 8px;
  background: rgba(2, 6, 23, .42);
  color: #e2e8f0;
  font-weight: 800;
}

.verification-workspace .btn-primary {
  border-color: rgba(34, 197, 94, .36);
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #03120a;
}

.verification-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.verification-status-grid article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border-radius: 10px;
}

.verification-status-grid span,
.verification-progress small,
.verification-requirement-list span,
.verification-form-footer span {
  color: #94a3b8;
  font-size: 12px;
}

.verification-status-grid strong {
  color: #f8fafc;
  font-size: 20px;
}

.verification-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 12px;
}

.verification-progress article {
  display: grid;
  gap: 5px;
  padding: 14px;
  background: rgba(2, 6, 23, .3);
}

.verification-progress article.active {
  background: rgba(34, 197, 94, .12);
}

.verification-progress span {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(148, 163, 184, .16);
  color: #e2e8f0;
  font-weight: 900;
}

.verification-progress article.active span {
  background: #22c55e;
  color: #03120a;
}

.verification-progress strong,
.verification-requirement-list strong,
.verification-card h2,
.verification-status-card strong {
  color: #f8fafc;
}

.verification-layout {
  display: grid;
  grid-template-columns: minmax(320px, .42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.verification-summary-panel,
.verification-card {
  min-width: 0;
  padding: 16px;
  border-radius: 12px;
}

.verification-summary-panel {
  position: sticky;
  top: 88px;
}

.verification-requirement-list,
.verification-form-stack,
.verification-checks {
  display: grid;
  gap: 10px;
}

.verification-requirement-list article {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 9px;
  background: rgba(2, 6, 23, .34);
}

.verification-requirement-list i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(34, 197, 94, .14);
  color: #86efac;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.verification-requirement-list a {
  color: #86efac;
  font-size: 12px;
  font-weight: 900;
}

.verification-status-card {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, .14);
}

.verification-card .panel-head h2,
.verification-card .panel-head p {
  margin: 0;
}

.verification-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.verification-field-grid label,
.verification-form details {
  display: grid;
  gap: 7px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
}

.verification-field-grid .wide {
  grid-column: 1 / -1;
}

.verification-form .input-control,
.verification-form .select-control {
  border-color: rgba(148, 163, 184, .2);
  background: rgba(2, 6, 23, .46);
  color: #f8fafc;
}

.verification-checks {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 10px;
  background: rgba(2, 6, 23, .28);
}

.verification-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.verification-card details {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 9px;
  background: rgba(2, 6, 23, .34);
}

.verification-card summary {
  color: #f8fafc;
  cursor: pointer;
  font-weight: 900;
}

.verification-card details p {
  margin: 8px 0 0;
  color: #94a3b8;
}

@media (max-width: 1180px) {
  .verification-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .verification-layout {
    grid-template-columns: 1fr;
  }

  .verification-summary-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .app-main {
    min-height: 100dvh;
  }

  .dashboard-workspace,
  .verification-workspace {
    min-height: calc(100dvh - 72px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .verification-hero,
  .verification-form-footer {
    display: grid;
  }

  .verification-hero-actions,
  .verification-hero-actions .btn,
  .verification-hero-actions button {
    width: 100%;
  }

  .verification-status-grid,
  .verification-progress,
  .verification-field-grid {
    grid-template-columns: 1fr;
  }

  .verification-progress article {
    grid-template-columns: 32px 1fr auto;
    align-items: center;
  }

  .verification-requirement-list article {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .verification-requirement-list a {
    grid-column: 2;
  }
}

@media (min-width: 1600px) {
  .terminal-body-page .terminal-content {
    grid-template-columns: 32px 0 minmax(0, 1fr) 320px !important;
  }

  .terminal-body-page .trading-workspace.order-open .terminal-content {
    grid-template-columns: 32px 268px minmax(0, 1fr) 320px !important;
  }
}

@media (max-width: 767px) {
  .terminal-body-page {
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    background: #243228;
  }

  body:not(.terminal-body-page) {
    min-height: 100dvh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body:not(.terminal-body-page) .app-shell,
  body:not(.terminal-body-page) .app-main {
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }

  .terminal-body-page .trading-workspace {
    display: block;
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    background: #263629;
  }

  .terminal-body-page .terminal-brand-rail,
  .terminal-body-page .terminal-main {
    display: none !important;
  }

  .mobile-trading-shell {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    background: #11161c;
    color: #e7eef7;
  }

  .mobile-rail {
    display: grid;
    grid-template-rows: 54px 44px 74px 74px 1fr;
    justify-items: center;
    align-items: start;
    background: #2f3a40;
    border-right: 1px solid #1f282e;
  }

  .mobile-logo {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    background: #206332;
  }

  .mobile-logo img {
    max-width: 36px;
    max-height: 36px;
  }

  .mobile-rail button,
  .mobile-rail a {
    width: 100%;
    border: 0;
    background: transparent;
    color: #d4dde6;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
  }

  .mobile-rail > button {
    height: 44px;
    font-size: 18px;
  }

  .mobile-rail a,
  .mobile-rail button[data-help-center] {
    display: grid;
    place-items: center;
    gap: 5px;
    padding: 7px 2px;
    font-size: 9px;
    text-transform: uppercase;
  }

  .mobile-rail span {
    font-size: 19px;
  }

  .mobile-rail b {
    font-size: 8px;
    line-height: 1.15;
  }

  .mobile-main {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) 50px;
    overflow: hidden;
    background: #11161c;
  }

  .mobile-panel {
    min-width: 0;
    min-height: 0;
    display: none;
    overflow: hidden;
    background: #11161c;
  }

  .mobile-panel.active {
    display: block;
  }

  .mobile-search,
  .mobile-quote-head,
  .mobile-quote-row {
    display: grid;
    grid-template-columns: minmax(82px, 1.2fr) minmax(62px, .74fr) minmax(62px, .74fr) minmax(54px, .62fr);
    gap: 6px;
    align-items: center;
  }

  .mobile-search {
    grid-template-columns: 18px minmax(0, 1fr) 28px;
    height: 40px;
    padding: 0 8px;
    border-bottom: 1px solid #252d35;
    color: #8794a3;
  }

  .mobile-search input {
    min-width: 0;
    border: 0;
    background: transparent;
    color: #e7eef7;
    outline: 0;
  }

  .mobile-search button {
    border: 0;
    background: transparent;
    color: #9aa7b6;
  }

  .mobile-quote-head {
    height: 27px;
    padding: 0 8px;
    border-bottom: 1px solid #252d35;
    color: #d8e7ff;
    font-size: 9px;
    font-weight: 700;
  }

  .mobile-quote-list {
    height: calc(100dvh - 54px - 50px - 67px);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .mobile-quote-row {
    width: 100%;
    min-height: 45px;
    padding: 6px 8px;
    border: 0;
    border-bottom: 1px solid rgba(43, 49, 56, .75);
    background: transparent;
    color: #dce6f1;
    text-align: left;
    font-size: 12px;
    cursor: pointer;
  }

  .mobile-quote-row.active {
    background: #122033;
    box-shadow: inset 3px 0 0 #2f8cff;
  }

  .mobile-quote-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  .mobile-quote-row b {
    display: block;
    color: #f1f7ff;
  }

  .mobile-quote-row small {
    display: block;
    color: #8190a0;
    font-size: 8px;
  }

  .mobile-chart-panel.active {
    display: grid;
    grid-template-rows: 34px minmax(0, 1fr);
    background: #fff;
  }

  .mobile-chart-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 34px;
    padding: 0 4px;
    overflow-x: auto;
    background: #10151b;
    scrollbar-width: none;
  }

  .mobile-chart-toolbar button,
  .mobile-chart-toolbar select {
    flex: 0 0 auto;
    height: 26px;
    border: 0;
    border-radius: 2px;
    background: #141c25;
    color: #dce6f1;
    font-size: 10px;
  }

  .mobile-chart-toolbar button {
    width: 26px;
  }

  .mobile-chart-stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #fff;
  }

  .mobile-chart-stage .chart-shell,
  .mobile-chart-stage .chart-wrap {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .mobile-chart-stage .chart-float-controls {
    bottom: 18px;
  }

  .mobile-chart-stage .chart-session-strip {
    bottom: 4px;
  }

  .mobile-account-card {
    padding: 12px 14px;
    border-bottom: 1px solid #252d35;
    text-align: center;
  }

  .mobile-account-card > strong {
    display: block;
    margin-bottom: 12px;
    color: #f8fbff;
  }

  .mobile-account-card > div,
  .mobile-settings-list label,
  .mobile-settings-list a,
  .mobile-settings-list button {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
  }

  .mobile-account-card span,
  .mobile-account-card strong {
    font-size: 11px;
  }

  .mobile-mode {
    padding: 10px 12px 0;
  }

  .mobile-order-card {
    margin: 10px 12px 70px;
    max-height: calc(100dvh - 210px);
    overflow: auto;
  }

  .mobile-order-card summary {
    padding: 8px 0;
    color: #e7eef7;
    cursor: pointer;
  }

  .mobile-order-card .order-drawer {
    position: static;
    width: auto;
    height: auto;
    max-height: none;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .mobile-order-card .order-drawer-head {
    display: none;
  }

  .mobile-history-tabs {
    display: flex;
    height: 36px;
    border-bottom: 1px solid #252d35;
    overflow-x: auto;
  }

  .mobile-history-tabs button {
    border: 0;
    border-right: 1px solid #252d35;
    background: transparent;
    color: #c9d4df;
    padding: 0 12px;
    font-size: 11px;
  }

  .mobile-history-tabs button.active {
    color: #58a6ff;
    box-shadow: inset 0 -2px 0 #2f8cff;
  }

  .mobile-history-list {
    height: calc(100dvh - 54px - 50px - 36px);
    overflow: auto;
  }

  .mobile-trade-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1.3fr .8fr .8fr .8fr;
    gap: 7px;
    padding: 9px;
    border: 0;
    border-bottom: 1px solid #252d35;
    background: transparent;
    color: #dce6f1;
    text-align: left;
  }

  .mobile-trade-row small {
    display: block;
    color: #8794a3;
    font-size: 9px;
  }

  .mobile-empty {
    height: 60%;
    display: grid;
    place-items: center;
    color: #dce6f1;
    font-size: 11px;
    text-align: center;
  }

  .mobile-settings-list {
    display: grid;
    gap: 10px;
    padding: 12px;
    overflow: auto;
  }

  .mobile-settings-list label,
  .mobile-settings-list a,
  .mobile-settings-list button {
    min-height: 38px;
    border: 1px solid #252d35;
    border-radius: 3px;
    background: #141b22;
    color: #e7eef7;
    padding: 8px;
    text-decoration: none;
  }

  .mobile-settings-list select,
  .mobile-settings-list input {
    max-width: 140px;
    background: #0f151c;
    color: #e7eef7;
    border: 1px solid #303b47;
  }

  .mobile-bottom-tabs {
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 50px;
    border-top: 1px solid #252d35;
    background: #10151b;
  }

  .mobile-bottom-tabs button {
    display: grid;
    place-items: center;
    gap: 1px;
    border: 0;
    border-right: 1px solid rgba(43, 49, 56, .7);
    background: transparent;
    color: #a8b4c2;
    font-size: 9px;
    cursor: pointer;
  }

  .mobile-bottom-tabs button.active {
    color: #2f8cff;
  }

  .mobile-bottom-tabs span {
    font-size: 13px;
  }

  .floating-support {
    right: 10px;
    bottom: 58px;
    width: 42px;
    height: 42px;
    z-index: 60;
    background: #24c878;
  }

  .support-widget {
    left: 62px !important;
    right: 10px !important;
    bottom: 108px !important;
    width: auto !important;
    max-width: none !important;
  }
}

@media (min-width: 768px) and (max-width: 1080px) {
  .terminal-body-page .terminal-content,
  .terminal-body-page .trading-workspace.order-open .terminal-content,
  .terminal-body-page .trading-workspace.watchlist-hidden .terminal-content,
  .terminal-body-page .trading-workspace.order-open.watchlist-hidden .terminal-content {
    grid-template-columns: 32px minmax(0, 1fr) !important;
    grid-template-areas: "tools chart" !important;
  }
}

/* Final premium quote-board polish for Live Trading only. */
.terminal-body-page .terminal-content {
  grid-template-columns: 32px 0 minmax(0, 1fr) 324px !important;
}

.terminal-body-page .trading-workspace.order-open .terminal-content {
  grid-template-columns: 32px 268px minmax(0, 1fr) 324px !important;
}

.terminal-body-page .market-panel {
  background: #151817;
  border-left: 1px solid #29302e;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .02);
}

.terminal-body-page .asset-search {
  height: 50px;
  padding: 0 13px;
  border-bottom: 1px solid #2c302f;
  background: #151817;
  color: #8f968f;
}

.terminal-body-page .asset-search span {
  font-size: 17px;
  color: #b7b0a7;
}

.terminal-body-page .asset-search input {
  font-size: 15px;
  color: #e7ece8;
}

.terminal-body-page .asset-table-head {
  height: 31px;
  grid-template-columns: minmax(82px, 1fr) 64px 64px 78px;
  padding: 0 9px 0 12px;
  border-bottom: 1px solid #2d3331;
  color: #f2f2ef;
  font-size: 12px;
  font-weight: 800;
}

.terminal-body-page .watchlist {
  display: block;
  height: calc(100% - 81px);
  overflow-y: auto;
  overflow-x: hidden !important;
  background: #151817;
}

.terminal-body-page .asset-row {
  min-height: 36px;
  height: 36px;
  grid-template-columns: minmax(82px, 1fr) 64px 64px 78px;
  gap: 0;
  padding: 0 9px 0 8px;
  border-bottom: 0;
  background: #151817;
  color: #f2f4f1;
  font-size: 13px;
  line-height: 1;
}

.terminal-body-page .asset-row:nth-child(even) {
  background: #171a19;
}

.terminal-body-page .asset-row:hover,
.terminal-body-page .asset-row.active {
  background: #1d211f;
}

.terminal-body-page .asset-row.active {
  box-shadow: inset 2px 0 0 #22a7ff;
}

.terminal-body-page .asset-row.stale {
  opacity: .58;
}

.terminal-body-page .asset-row > span {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.terminal-body-page .asset-row > span:not(.asset-symbol) {
  justify-content: flex-end;
}

.terminal-body-page .asset-symbol {
  gap: 7px;
}

.terminal-body-page .asset-symbol b {
  min-width: 0;
  overflow: hidden;
  color: #f1f3ef;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.terminal-body-page .quote-arrow {
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

.terminal-body-page .quote-arrow.up {
  border-bottom: 6px solid #25b361;
}

.terminal-body-page .quote-arrow.down {
  border-top: 6px solid #ef3042;
}

.terminal-body-page .quote-arrow.flat {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 50%;
  background: #3c4240;
}

.terminal-body-page .positive {
  color: #1ea7ff;
}

.terminal-body-page .negative {
  color: #ff3048;
}

@media (max-width: 767px) {
  .terminal-body-page .mobile-trading-shell {
    grid-template-columns: 80px minmax(0, 1fr);
    background: #111514;
  }

  .terminal-body-page .mobile-rail {
    grid-template-rows: 84px 54px 78px 78px 1fr;
    background: #383d3f;
    border-right: 0;
  }

  .terminal-body-page .mobile-logo {
    width: 80px;
    height: 84px;
    background: linear-gradient(135deg, #105f33, #17753d);
    border-radius: 0 6px 6px 0;
  }

  .terminal-body-page .mobile-logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
  }

  .terminal-body-page .mobile-rail > button {
    height: 54px;
    color: #f3f8f6;
    font-size: 24px;
  }

  .terminal-body-page .mobile-rail a,
  .terminal-body-page .mobile-rail button[data-help-center] {
    min-height: 78px;
    color: #f5f7f6;
    font-size: 10px;
    font-weight: 800;
  }

  .terminal-body-page .mobile-rail span {
    font-size: 23px;
    color: #9fd0ca;
  }

  .terminal-body-page .mobile-rail b {
    font-size: 9px;
    letter-spacing: .01em;
  }

  .terminal-body-page .mobile-main {
    grid-template-rows: minmax(0, 1fr) 60px;
    background: #151817;
  }

  .terminal-body-page .mobile-search {
    height: 56px;
    grid-template-columns: 28px minmax(0, 1fr) 30px;
    padding: 0 15px;
    border-bottom: 1px solid #303432;
    background: #151817;
  }

  .terminal-body-page .mobile-search span {
    color: #c5c2bc;
    font-size: 22px;
  }

  .terminal-body-page .mobile-search input {
    color: #f6f8f6;
    font-size: 16px;
    font-weight: 600;
  }

  .terminal-body-page .mobile-search button {
    color: #c8c8c2;
    font-size: 19px;
  }

  .terminal-body-page .mobile-quote-head {
    display: none;
  }

  .terminal-body-page .mobile-quote-list {
    height: calc(100dvh - 56px - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    background: #151817;
  }

  .terminal-body-page .mobile-quote-row {
    position: relative;
    min-height: 64px;
    display: grid;
    grid-template-columns: minmax(100px, .82fr) minmax(82px, .64fr) minmax(82px, .64fr) 0;
    gap: 10px;
    align-items: center;
    padding: 5px 12px 5px 12px;
    border: 0;
    background: #151817;
  }

  .terminal-body-page .mobile-quote-row:nth-child(even) {
    background: #171a19;
  }

  .terminal-body-page .mobile-quote-row.active,
  .terminal-body-page .mobile-quote-row:hover {
    background: #1c211f;
    box-shadow: inset 3px 0 0 #17a4ff;
  }

  .terminal-body-page .mobile-quote-row.stale {
    opacity: .58;
  }

  .terminal-body-page .mobile-quote-meta {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .terminal-body-page .mobile-quote-meta small {
    display: flex;
    gap: 13px;
    min-height: 14px;
    color: #aaa79f;
    font-size: 11px;
    line-height: 1;
  }

  .terminal-body-page .mobile-quote-meta strong {
    overflow: hidden;
    color: #f7fbfb;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .terminal-body-page .mobile-quote-meta em {
    overflow: hidden;
    color: #b8b1a7;
    font-size: 11px;
    font-style: normal;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .terminal-body-page .mobile-quote-side {
    display: grid;
    justify-items: end;
    min-width: 0;
    overflow: hidden;
  }

  .terminal-body-page .quote-price {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    max-width: 100%;
    overflow: hidden;
    font-size: 28px;
    font-weight: 500;
    line-height: .92;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .terminal-body-page .quote-price span {
    overflow: hidden;
    text-overflow: clip;
  }

  .terminal-body-page .quote-price sup {
    margin-left: 1px;
    font-size: 15px;
    line-height: 1;
    transform: translateY(-2px);
  }

  .terminal-body-page .quote-low-high {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 5px;
    color: #b9b1a7;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
  }

  .terminal-body-page .quote-low-high b {
    color: #b9b1a7;
    font-weight: 500;
  }

  .terminal-body-page .mobile-quote-direction {
    position: absolute;
    right: 4px;
    top: 8px;
    width: 0;
    height: 0;
  }

  .terminal-body-page .mobile-quote-direction.up {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid #24b35d;
  }

  .terminal-body-page .mobile-quote-direction.down {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #ff3048;
  }

  .terminal-body-page .mobile-bottom-tabs {
    height: 60px;
    border-top: 1px solid #313533;
    background: #111514;
  }

  .terminal-body-page .mobile-bottom-tabs button {
    color: #f3f3ee;
    font-size: 10px;
    border-right: 0;
  }

  .terminal-body-page .mobile-bottom-tabs button.active {
    color: #18a8ff;
  }

  .terminal-body-page .mobile-bottom-tabs span {
    font-size: 19px;
  }

  .terminal-body-page .floating-support {
    right: 14px !important;
    bottom: 72px !important;
    width: 58px !important;
    height: 58px !important;
    border: 5px solid #293329;
    background: #25ba62;
    font-size: 22px;
  }

  .terminal-body-page .mobile-chart-panel.active {
    grid-template-rows: 36px minmax(0, 1fr);
  }
}

/* Live Trading font match: goal app uses a Roboto-like Android trading UI face. */
.terminal-body-page,
.terminal-body-page .trading-workspace,
.terminal-body-page button,
.terminal-body-page input,
.terminal-body-page select {
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif !important;
}

.terminal-body-page .asset-table-head,
.terminal-body-page .asset-row,
.terminal-body-page .mobile-search,
.terminal-body-page .mobile-quote-row,
.terminal-body-page .mobile-bottom-tabs {
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif !important;
  letter-spacing: 0;
}

.terminal-body-page .asset-symbol b,
.terminal-body-page .mobile-quote-meta strong {
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif !important;
  font-weight: 900;
}

.terminal-body-page .asset-row > span:not(.asset-symbol),
.terminal-body-page .quote-price {
  font-family: "Roboto Condensed", "Roboto", "Arial Narrow", Arial, sans-serif !important;
  font-weight: 400;
  letter-spacing: 0;
}

.terminal-body-page .mobile-quote-meta small,
.terminal-body-page .mobile-quote-meta em,
.terminal-body-page .quote-low-high {
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif !important;
  font-weight: 400;
}

.terminal-body-page .asset-table-head {
  font-weight: 700;
}

.terminal-body-page .mobile-search input {
  font-weight: 500;
}

@media (max-width: 767px) {
  .terminal-body-page .quote-price {
    font-size: 29px;
    font-weight: 400;
  }

  .terminal-body-page .quote-price sup {
    font-family: "Roboto Condensed", "Roboto", "Arial Narrow", Arial, sans-serif !important;
    font-weight: 500;
  }
}

/* Final premium dashboard, demo terminal, and verification overrides. */
.dashboard-workspace {
  overflow: visible;
}

.dashboard-layout {
  grid-template-columns: minmax(0, 1.32fr) minmax(340px, 0.68fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

.dashboard-primary-column,
.dashboard-secondary-column {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.dashboard-workspace .panel {
  min-width: 0;
  height: auto !important;
  padding: 14px !important;
}

.dashboard-performance-panel,
.dashboard-trades-panel {
  grid-column: auto !important;
}

.dashboard-market-panel,
.dashboard-transactions-panel,
.dashboard-health-panel,
.dashboard-copy-panel,
.dashboard-actions-panel,
.dashboard-alerts-panel {
  grid-column: auto !important;
}

.dashboard-performance-panel {
  min-height: 0;
}

.dashboard-trades-panel {
  min-height: 0;
  align-self: start !important;
  max-height: none !important;
}

.dashboard-trades-panel .dashboard-table-wrap,
.dashboard-trades-panel .dashboard-table,
.dashboard-trades-panel .table-lite,
.dashboard-trades-panel .table-lite tbody {
  height: auto !important;
  min-height: 0 !important;
}

.dashboard-equity-chart {
  min-height: 132px !important;
}

.dashboard-equity-chart .dashboard-sparkline {
  height: 94px !important;
}

.dashboard-ledger-list.compact {
  gap: 7px;
}

.dashboard-ledger-list.compact .dashboard-ledger-row {
  padding: 9px 10px;
}

.dashboard-watch-row {
  grid-template-columns: minmax(92px, 1fr) minmax(78px, auto) minmax(78px, auto) 62px !important;
  min-width: 0;
}

.dashboard-watch-row span small {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.2;
}

.dashboard-workspace .premium-empty-state.compact-empty {
  min-height: 0;
  padding: 14px;
}

.toolbar-title-lockup {
  display: grid;
  gap: 1px;
  min-width: 168px;
  color: #152033;
  font-size: 12px;
}

.toolbar-title-lockup strong {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.1;
}

.toolbar-title-lockup span {
  color: #64748b;
  font-size: 11px;
}

.demo-mode-locked [data-account-mode="live"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.verification-workspace {
  min-height: calc(100vh - 72px);
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.14), transparent 34%),
    linear-gradient(135deg, #07111f 0%, #0b1324 46%, #050914 100%);
  color: #dbeafe;
}

.verification-workspace .muted,
.verification-workspace p,
.verification-workspace small {
  color: #94a3b8;
}

.verification-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: stretch;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.84));
  box-shadow: 0 22px 56px rgba(2, 6, 23, 0.28);
}

.verification-hero h1 {
  margin: 6px 0 8px;
  color: #f8fafc;
  font-size: clamp(28px, 3vw, 44px);
}

.verification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.verification-status-card {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 18px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.42);
}

.verification-status-card span {
  color: #86efac;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.verification-status-card strong {
  color: #f8fafc;
  font-size: 26px;
}

.verification-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.verification-progress article,
.requirements-grid article,
.verification-summary,
.verification-form-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.2);
}

.verification-progress article {
  display: grid;
  gap: 5px;
  padding: 13px;
}

.verification-progress article.active {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(22, 163, 74, 0.16);
}

.verification-progress span,
.requirement-icon {
  color: #86efac;
  font-size: 12px;
  font-weight: 900;
}

.verification-progress strong,
.requirements-grid strong,
.verification-summary strong,
.verification-form-panel h2,
.form-section-title strong {
  color: #f8fafc;
}

.verification-layout {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.verification-summary {
  position: sticky;
  top: 90px;
  padding: 16px;
}

.verification-eligibility {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.verification-eligibility span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.36);
}

.verification-summary details {
  color: #dbeafe;
}

.verification-summary ul {
  margin: 10px 0 0 18px;
  padding: 0;
  color: #94a3b8;
}

.verification-main {
  display: grid;
  gap: 14px;
}

.requirements-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.requirements-grid article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 13px;
}

.requirements-grid article > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.requirements-grid article > .badge {
  grid-column: 2;
  justify-self: start;
}

.requirement-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.12);
}

.verification-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.verification-form {
  display: grid;
  gap: 12px;
}

.verification-form label {
  display: grid;
  gap: 6px;
  color: #dbeafe;
  font-weight: 700;
}

.verification-form .checkbox-line {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  font-weight: 700;
}

.verification-form .checkbox-line input {
  width: auto;
  margin-top: 2px;
}

.verification-form .input-control,
.verification-form .select-control {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.54);
  color: #f8fafc;
}

.form-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.risk-disclosure-card,
.verification-checks {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.08);
}

.verification-status-list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.verification-status-list .activity-row {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.42);
  color: #dbeafe;
}

.verification-status-list .activity-row strong,
.verification-status-list .activity-row span {
  color: #f8fafc;
}

.verification-workspace .activity-list .activity-row,
.verification-workspace [data-kyc-submissions] .activity-row,
.verification-workspace [data-suitability-status] .activity-row {
  border-color: rgba(148, 163, 184, .14) !important;
  background: rgba(2, 6, 23, .38) !important;
  color: #dbeafe !important;
}

.verification-workspace .activity-list .activity-row strong,
.verification-workspace .activity-list .activity-row span {
  color: #f8fafc;
}

@media (max-width: 1180px) {
  .dashboard-layout,
  .verification-hero,
  .verification-layout {
    grid-template-columns: 1fr !important;
  }

  .dashboard-performance-panel,
  .dashboard-trades-panel,
  .dashboard-market-panel,
  .dashboard-transactions-panel,
  .dashboard-health-panel,
  .dashboard-copy-panel,
  .dashboard-actions-panel,
  .dashboard-alerts-panel {
    grid-column: 1 !important;
  }

  .verification-summary {
    position: static;
  }
}

@media (max-width: 720px) {
  body:has([data-portal-page="dashboard"]),
  body:has([data-portal-page="kyc-suitability"]) {
    overflow-y: auto;
  }

  .app-main {
    overflow-y: visible;
  }

  .dashboard-workspace,
  .verification-workspace {
    min-height: auto;
    padding-left: 12px;
    padding-right: 12px;
  }

  .dashboard-performance-panel,
  .dashboard-trades-panel {
    min-height: 0;
  }

  .dashboard-equity-chart {
    min-height: 126px !important;
  }

  .dashboard-equity-chart .dashboard-sparkline {
    height: 88px !important;
  }

  .dashboard-watch-row {
    grid-template-columns: 1fr !important;
    gap: 8px;
    text-align: left;
  }

  .verification-progress,
  .requirements-grid,
  .verification-field-grid {
    grid-template-columns: 1fr;
  }

  .requirements-grid article {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .requirements-grid .badge {
    grid-column: 2;
    justify-self: start;
  }

  .verification-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.two-factor-challenge {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.admin-preview-modal {
  width: min(980px, calc(100vw - 24px));
  max-height: min(860px, calc(100vh - 24px));
}

.admin-preview-body {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.admin-segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  width: fit-content;
}

.admin-segmented button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  padding: 8px 12px;
}

.admin-segmented button.active {
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
}

.admin-preview-variables {
  display: grid;
  gap: 8px;
}

.admin-preview-variables div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-preview-variables code {
  padding: 4px 7px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 6px;
}

.admin-preview-modal iframe {
  width: 100%;
  min-height: 420px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #fff;
}

.admin-preview-modal pre {
  overflow: auto;
  max-height: 440px;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 560px) {
  .admin-preview-modal {
    width: calc(100vw - 12px);
  }

  .admin-segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .admin-preview-modal iframe {
    min-height: 320px;
  }
}
