@font-face {
  font-family: Aktiv;
  src: url(aktiv-400.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Aktiv;
  src: url(aktiv-500.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Aktiv;
  src: url(aktiv-600.woff2) format("woff2");
  font-weight: 600;
  font-display: swap;
}
:root {
  --ink: #141d22;
  --muted: #6c8595;
  --line: #dedfe1;
  --soft: #f3f4f5;
  --yellow: #ffde02;
  --page: #fff;
  --banner: #fff9ec;
  --link: #0088ff;
  --error: #e63737;
  --green: #13894f;
  font-family: Aktiv, Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  font-size: 14px;
  letter-spacing: 0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
  color: inherit;
  letter-spacing: 0;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: 3px;
}
svg.lucide {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
  flex-shrink: 0;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  font-weight: 500;
  line-height: 40px;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
  margin: 32px 0 14px;
}
small {
  font-size: 12px;
}
strong {
  font-weight: 500;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}
.success-text {
  color: var(--green);
}
.danger-text {
  color: var(--error);
}
.button {
  min-height: 40px;
  border: 0;
  border-radius: 4px;
  background: var(--soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  color: var(--ink);
  font-size: 14px;
  white-space: normal;
  line-height: 20px;
  text-align: center;
}
.button:hover {
  background: #e8ebed;
  text-decoration: none;
}
.primary {
  background: var(--yellow);
  color: #141d22;
}
.primary:hover {
  background: #efd100;
}
.full {
  width: 100%;
}
.icon-button {
  width: 40px;
  height: 40px;
  padding: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  border-radius: 4px;
  color: var(--ink);
}
.icon-button:hover {
  background: var(--soft);
  text-decoration: none;
}
.portal-header {
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: var(--page);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 16px;
}
.wordmark {
  color: var(--ink);
  font-size: 36px;
  font-weight: 500;
  line-height: 44px;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wordmark:hover {
  text-decoration: none;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 0;
}
.header-balance {
  border: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  background: transparent;
  padding: 10px;
  min-height: 40px;
}
.header-balance strong {
  font-weight: 400;
}
.mobile-menu {
  display: none;
}
.notification-dot {
  width: 6px;
  height: 6px;
  background: var(--error);
  border-radius: 50%;
  position: absolute;
  margin: -14px 0 0 12px;
}
.portal-sidebar {
  position: fixed;
  top: 56px;
  bottom: 0;
  left: 0;
  width: 56px;
  border-right: 1px solid var(--line);
  z-index: 29;
  background: var(--page);
  transition: width 0.16s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 12px;
}
.sidebar-open .portal-sidebar {
  width: 232px;
  box-shadow: 6px 0 16px #00000008;
}
.rail-link {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 18px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.rail-link span {
  display: none;
}
.sidebar-open .rail-link span {
  display: block;
}
.rail-link:hover,
.rail-link.active {
  color: var(--ink);
  background: var(--soft);
  text-decoration: none;
}
.rail-bottom {
  margin: 8px;
  border: 1px solid #ddcef8;
  background: #f5f2fa;
  border-radius: 2px;
  padding: 0 10px;
  height: 42px;
}
.portal-body {
  margin-left: 56px;
}
.verification-banner {
  background: var(--banner);
  min-height: 80px;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.verification-symbol {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 4px solid #deddd5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.verification-symbol .lucide {
  width: 22px;
  height: 22px;
}
.verification-banner p {
  font-size: 16px;
  line-height: 24px;
  flex: 1;
}
.verification-actions {
  display: flex;
  gap: 8px;
}
.verification-actions .button {
  background: #f3efe3;
}
.verification-actions .primary {
  min-width: 80px;
  background: var(--yellow);
}
.portal-content {
  padding: 24px 40px 0;
  min-height: 680px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 24px;
}
.page-heading h1 {
  min-width: 0;
}
.page-heading .support-link {
  white-space: nowrap;
  text-decoration: underline;
}
.promotions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 8px 40px 0;
}
.promo {
  height: 100px;
  position: relative;
  overflow: hidden;
  border: 1px solid #cec6c6;
  border-radius: 8px;
  background: #e6dcde;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
}
.promo:hover {
  text-decoration: none;
  background: #e0d6d8;
}
.promo > div:first-child {
  max-width: 80%;
  z-index: 1;
}
.promo strong,
.promo span {
  display: block;
  font-size: 16px;
  line-height: 24px;
}
.promo strong {
  font-weight: 500;
}
.promo-phone {
  width: 54px;
  height: 110px;
  background: #141d22;
  border-radius: 10px;
  padding: 3px;
  position: absolute;
  right: 30px;
  top: 18px;
  transform: rotate(-6deg);
  box-shadow: 2px 2px 0 #fff;
}
.promo-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 7px;
}
.partner-promo > .lucide {
  width: 64px;
  height: 64px;
  color: #a5a5a5;
  margin: 0 0 0 20px;
  stroke-width: 1;
}
.promo-pagination {
  display: none;
}
.accounts-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0;
}
.segmented {
  display: flex;
  padding: 3px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  gap: 0;
  flex-shrink: 0;
}
.segmented button {
  min-height: 32px;
  padding: 0 24px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.segmented button[aria-pressed="true"] {
  background: var(--soft);
  color: var(--ink);
}
.account-view-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}
.view-switch button {
  padding: 0 8px;
}
.view-switch .lucide {
  width: 15px;
  height: 15px;
}
.sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding-left: 12px;
}
.sort-control .lucide {
  width: 15px;
  color: #8b9094;
}
.sort-control select {
  border: 0;
  padding: 8px 30px 8px 0;
  background: transparent;
  min-width: 86px;
}
.accounts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.accounts-list.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.account-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.account-card.selected {
  border-color: var(--muted);
}
.account-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  position: relative;
  padding-right: 30px;
  min-height: 20px;
  flex-wrap: wrap;
}
.account-badge {
  background: var(--soft);
  border-radius: 12px;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 16px;
}
.account-number {
  margin-left: 8px;
  font-weight: 500;
}
.account-name {
  overflow-wrap: anywhere;
  max-width: 100%;
}
.account-expand {
  position: absolute;
  right: -8px;
  top: -8px;
  color: var(--muted);
  width: 32px;
  height: 32px;
}
.account-expand .lucide {
  width: 16px;
}
.account-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.account-balance {
  font-size: 32px;
  line-height: 40px;
  white-space: nowrap;
  font-weight: 400;
}
.account-balance small {
  font-size: 16px;
}
.account-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.account-action {
  display: flex;
  align-items: center;
  gap: 8px;
}
.account-action .button {
  padding: 0 18px;
}
.account-action .lucide {
  width: 16px;
}
.account-action .action-label {
  display: none;
}
.account-menu-button {
  width: 40px;
  padding: 0;
}
.account-details {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.account-details p {
  margin-top: 4px;
}
.empty-state {
  padding: 64px 16px;
  text-align: center;
}
.empty-state > .lucide {
  width: 56px;
  height: 56px;
  color: var(--muted);
  margin-bottom: 12px;
}
.empty-state h2 {
  font-size: 24px;
  line-height: 32px;
  margin: 0 0 8px;
}
.empty-state p {
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 24px;
}
.page-error {
  padding: 16px;
  background: #fff0ee;
  color: var(--error);
  margin-bottom: 24px;
}
.payment-region {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  flex-wrap: wrap;
  margin-bottom: 38px;
}
.payment-region a {
  text-decoration: underline;
}
.country-flag {
  width: 24px;
  height: 18px;
  background: linear-gradient(#e62626 50%, #fff 50%);
  border: 1px solid #dedfe1;
}
.payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}
.payment-card {
  display: flex;
  align-items: flex-start;
  text-align: left;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
  padding: 28px 30px;
  min-height: 156px;
  position: relative;
  color: var(--ink);
  width: 100%;
}
.payment-card:hover {
  border-color: var(--muted);
  text-decoration: none;
  background: var(--soft);
}
.payment-card > .lucide {
  width: 36px;
  height: 36px;
  background: #b9bfc1;
  color: white;
  border-radius: 50%;
  padding: 6px;
  margin-top: 2px;
}
.payment-card strong {
  font-size: 16px;
  line-height: 24px;
  display: block;
  margin-bottom: 12px;
}
.payment-card p {
  color: var(--muted);
  line-height: 24px;
  font-size: 14px;
}
.payment-grid .payment-card:only-child {
  grid-column: 1;
}
.payment-unavailable {
  color: var(--muted);
  opacity: 0.65;
}
.payment-tag {
  position: absolute;
  top: 28px;
  right: 24px;
  font-size: 12px;
  background: var(--banner);
  color: #ab7d13;
  padding: 4px 8px;
  border-radius: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
  min-width: 0;
}
.field > span:first-child {
  font-size: 13px;
  line-height: 18px;
}
.field input,
.field select {
  border: 1px solid var(--line);
  border-radius: 4px;
  height: 40px;
  min-width: 0;
  width: 100%;
  background: var(--page);
  padding: 9px 12px;
  font-size: 14px;
  outline-offset: 1px;
}
.field select {
  padding-right: 28px;
}
.input-wrap {
  position: relative;
  display: block;
}
.input-wrap input[type="password"],
.input-wrap input[data-password-visible] {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  right: 0;
  top: 0;
  color: #8a959c;
}
.password-toggle .lucide {
  width: 16px;
  height: 16px;
}
.financial-form {
  max-width: 456px;
  margin-top: 32px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
.financial-form > .primary {
  margin-top: 24px;
  min-width: 140px;
}
.form-message {
  font-size: 14px;
  line-height: 22px;
  color: var(--error);
  margin: 16px 0 0;
  overflow-wrap: anywhere;
}
.form-message.success {
  color: var(--green);
}
.page-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  min-height: 48px;
  margin-top: 8px;
  overflow: auto;
}
.page-tabs a,
.page-tabs > span {
  padding: 12px 0;
  white-space: nowrap;
  color: var(--muted);
}
.page-tabs .active {
  border-bottom: 3px solid var(--ink);
  color: var(--ink);
}
.history-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 18px;
  background: var(--soft);
  padding: 0 12px;
  max-width: 100%;
  height: 32px;
}
.filter select {
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  max-width: 100%;
  height: 32px;
  padding-right: 4px;
  min-width: 0;
}
.filter .lucide {
  width: 14px;
  height: 14px;
}
.period-filter {
  background: var(--muted);
  color: white;
}
.period-filter option {
  color: var(--ink);
  background: var(--page);
}
.history-filters + [data-history] .empty-state {
  padding-top: 54px;
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 32px;
}
.history-table th {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}
.history-table td {
  padding: 18px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.status {
  font-size: 12px;
  padding: 4px 8px;
  display: inline-block;
  border-radius: 12px;
  background: var(--soft);
  white-space: nowrap;
}
.status.pending {
  color: #9b7500;
  background: #fff9dc;
}
.status.completed {
  color: var(--green);
  background: #eef8f2;
}
.status.rejected,
.status.failed {
  color: var(--error);
  background: #fff0ee;
}
.history-reference {
  font-size: 12px;
  color: var(--muted);
  display: block;
}
.more-history {
  display: flex;
  margin: 24px auto;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.profile-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 112px;
}
.profile-status strong {
  font-size: 20px;
  line-height: 28px;
  display: block;
  overflow-wrap: anywhere;
}
.profile-status small {
  display: block;
  margin-bottom: 4px;
}
.profile-status .muted {
  display: block;
  overflow-wrap: anywhere;
}
.profile-information {
  border: 1px solid var(--line);
  border-radius: 4px;
}
.information-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 24px;
  gap: 16px;
}
.information-row:last-child {
  border: 0;
}
.information-row small {
  color: var(--muted);
}
.information-row p {
  margin-top: 8px;
  overflow-wrap: anywhere;
  line-height: 22px;
}
.verification-row {
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
}
.verification-row > div {
  flex: 1;
}
.verification-row p {
  margin-top: 6px;
}
.verification-row > .lucide {
  width: 32px;
  height: 32px;
  color: var(--muted);
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.setting-row h2 {
  font-size: 20px;
  margin: 0 0 6px;
}
.portal-footer {
  margin-left: 56px;
  padding: 64px 40px 96px;
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr);
  gap: 12%;
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
}
.legal-copy p {
  margin-bottom: 10px;
}
.portal-footer nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.portal-footer nav a {
  text-decoration: underline;
}
.portal-footer nav p {
  margin-top: 16px;
}
.support-fab {
  width: 56px;
  height: 56px;
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: var(--yellow);
  border-radius: 50%;
  color: #141d22;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px #0003;
  z-index: 22;
}
.support-fab:hover {
  background: #efd100;
}
.support-fab .lucide {
  width: 20px;
  height: 20px;
}
.popover {
  position: fixed;
  z-index: 50;
  min-width: 224px;
  max-width: min(360px, calc(100vw - 24px));
  background: var(--page);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px #0002;
  border-radius: 4px;
  padding: 8px;
  max-height: 70vh;
  overflow: auto;
}
.popover a,
.popover button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
}
.popover a:hover,
.popover button:hover {
  background: var(--soft);
  text-decoration: none;
}
.popover .menu-profile {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.popover .menu-profile strong,
.popover .menu-profile small {
  display: block;
  line-height: 24px;
}
.popover p {
  padding: 12px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.popover .menu-divider {
  height: 1px;
  background: var(--line);
  margin: 6px;
}
.notification-item {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.notification-item strong {
  display: block;
  margin-bottom: 6px;
}
.notification-item p {
  padding: 0;
  color: var(--muted);
  font-size: 13px;
}
.portal-dialog {
  border: 0;
  border-radius: 8px;
  padding: 24px;
  background: var(--page);
  color: var(--ink);
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  box-shadow: 0 16px 64px #0003;
  overflow: auto;
}
.portal-dialog::backdrop {
  background: #141d2266;
}
.portal-dialog > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.portal-dialog h2 {
  font-size: 24px;
  line-height: 32px;
  margin: 0;
}
.portal-dialog .field:last-of-type {
  margin-bottom: 16px;
}
.dialog-summary {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  line-height: 24px;
}
.dialog-summary dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  gap: 8px;
}
.dialog-summary dt {
  color: var(--muted);
}
.dialog-summary dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.dialog-notice {
  background: var(--banner);
  padding: 12px;
  line-height: 22px;
  margin-bottom: 20px;
}
.toast-region {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(100vw - 32px);
  background: var(--ink);
  color: var(--page);
  padding: 12px 20px;
  border-radius: 4px;
  line-height: 22px;
  display: none;
}
.toast-region.visible {
  display: block;
}
.auth-main {
  width: 392px;
  max-width: calc(100% - 32px);
  margin: 24px auto 0;
  min-height: 584px;
}
.auth-main h1 {
  font-size: 24px;
  line-height: 32px;
  white-space: normal;
  margin-bottom: 24px;
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  height: 56px;
  margin-bottom: 30px;
}
.auth-tabs a {
  flex: 1;
  text-align: center;
  padding: 16px 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 24px;
}
.auth-tabs a:hover {
  text-decoration: none;
}
.auth-tabs .active {
  color: var(--ink);
  border-bottom: 4px solid var(--ink);
}
.auth-form > .login-submit {
  margin-top: 24px;
}
.auth-recovery {
  display: block;
  text-align: center;
  margin: 24px 0;
  font-size: 14px;
}
.auth-form p:not(.form-message) {
  line-height: 24px;
  margin-bottom: 24px;
}
.auth-form .password-policy {
  margin: -16px 0 20px;
}
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 20px;
  margin: 24px 0;
}
.checkbox-field input {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin: 2px 0;
  accent-color: var(--ink);
}
.auth-page .portal-footer {
  margin-left: 0;
  padding-top: 64px;
}
.auth-page .wordmark {
  max-width: 80%;
}
.sidebar-scrim {
  position: fixed;
  inset: 56px 0 0;
  background: #0005;
  z-index: 28;
}
[data-portal-theme="dark"] {
  --ink: #ecf0f2;
  --muted: #91a5b0;
  --line: #394247;
  --soft: #2c3438;
  --page: #1c2327;
  --banner: #343123;
  --link: #5faeff;
  color-scheme: dark;
}
[data-portal-theme="dark"] .promo {
  background: #3c3539;
  border-color: #65575f;
}
[data-portal-theme="dark"] .verification-actions .button:not(.primary) {
  background: #403c2f;
  color: var(--ink);
}
[data-portal-theme="dark"] .status.completed {
  background: #21392e;
}
[data-portal-theme="dark"] .status.pending {
  background: #393523;
  color: #e1c463;
}
@media (min-width: 1600px) {
  .portal-content {
    max-width: 1600px;
    margin: auto;
  }
  .portal-footer {
    padding-right: 80px;
  }
}
@media (max-width: 1100px) {
  .account-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
  .account-actions {
    align-self: flex-end;
  }
  .accounts-list.grid .account-actions {
    flex-wrap: wrap;
    align-self: flex-start;
  }
  .payment-tag {
    position: static;
    display: inline-block;
    margin-top: 10px;
  }
  .payment-card {
    padding: 24px;
  }
  .verification-banner {
    gap: 12px;
  }
  .verification-banner p {
    font-size: 14px;
  }
}
@media (max-width: 700px) {
  h1 {
    font-size: 32px;
    line-height: 40px;
  }
  .portal-header {
    padding: 0 16px;
    justify-content: center;
    height: 56px;
  }
  .wordmark {
    font-size: 36px;
    max-width: 65%;
    line-height: 44px;
  }
  .header-tools {
    position: absolute;
    right: 16px;
  }
  .mobile-menu {
    display: flex;
    position: absolute;
    left: 16px;
  }
  .header-balance,
  .language-button,
  .desktop-tool {
    display: none;
  }
  .auth-page .language-button {
    display: flex;
  }
  .auth-page .portal-header {
    justify-content: space-between;
  }
  .auth-page .wordmark {
    font-size: 32px;
  }
  .portal-sidebar {
    transform: translateX(-100%);
    width: 248px;
    transition: transform 0.16s;
  }
  .sidebar-open .portal-sidebar {
    transform: none;
    width: 248px;
  }
  .portal-sidebar span {
    display: block;
  }
  .portal-body {
    margin-left: 0;
  }
  .verification-banner {
    padding: 16px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    background: var(--banner);
  }
  .verification-banner p {
    font-size: 16px;
    line-height: 24px;
  }
  .verification-actions {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .verification-actions .button {
    padding: 0 8px;
  }
  .portal-content {
    padding: 24px 16px 0;
    min-height: 610px;
  }
  .promotions {
    display: flex;
    gap: 16px;
    margin: 0;
    overflow: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .promotions::-webkit-scrollbar {
    display: none;
  }
  .promo {
    flex: 0 0 100%;
    height: 120px;
    scroll-snap-align: start;
    padding: 16px;
  }
  .promo > div:first-child {
    max-width: 73%;
  }
  .promo-phone {
    right: 22px;
    top: 20px;
    height: 132px;
    width: 62px;
  }
  .partner-promo > .lucide {
    width: 64px;
    height: 64px;
    margin-top: 10px;
  }
  .promo-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding-top: 8px;
    margin-bottom: 16px;
  }
  .promo-pagination i {
    width: 8px;
    height: 8px;
    background: #cdd1d3;
    border-radius: 50%;
  }
  .promo-pagination i:first-child {
    background: #929b9f;
  }
  .page-heading {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
  }
  .page-heading h1 {
    flex: 1 1 auto;
    min-width: 0;
  }
  .page-heading .button {
    width: auto;
    flex: 0 0 auto;
    padding: 0 14px;
  }
  .page-heading .support-link {
    font-size: 13px;
  }
  .accounts-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    margin: 24px 0;
  }
  .accounts-toolbar > .segmented {
    width: 100%;
  }
  .accounts-toolbar > .segmented button {
    flex: 1;
  }
  .accounts-toolbar > .segmented button[aria-pressed="true"] {
    border: 1px solid #92a7b5;
    background: #e2e8ec;
    color: #075283;
  }
  .account-view-tools,
  .sort-control {
    width: 100%;
  }
  .sort-control select {
    flex: 1;
    padding-left: 4px;
  }
  .view-switch {
    display: none;
  }
  .account-card {
    padding: 16px;
    min-height: 220px;
  }
  .accounts-list.grid {
    display: flex;
  }
  .account-topline {
    gap: 4px 6px;
    min-height: 46px;
    margin-bottom: 20px;
  }
  .account-topline .account-number {
    margin-left: 0;
    flex-basis: auto;
  }
  .account-topline .account-badge:nth-child(2)::after {
    content: "";
  }
  .account-topline .account-number::before {
    content: "";
  }
  .account-topline .account-name {
    flex: 1;
  }
  .account-topline:after {
    content: "";
    order: -1;
    width: 100%;
    height: 0;
  }
  .account-badge {
    order: -2;
  }
  .account-number,
  .account-name {
    order: 1;
  }
  .account-expand {
    top: -4px;
    right: -4px;
  }
  .account-bottom {
    gap: 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .account-balance {
    font-size: 32px;
    line-height: 40px;
  }
  .account-actions {
    align-self: stretch;
    display: flex;
    justify-content: space-around;
    gap: 4px;
  }
  .account-action {
    flex-direction: column;
    gap: 8px;
    min-width: 48px;
  }
  .account-action .button {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    gap: 0;
  }
  .account-action .button > .action-text {
    display: none;
  }
  .account-action .lucide {
    width: 22px;
    height: 22px;
  }
  .account-action .action-label {
    display: block;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
  }
  .account-action.desktop-transfer {
    display: none;
  }
  .account-details {
    gap: 16px;
  }
  .payment-region {
    font-size: 14px;
    gap: 8px;
    margin-bottom: 32px;
  }
  .payment-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .payment-card {
    padding: 24px 20px;
    min-height: 148px;
    gap: 16px;
  }
  .payment-card strong {
    font-size: 16px;
  }
  .payment-card > .lucide {
    width: 32px;
    height: 32px;
  }
  .payment-card p {
    font-size: 13px;
    line-height: 22px;
  }
  .financial-form {
    max-width: none;
  }
  .filter {
    height: 32px;
    max-width: 100%;
  }
  .history-filters {
    gap: 8px;
  }
  .history-filters + [data-history] .empty-state {
    padding: 48px 0;
  }
  .empty-state h2 {
    font-size: 20px;
    line-height: 28px;
  }
  .empty-state p {
    font-size: 14px;
    line-height: 22px;
  }
  .history-table,
  .history-table tbody {
    display: block;
    width: 100%;
  }
  .history-table thead {
    display: none;
  }
  .history-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }
  .history-table td {
    padding: 0;
    border: 0;
    font-size: 13px;
  }
  .history-table td:first-child {
    grid-column: 1;
  }
  .history-table td:nth-child(2) {
    grid-row: 2;
    grid-column: 1;
  }
  .history-table td:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }
  .history-table td:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .profile-status {
    padding: 20px;
  }
  .profile-status strong {
    font-size: 20px;
  }
  .information-row {
    padding: 20px;
    gap: 12px;
  }
  .verification-row {
    padding: 20px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .verification-row .button {
    margin-left: 44px;
  }
  .setting-row {
    padding: 24px 0;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .setting-row > div:first-child {
    min-width: 180px;
    flex: 1;
  }
  .setting-row h2 {
    font-size: 18px;
    line-height: 26px;
  }
  .setting-row .segmented {
    flex-shrink: 1;
  }
  .setting-row .segmented button {
    padding: 0 16px;
  }
  .portal-footer {
    margin-left: 0;
    padding: 64px 16px 96px;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .legal-copy {
    order: 2;
  }
  .portal-footer nav {
    order: 1;
  }
  .auth-main {
    margin-top: 24px;
    min-height: 520px;
  }
  .auth-main h1 {
    font-size: 24px;
    line-height: 32px;
  }
  .auth-page .portal-footer {
    padding-top: 40px;
  }
  .support-fab {
    width: 48px;
    height: 48px;
    right: 16px;
    bottom: 16px;
  }
  .portal-dialog {
    padding: 24px 20px;
    width: 440px;
  }
  .portal-dialog h2 {
    font-size: 22px;
    line-height: 30px;
  }
  .portal-dialog .form-actions .button {
    padding: 0 16px;
  }
  .toast-region {
    bottom: 76px;
    width: max-content;
    text-align: center;
  }
}
.wordmark img {
  width: 120px;
  height: 36px;
  object-fit: contain;
  display: block;
}
.wordmark .brand-dark {
  display: none;
}
[data-portal-theme="dark"] .wordmark .brand-dark {
  display: block;
}
[data-portal-theme="dark"] .wordmark .brand-light {
  display: none;
}
.financial-confirmation h2 {
  margin: 0 0 16px;
}
.financial-confirmation .form-actions {
  justify-content: space-between;
}
.dialog-notice p {
  overflow-wrap: anywhere;
}
.dialog-notice .button {
  margin-top: 10px;
}
.portal-sidebar button.rail-link {
  width: 100%;
  border: 0;
  border-radius: 0;
  text-align: left;
  background: transparent;
  font-size: 14px;
}
.portal-sidebar button.rail-link:hover,
.portal-sidebar button.rail-link.active {
  background: var(--soft);
}
.rail-subnav a {
  display: block;
  padding: 12px 16px 12px 54px;
  color: var(--ink);
  line-height: 20px;
  font-size: 14px;
}
.rail-subnav a:hover {
  background: var(--soft);
  text-decoration: none;
}
.sidebar-open .portal-sidebar {
  overflow-y: auto;
}
.sidebar-open .rail-bottom {
  flex-shrink: 0;
}
.portal-sidebar {
  transition: none;
}
.account-balance {
  display: flex;
  align-items: baseline;
}
.account-balance small {
  line-height: 24px;
}
.account-action .button {
  padding: 0 20px;
}
.account-menu-button.button {
  padding: 0;
}
.portal-dialog {
  padding: 24px 32px 32px;
}
.portal-dialog::backdrop {
  background: #ffffffb3;
}
.dialog-account {
  margin: -16px 0 24px;
}
.dialog-description {
  line-height: 22px;
  margin-bottom: 24px;
}
[data-portal-theme="dark"] .portal-dialog::backdrop {
  background: #111a;
}
.financial-page-form {
  margin-top: 24px;
  scroll-margin-top: 80px;
}
.financial-form-panel {
  border: 1px solid var(--line);
  background: var(--page);
  border-radius: 4px;
  padding: 24px;
}
.financial-form-panel .page-tabs {
  margin: 0 0 24px;
}
.financial-form-panel form {
  max-width: 640px;
}
.financial-form-panel .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
.financial-form-panel .dialog-notice {
  margin: 16px 0;
}
.financial-form-panel .dialog-notice p {
  overflow-wrap: anywhere;
}
.financial-form-panel .dialog-notice .button {
  margin-top: 10px;
}
@media (max-width: 700px) {
  .financial-form-panel {
    padding: 16px;
  }
  .financial-form-panel .form-actions {
    flex-direction: column-reverse;
  }
  .financial-form-panel .form-actions .button {
    width: 100%;
  }
}
.amount-input-wrap {
  display: flex;
  align-items: center;
}
.amount-input-currency {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.amount-input-wrap input {
  border-radius: 0 4px 4px 0;
  flex: 1;
  min-width: 0;
}
@media (max-width: 700px) {
  .account-action .button {
    padding: 0;
  }
  .support-fab {
    display: none;
  }
  .portal-dialog {
    padding: 24px;
  }
  .sidebar-open .portal-sidebar {
    transition: transform 0.16s;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Keep the public footer at the bottom on short pages without making it fixed. */
body.portal-page,
body.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.portal-page .portal-body,
body.auth-page .auth-main {
  flex: 1 0 auto;
}

body.portal-page .portal-footer,
body.auth-page .portal-footer {
  margin-top: auto;
}

@media (max-width: 700px) {
  .public-portal-page .language-button {
    display: flex;
  }
}

.auth-name-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.auth-name-grid .field {
  min-width: 0;
}

.referral-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px;
  border: 1px solid #e6e9eb;
  border-radius: 8px;
  background: linear-gradient(120deg, #fff9ec, #fff);
  margin-bottom: 24px;
}
.referral-hero-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  flex-shrink: 0;
}
.referral-hero-icon .lucide {
  width: 28px;
  height: 28px;
}
.referral-hero small,
.referral-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.referral-hero h2 {
  margin: 4px 0 6px;
  font-size: 24px;
  line-height: 32px;
}
.referral-hero p {
  color: var(--muted);
  line-height: 22px;
}
.referral-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.referral-card {
  padding: 24px;
  border: 1px solid #e6e9eb;
  border-radius: 8px;
  background: var(--page);
}
.referral-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.referral-card-heading .lucide {
  color: var(--muted);
}
.referral-card h2 {
  margin: 4px 0 0;
  font-size: 20px;
}
.referral-copy-row {
  display: flex;
  gap: 10px;
}
.referral-copy-row input {
  min-width: 0;
  flex: 1;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
  color: var(--ink);
  font-size: 13px;
}
.referral-copy-row .button {
  flex-shrink: 0;
}
.referral-code-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.referral-code-card strong {
  margin: 10px 0 8px;
  font-size: 28px;
  letter-spacing: 0.08em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.referral-code-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}
.referral-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.referral-steps > div {
  display: flex;
  gap: 12px;
  padding: 20px;
  border-top: 2px solid var(--yellow);
  background: var(--soft);
}
.referral-steps > div > span {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--yellow);
  font-weight: 600;
  flex-shrink: 0;
}
.referral-steps h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.referral-steps p {
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

@media (max-width: 700px) {
  .referral-hero {
    align-items: flex-start;
    padding: 20px;
    gap: 14px;
  }
  .referral-hero h2 {
    font-size: 20px;
    line-height: 28px;
  }
  .referral-grid,
  .referral-steps {
    grid-template-columns: 1fr;
  }
  .referral-card {
    padding: 20px;
  }
  .referral-copy-row {
    flex-direction: column;
  }
  .referral-copy-row .button {
    width: 100%;
  }
  .referral-steps > div {
    padding: 16px;
  }
}

/* Fallback menus share the navbar's responsive boundary, including open submenus. */
@media (min-width: 701px) {
  .portal-sidebar [data-navbar-fallback] {
    display: none !important;
  }
}

@media (max-width: 700px) {
  .account-card {
    padding: 16px;
    border-radius: 8px;
  }
  .account-topline {
    min-height: 46px;
    margin-bottom: 20px;
    gap: 4px 6px;
  }
  .account-topline > .account-badge-running,
  .account-topline > .account-badge-completed {
    margin-left: auto;
  }
  .account-balance {
    margin: 6px 0 2px;
    font-size: 40px;
    line-height: 48px;
  }
  .account-balance small {
    font-size: 24px;
    line-height: 30px;
  }
  .account-actions {
    width: 100%;
    justify-content: space-around;
    gap: 4px;
  }
  .account-action {
    flex: 1 1 0;
    min-width: 48px;
  }
  .account-action.desktop-transfer {
    display: flex !important;
  }
}

.legal-hero {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  background: linear-gradient(160deg, var(--soft), transparent 65%);
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}
.legal-hero small {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.legal-hero h2 {
  margin: 0;
  font-size: 24px;
  line-height: 30px;
}
.legal-hero p {
  font-size: 14px;
  line-height: 22px;
  color: var(--muted);
}
.legal-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.legal-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: var(--page);
  display: grid;
  gap: 10px;
}
.legal-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
}
.legal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}
.legal-card.is-active {
  border-color: #47667b;
  box-shadow: 0 0 0 1px rgba(71, 102, 123, 0.2) inset;
  background: linear-gradient(
    180deg,
    rgba(108, 133, 149, 0.08),
    transparent 55%
  );
}
.legal-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.legal-card-actions .button {
  min-height: 36px;
  padding: 0 14px;
}
.legal-document {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--page);
  padding: 22px;
  display: grid;
  gap: 14px;
}
.legal-document-header {
  display: grid;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.legal-document-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 30px;
}
.legal-document-header p {
  margin: 0;
  color: var(--muted);
  line-height: 22px;
}
.legal-section {
  display: grid;
  gap: 8px;
}
.legal-section h3 {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
.legal-section p {
  margin: 0;
  color: var(--muted);
  line-height: 22px;
}
.legal-section ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  line-height: 21px;
}
.legal-section li {
  margin: 0;
}

@media (max-width: 900px) {
  .legal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .legal-hero {
    padding: 16px;
    border-radius: 10px;
  }
  .legal-hero h2 {
    font-size: 21px;
    line-height: 27px;
  }
  .legal-hero-actions .button {
    width: 100%;
  }
  .legal-document {
    padding: 16px;
    border-radius: 10px;
  }
  .legal-document-header h2 {
    font-size: 20px;
    line-height: 27px;
  }
}

/* Expanded account layout follows Exness-like desktop card structure. */
.account-details {
  display: grid;
  gap: 14px;
  padding-top: 12px;
}
.account-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
  background: var(--soft);
  border-radius: 8px;
  padding: 12px 16px;
}
.account-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed #d3d9de;
  min-height: 34px;
  gap: 12px;
}
.account-stat:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.account-stat span {
  color: var(--muted);
  font-size: 13px;
}
.account-stat strong {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}
.account-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.account-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.account-meta-item small {
  color: var(--muted);
  font-size: 12px;
}
.account-meta-item strong {
  font-size: 16px;
  line-height: 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-meta-item a {
  font-size: 14px;
  line-height: 20px;
}
.account-meta-copy {
  width: 28px;
  height: 28px;
  padding: 6px;
}
.account-orders-row {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.account-orders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.account-orders-header a {
  color: var(--ink);
  font-weight: 500;
}
.account-orders {
  display: grid;
  gap: 8px;
  min-height: 48px;
}
.account-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.account-order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
}
.account-order-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.account-order-meta strong {
  display: block;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-order-meta small {
  display: block;
  font-size: 11px;
  line-height: 16px;
  color: var(--muted);
}
.account-order-symbol {
  flex-shrink: 0;
}
.account-order-profit {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.account-order-profit.is-rise {
  color: var(--green);
}
.account-order-profit.is-fall {
  color: var(--error);
}
.account-order-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--soft);
  font-size: 12px;
}
.account-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.account-plan-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--page);
}
.account-plan-grid p {
  margin: 0;
  font-size: 14px;
  line-height: 21px;
}
.account-details-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #f1e2a2;
  background: #fff9e2;
  border-radius: 8px;
  padding: 10px 12px;
}
.account-details-note .button {
  min-height: 36px;
  padding: 0 14px;
}
.account-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.account-badge {
  font-size: 13px;
  line-height: 20px;
  border-radius: 999px;
  padding: 0 8px;
  background: #f3f6f8;
  color: #3f5968;
}
.account-badge-mode {
  background: #ecfaf0;
  color: #108449;
}
.account-badge-running {
  background: #fff0c7;
  color: #8a5b00;
  border: 1px solid #e7c66c;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 145px;
}
.account-topline > .account-badge-running,
.account-topline > .account-badge-completed {
  margin-left: auto;
}
.account-badge-running .lucide {
  width: 13px;
  height: 13px;
}
.account-countdown {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.account-badge-pending {
  display: none;
}
.account-badge-pending .lucide {
  width: 13px;
  height: 13px;
}
.account-badge-completed {
  background: #d9f7e5;
  color: #08783e;
  border: 1px solid #8ed8ad;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.account-badge-completed .lucide {
  width: 13px;
  height: 13px;
}
.account-number {
  margin-left: 4px;
}
.account-balance {
  font-size: 40px;
  line-height: 48px;
  font-weight: 500;
  margin: 6px 0 2px;
}
.account-balance small {
  font-size: 30px;
  line-height: 38px;
  font-weight: 500;
}
.account-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: nowrap;
}
.account-action {
  flex: 1 1 0;
  min-width: 0;
}
.account-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.account-action .button {
  width: 48px;
  min-height: 48px;
  height: 48px;
  border-radius: 999px;
  padding: 0;
  border: 1px solid #e6eaee;
  background: #f2f4f7;
  color: #18242d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.account-action .button.primary {
  background: #ffd429;
  border-color: #ffd429;
  color: #121820;
}
.account-action .button .action-text {
  display: none;
}
.account-action.desktop-transfer {
  display: flex !important;
}
.account-menu-button.button {
  min-width: 48px;
  padding: 0;
}
.action-label {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: #202e38;
  text-align: center;
}
@media (min-width: 701px) {
  .account-actions {
    gap: 8px;
    align-items: center;
  }
  .account-action {
    flex: 0 0 auto;
    display: block;
  }
  .account-action .button {
    width: auto;
    min-width: 0;
    min-height: 40px;
    height: 40px;
    border-radius: 4px;
    padding: 0 20px;
    gap: 8px;
    border: 0;
    background: rgba(108, 133, 149, 0.08);
    color: #141d22;
    font-size: 14px;
    font-weight: 400;
  }
  .account-action .button.primary {
    background: var(--yellow);
    color: #141d22;
  }
  .account-action .button .lucide {
    width: 16px;
    height: 16px;
  }
  .account-action .button .action-text {
    display: inline;
  }
  .account-menu-button.button {
    min-width: 40px;
    width: 40px;
    padding: 0;
  }
  .account-menu-button .action-text {
    display: none;
  }
  .action-label {
    display: none;
  }
}
.account-stats-grid {
  background: #f7f9fb;
  border: 1px solid #eef2f5;
}
.account-meta-row {
  display: grid;
  grid-template-columns: 1fr;
  padding-top: 10px;
  gap: 0;
  border-top: 1px solid #ebeff3;
}
.account-meta-item {
  padding: 8px 0;
  margin: 0;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dashed #d6dde3;
}
.account-meta-item:last-child {
  border-bottom: 0;
}
.account-meta-item small {
  font-size: 13px;
  line-height: 20px;
  color: #6f7f8b;
}
.account-meta-item strong {
  font-size: 14px;
  line-height: 20px;
  text-align: right;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-security-row {
  display: flex;
  justify-content: center;
  padding-top: 10px;
}
.account-security-row a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1e2a35;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}
.account-security-row a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .account-stats-grid {
    grid-template-columns: 1fr;
  }
  .account-stat {
    min-height: 30px;
  }
  .account-stat:nth-last-child(-n + 2) {
    border-bottom: 1px dashed #d3d9de;
  }
  .account-stat:last-child {
    border-bottom: 0;
  }
  .account-balance small {
    font-size: 24px;
    line-height: 30px;
  }
  .account-plan-grid {
    grid-template-columns: 1fr;
  }
  .account-details-note {
    flex-direction: column;
    align-items: flex-start;
  }
}

.public-home-page {
  --home-surface: var(--page);
  --home-muted: #48616f;
  --home-border: var(--line);
  --home-glow: color-mix(in srgb, var(--yellow) 72%, var(--home-surface));
  --home-tint: color-mix(in srgb, var(--yellow) 28%, var(--home-surface));
}
[data-portal-theme="dark"] .public-home-page {
  --home-surface: #252f34;
  --home-muted: #b9c8d0;
  --home-glow: color-mix(in srgb, var(--yellow) 8%, var(--home-surface));
  --home-tint: color-mix(in srgb, var(--yellow) 4%, var(--home-surface));
}
.public-home-page :is(.public-home-hero, .public-home-panel, .public-home-metrics article) {
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}
.public-home-page :is(h1, h2, .public-home-metrics strong) {
  color: var(--ink);
}
.public-home-page .button {
  min-height: 44px;
  height: auto;
  text-align: center;
  white-space: normal;
}
.public-home-page .portal-public-body {
  margin-left: 0;
}
.public-home-page .portal-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 24px;
}
.public-home-hero {
  border: 1px solid var(--home-border);
  border-radius: 16px;
  padding: 26px;
  background: radial-gradient(
    circle at 86% 14%,
    var(--home-glow) 0,
    var(--home-tint) 22%,
    var(--home-surface) 54%
  );
  display: grid;
  gap: 14px;
}
.public-home-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--home-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.public-home-lead {
  max-width: 760px;
  color: var(--home-muted);
  line-height: 24px;
  font-size: 16px;
}
.public-home-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.public-home-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.public-home-metrics article {
  border: 1px solid var(--home-border);
  border-radius: 12px;
  padding: 12px;
  background: var(--home-surface);
}
.public-home-metrics small {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--home-muted);
  font-weight: 600;
}
.public-home-metrics strong {
  display: block;
  font-size: 21px;
  line-height: 28px;
  margin-top: 4px;
}
.public-home-metrics span {
  display: block;
  color: var(--home-muted);
  line-height: 20px;
  font-size: 13px;
  margin-top: 4px;
}
.public-home-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.public-home-panel {
  border: 1px solid var(--home-border);
  border-radius: 14px;
  padding: 18px;
  background: var(--home-surface);
  display: grid;
  gap: 12px;
}
.public-home-panel h2 {
  margin: 0;
  font-size: 24px;
  line-height: 30px;
}
.public-home-panel p {
  color: var(--home-muted);
  line-height: 22px;
}
.public-home-panel.accent {
  background: linear-gradient(
    145deg,
    var(--home-tint) 0,
    var(--home-surface) 44%
  );
  border-color: var(--home-border);
}

@media (max-width: 900px) {
  .public-home-metrics {
    grid-template-columns: 1fr;
  }
  .public-home-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .public-home-page .portal-content {
    padding: 24px 16px 16px;
  }
  .public-home-hero {
    padding: 18px;
    border-radius: 12px;
  }
  .public-home-hero h1 {
    font-size: 32px;
    line-height: 40px;
  }
  .public-home-lead {
    font-size: 14px;
    line-height: 22px;
  }
  .public-home-actions .button {
    width: 100%;
  }
  .public-home-panel h2 {
    font-size: 20px;
    line-height: 27px;
  }
}

.portal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: #fff;
  border-right: 1px solid #eceff2;
  width: 260px;
}
.portal-body {
  margin-left: 260px;
}
body.portal-page:not(.public-portal-page) .portal-footer {
  margin-left: 260px;
}
@media (min-width: 701px) and (max-width: 1260px) {
  body.portal-page:not(.public-portal-page) .portal-footer {
    margin-left: 56px;
  }
}
@media (max-width: 700px) {
  body.portal-page:not(.public-portal-page) .portal-footer {
    margin-left: 0;
  }
}
.sidebar-head {
  padding: 0;
  border-bottom: 1px solid #edf1f3;
}
.sidebar-user-toggle {
  justify-content: flex-start;
  min-height: 46px;
  height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 10px;
}
.portal-sidebar .rail-link {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: #1f2f39;
  font-size: 15px;
  text-decoration: none;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}
.portal-sidebar .rail-link:hover {
  text-decoration: none;
  background: rgba(108, 133, 149, 0.08);
}
.portal-sidebar .rail-link .lucide {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
  color: #6c8595;
}
.portal-sidebar .rail-link .lucide:last-child {
  margin-left: auto;
  color: #80929d;
  width: 16px;
  height: 16px;
}
.rail-link-compact {
  min-height: 46px;
  height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  gap: 10px;
}
.rail-link-compact:hover,
.rail-link-compact:focus,
.rail-link-compact.active {
  background: var(--soft) !important;
  border-color: transparent !important;
}
.rail-link-compact .lucide:first-child {
  width: 16px;
  height: 16px;
  color: #415763;
}
.rail-link-compact .lucide:last-child {
  width: 16px;
  height: 16px;
  color: #6f8491;
}
.rail-link-compact .rail-balance-values {
  display: inline-flex !important;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  flex-wrap: nowrap;
}
.rail-link-compact .rail-balance-amount,
.rail-link-compact .rail-balance-currency {
  display: inline !important;
  font-size: 15px;
  line-height: 22px;
  letter-spacing: -0.01em;
}
.rail-link-compact .rail-balance-amount {
  font-weight: 600;
}
.rail-link-compact .rail-balance-currency {
  font-weight: 400;
}
.sidebar-balance {
  border-bottom: 1px solid #edf1f3;
  padding: 2px 0 10px;
}
.balance-subnav {
  padding: 6px 14px 0;
}
.balance-visibility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #5d7381;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f3;
}
.balance-toggle {
  width: 36px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #dbe3e8;
  position: relative;
}
.balance-toggle::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #637b8a;
}
.balance-account {
  padding: 8px 0 6px;
}
.balance-account strong {
  display: inline-block;
  max-width: 100%;
  font-size: 21px;
  line-height: 28px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.balance-account p {
  color: #607785;
  font-size: 13px;
  line-height: 18px;
  margin-top: 2px;
}
.balance-actions {
  display: flex;
  gap: 8px;
}
.balance-actions .button {
  min-height: 34px;
  padding: 0 16px;
  font-weight: 500;
}
.sidebar-groups {
  padding: 6px 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar-groups::-webkit-scrollbar {
  display: none;
}
.sidebar-groups .rail-subnav {
  padding: 0 0 8px;
}
.sidebar-groups .rail-subnav a {
  display: block;
  padding: 10px 14px 10px 40px;
  color: #344c5b;
  font-size: 13px;
  line-height: 20px;
}
.sidebar-groups .rail-subnav a:hover {
  text-decoration: none;
  background: #f7f9fb;
}
.sidebar-groups > .rail-link,
.sidebar-groups > .rail-subnav {
  border-bottom: 1px solid #edf1f3;
}
.sidebar-groups > .rail-subnav {
  margin-top: -1px;
}
.rail-referral {
  margin-top: auto;
  border-top: 1px solid #edf1f3;
  padding: 14px;
  background: #f4ecff;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #1d2530;
  text-decoration: none;
}
.rail-referral:hover {
  text-decoration: none;
  background: #ede1ff;
}
.rail-referral strong {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.01em;
  font-weight: 600;
  display: block;
}

.portal-sidebar .rail-link span {
  display: block;
  font-size: 15px;
  line-height: 22px;
}
.sidebar-user-toggle span {
  font-size: 15px;
  line-height: 22px;
}
.sidebar-groups .rail-link span,
.sidebar-balance .rail-link span,
.sidebar-head .rail-link span {
  font-size: 15px;
  line-height: 22px;
}
.header-balance strong {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  white-space: nowrap;
}

@media (min-width: 701px) and (max-width: 1260px) {
  .sidebar-head .rail-link span,
  .sidebar-groups .rail-link span,
  .rail-referral span,
  .rail-referral strong {
    display: none !important;
  }
  .portal-sidebar {
    width: 56px;
    transition: width 0.15s ease;
    overflow: hidden;
  }
  .portal-body {
    margin-left: 56px;
  }
  .sidebar-head,
  .sidebar-groups {
    padding: 8px;
  }
  .portal-sidebar .rail-link {
    width: 40px;
    min-height: 40px;
    height: 40px;
    margin: 0 auto;
    padding: 0;
    justify-content: center;
    gap: 0;
    border-radius: 4px;
    white-space: nowrap;
  }
  .portal-sidebar .rail-link:hover {
    background: rgba(108, 133, 149, 0.08);
  }
  .portal-sidebar .rail-link .lucide {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  .portal-sidebar .rail-link .lucide:last-child {
    display: none;
  }
  .sidebar-user-toggle {
    width: 40px;
    min-height: 40px;
    height: 40px;
    margin: 0 auto;
    padding: 0;
    justify-content: center;
    border-radius: 4px;
  }
  .portal-sidebar:not(:hover) .sidebar-groups .rail-subnav {
    display: none !important;
  }
  .sidebar-groups > .rail-link,
  .sidebar-groups > .rail-subnav {
    border-bottom: 0;
  }
  .rail-referral {
    padding: 10px;
    justify-content: center;
    align-items: center;
  }

  .portal-sidebar:hover {
    width: 260px;
    overflow: visible;
    box-shadow: 6px 0 16px rgba(0, 0, 0, 0.1);
    z-index: 39;
  }
  .portal-sidebar:hover .sidebar-head .rail-link span,
  .portal-sidebar:hover .sidebar-groups .rail-link span,
  .portal-sidebar:hover .rail-referral span,
  .portal-sidebar:hover .rail-referral strong {
    display: block !important;
  }
  .portal-sidebar:hover .sidebar-head,
  .portal-sidebar:hover .sidebar-groups {
    padding: 6px 0;
  }
  .portal-sidebar:hover .rail-link {
    width: 100%;
    min-height: 46px;
    height: 46px;
    margin: 0;
    padding: 0 14px;
    justify-content: flex-start;
    gap: 10px;
    border-radius: 0;
  }
  .portal-sidebar:hover .rail-link .lucide {
    width: 18px;
    height: 18px;
  }
  .portal-sidebar:hover .rail-link .lucide:last-child {
    display: block;
    margin-left: auto;
  }
  .portal-sidebar:hover .sidebar-user-toggle {
    width: 100%;
    min-height: 46px;
    height: 46px;
    margin: 0;
    padding: 0 14px;
    justify-content: flex-start;
  }
  .portal-sidebar:hover .rail-referral {
    padding: 14px;
    justify-content: flex-start;
    align-items: flex-start;
  }
}

.primary-account-shell {
  border: 1px solid #e6edf2;
  border-radius: 12px;
  padding: 14px 14px 10px;
  margin: 0 0 16px;
  background: linear-gradient(180deg, #fbfdff 0, #fff 100%);
}
.primary-account-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.orders-filters {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: end;
  gap: 16px;
  margin: 24px 0;
}
.orders-filters .filter {
  height: 32px;
}
.orders-account-field {
  min-width: 0;
  margin: 0;
}
.orders-account-field select {
  width: 100%;
  min-width: 0;
}
.orders-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 12px;
  margin: 0;
}
.orders-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.orders-toolbar-actions .button {
  white-space: nowrap;
}
.orders-scope {
  display: inline-flex;
}
.orders-scope button {
  border: 1px solid var(--line);
  background: var(--page);
  color: var(--muted);
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
}
.orders-scope button:first-child {
  border-radius: 4px 0 0 4px;
}
.orders-scope button:last-child {
  border-radius: 0 4px 4px 0;
  border-left: 0;
}
.orders-scope button.is-active {
  background: var(--ink);
  color: var(--page);
  border-color: var(--ink);
}
.orders-filters + [data-orders] .empty-state {
  padding: 48px 0;
}
.orders-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 24px;
}
.orders-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.orders-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.orders-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  white-space: nowrap;
}
.orders-table tbody tr:hover {
  background: var(--soft);
}
.orders-table--clickable tbody tr[data-order-id] {
  cursor: pointer;
}
.orders-table--clickable tbody tr[data-order-id]:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: -2px;
}
.order-side {
  display: inline-block;
  text-transform: capitalize;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: var(--soft);
  color: var(--ink);
}
.order-side.is-sell {
  background: #fbe9e9;
  color: #c53030;
}
.order-side.is-buy {
  background: #e6f4ec;
  color: var(--green);
}
.orders-table .is-rise {
  color: var(--green);
}
.orders-table .is-fall {
  color: var(--error);
}
.orders-symbol-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.orders-symbol-text small {
  display: none;
  color: var(--muted);
  font-weight: 400;
}
.orders-th-chevron,
.orders-row-chevron {
  display: none;
}
.symbol-badge {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 22px;
  flex-shrink: 0;
}
.symbol-chip {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border: 2px solid var(--page);
  box-sizing: border-box;
}
.symbol-chip--quote {
  left: 10px;
  top: 4px;
  z-index: 1;
}
.order-info-heading .symbol-badge {
  width: 36px;
  height: 26px;
  margin-bottom: 2px;
}
.order-info-heading .symbol-chip {
  width: 24px;
  height: 24px;
  font-size: 12px;
}
.order-info-heading .symbol-chip--quote {
  left: 12px;
  top: 5px;
}
.more-orders {
  margin: 24px auto 0;
  display: flex;
}
.order-info-id {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 20px;
}
.order-info-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  margin: 0 0 24px;
}
.order-info-heading strong {
  font-size: 15px;
  font-weight: 400;
}
.order-info-profit {
  font-size: 26px;
  font-weight: 500;
}
.order-info-profit.is-rise {
  color: var(--green);
}
.order-info-profit.is-fall {
  color: var(--error);
}
.order-info-section {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 12px;
}
.order-info-overview div {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.order-info-overview div:last-child {
  border-bottom: 0;
}
.order-info-overview dt {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.order-info-overview dd {
  margin: 0;
  font-size: 13px;
  white-space: nowrap;
}
.order-info-fill {
  flex: 1 1 auto;
  border-bottom: 1px dotted var(--line);
  margin-bottom: 4px;
}
@media (max-width: 833px) {
  .orders-filters {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .orders-toolbar {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .orders-toolbar-actions {
    margin-left: auto;
  }
  .orders-table-wrap {
    overflow-x: visible;
  }
  .orders-table {
    min-width: 0;
    display: block;
  }
  .orders-table thead,
  .orders-table tbody {
    display: block;
  }
  .orders-table th,
  .orders-table td {
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
    display: block;
  }
  .orders-table tr {
    display: flex;
    align-items: center;
  }
  .orders-table th:nth-child(2),
  .orders-table th:nth-child(3),
  .orders-table th:nth-child(4),
  .orders-table th:nth-child(5),
  .orders-table th:nth-child(6),
  .orders-table td:nth-child(2),
  .orders-table td:nth-child(3),
  .orders-table td:nth-child(4),
  .orders-table td:nth-child(5),
  .orders-table td:nth-child(6) {
    display: none;
  }
  .orders-table th:first-child,
  .orders-table td:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }
  .orders-table th:nth-child(7),
  .orders-table td:nth-child(7) {
    text-align: right;
    white-space: nowrap;
    padding-right: 4px;
  }
  .orders-th-chevron {
    border-bottom: 1px solid var(--line);
  }
  .orders-symbol-cell {
    width: 100%;
  }
  .orders-symbol-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .orders-symbol-text strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .orders-symbol-text small {
    display: block;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .orders-table th.orders-th-chevron,
  .orders-table td.orders-row-chevron {
    display: flex;
    align-items: center;
    color: var(--muted);
    padding-left: 4px !important;
  }
  .orders-row-chevron .lucide {
    width: 18px;
    height: 18px;
  }
}
[data-portal-theme="dark"] .order-side.is-sell {
  background: #3a2323;
  color: #f28b8b;
}
[data-portal-theme="dark"] .order-side.is-buy {
  background: #1f3a2c;
  color: #7fd9a6;
}
.primary-account-header p {
  margin: 0;
  color: #607987;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.primary-account-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 28px;
}
.primary-account-card {
  border-color: #d9e6ef;
  box-shadow: 0 0 0 1px rgba(89, 132, 160, 0.08) inset;
}
.accounts-secondary-title {
  margin: 4px 0 10px;
  font-size: 16px;
  line-height: 22px;
  color: #4e6878;
}

@media (max-width: 700px) {
  .primary-account-shell {
    padding: 12px;
    margin: 0 0 14px;
  }
  .primary-account-header h2 {
    font-size: 20px;
    line-height: 26px;
  }
  .accounts-secondary-title {
    margin: 2px 0 10px;
  }
}

@media (max-width: 700px) {
  .portal-sidebar {
    width: 258px;
    transform: translateX(-100%);
    position: fixed;
    left: 0;
    top: 56px;
    bottom: 0;
    z-index: 40;
    transition: transform 0.16s;
  }
  .sidebar-open .portal-sidebar {
    transform: translateX(0);
  }
  .portal-body {
    margin-left: 0;
  }
  .rail-referral strong {
    font-size: 15px;
    line-height: 21px;
  }
}

/* Clear hierarchy: category buttons are primary navigation; links inside
   rail-subnav are visually recessed secondary navigation. */
.sidebar-groups {
  padding: 10px 10px 14px;
  background: #fbfcfd;
}
.sidebar-groups > .rail-link {
  min-height: 44px;
  height: 44px;
  margin: 2px 0;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  color: #243b49;
}
.sidebar-groups > .rail-link:hover {
  background: #f0f4f6;
  border-color: #e1e8ec;
}
.sidebar-groups > .rail-link[aria-expanded="true"] {
  background: #e8f0f4;
  border-color: #cfdee5;
  color: #172d3a;
}
.sidebar-groups > .rail-link[aria-expanded="true"] .lucide:first-child {
  color: #2d647f;
}
.sidebar-groups > .rail-subnav {
  margin: 0 0 6px;
  padding: 4px 0 7px 10px;
  border: 0;
  border-left: 2px solid #d7e3e9;
  background: #f6f9fa;
  border-radius: 0 8px 8px 0;
}
.sidebar-groups > .rail-subnav a {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px 7px 16px;
  color: #526b79;
  font-size: 13px;
  line-height: 18px;
  border-radius: 5px;
}
.sidebar-groups > .rail-subnav a:hover {
  background: #eaf1f4;
  color: #1f465b;
}
.sidebar-groups > .rail-subnav a[aria-current="page"] {
  background: #e1edf2;
  color: #1d5873;
  font-weight: 600;
}
.sidebar-groups > .rail-link:not(button) {
  font-weight: 500;
}
[data-portal-theme="dark"] .sidebar-groups {
  background: #20282c;
}
[data-portal-theme="dark"] .sidebar-groups > .rail-link {
  color: #dce7eb;
}
[data-portal-theme="dark"] .sidebar-groups > .rail-link:hover {
  background: #2a353a;
  border-color: #3b4a51;
}
[data-portal-theme="dark"] .sidebar-groups > .rail-link[aria-expanded="true"] {
  background: #2d3d44;
  border-color: #46606c;
}
[data-portal-theme="dark"] .sidebar-groups > .rail-subnav {
  border-left-color: #4a6572;
  background: #253136;
}
[data-portal-theme="dark"] .sidebar-groups > .rail-subnav a {
  color: #aebfc7;
}
[data-portal-theme="dark"] .sidebar-groups > .rail-subnav a:hover,
[data-portal-theme="dark"]
  .sidebar-groups
  > .rail-subnav
  a[aria-current="page"] {
  background: #30464f;
  color: #e9f4f7;
}

@media (min-width: 701px) and (max-width: 1260px) {
  .sidebar-groups {
    padding: 8px;
  }
  .portal-sidebar:hover .sidebar-groups {
    padding: 10px 10px 14px;
  }
  .portal-sidebar:hover .sidebar-groups > .rail-link {
    width: 100%;
    margin: 2px 0;
    height: 44px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 8px;
  }
  .portal-sidebar:hover .sidebar-groups > .rail-subnav {
    margin: 0 0 6px;
    padding: 4px 0 7px 10px;
  }
}

/* Keep identity and balance areas visually separate from the primary menu. */
.sidebar-head {
  padding: 8px 10px;
  background: #f7fafb;
  border-bottom: 1px solid #e2eaee;
}
.sidebar-head .sidebar-user-toggle {
  min-height: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: 7px;
  font-weight: 600;
  color: #243b49;
}
.sidebar-head .sidebar-user-toggle:hover,
.sidebar-head .sidebar-user-toggle[aria-expanded="true"] {
  background: #e8f0f4;
}
.sidebar-head + .rail-subnav {
  margin: 0 10px 8px;
  padding: 4px 0 6px 10px;
  border: 0;
  border-left: 2px solid #d7e3e9;
  background: #f6f9fa;
  border-radius: 0 7px 7px 0;
}
.sidebar-head + .rail-subnav .rail-link {
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  color: #526b79;
  font-size: 13px;
  border-radius: 5px;
}
.sidebar-head + .rail-subnav .rail-link:hover {
  background: #eaf1f4;
  color: #1f465b;
}
.sidebar-balance {
  flex-shrink: 0;
  margin: 0;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--page);
}
.sidebar-balance-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}
.sidebar-balance .balance-account {
  padding: 8px 0 14px;
}
.sidebar-balance .balance-account strong {
  display: block;
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.sidebar-balance .balance-account p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}
.sidebar-balance .balance-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.sidebar-balance .balance-actions .button {
  min-width: 0;
  min-height: 40px;
  padding: 8px;
  font-size: 13px;
}
[data-portal-theme="dark"] .sidebar-head {
  background: #222c30;
  border-bottom-color: #3a484e;
}
[data-portal-theme="dark"] .sidebar-head .sidebar-user-toggle {
  color: #dce7eb;
}
[data-portal-theme="dark"] .sidebar-head .sidebar-user-toggle:hover,
[data-portal-theme="dark"]
  .sidebar-head
  .sidebar-user-toggle[aria-expanded="true"] {
  background: #2d3d44;
}
[data-portal-theme="dark"] .sidebar-head + .rail-subnav {
  border-left-color: #4a6572;
  background: #253136;
}
[data-portal-theme="dark"] .sidebar-head + .rail-subnav .rail-link {
  color: #aebfc7;
}
[data-portal-theme="dark"] .sidebar-head + .rail-subnav .rail-link:hover {
  background: #30464f;
  color: #e9f4f7;
}
[data-portal-theme="dark"] .sidebar-balance {
  border-color: var(--line);
  background: var(--page);
}

@media (min-width: 701px) and (max-width: 1260px) {
  .portal-sidebar:hover .sidebar-head {
    padding: 8px 10px;
    background: #f7fafb;
  }
  .portal-sidebar:hover .sidebar-head + .rail-subnav {
    margin: 0 10px 8px;
  }
}

.wallet-summary-card {
  border: 1px solid #dce7ec;
  border-radius: 14px;
  padding: 22px;
  background: linear-gradient(145deg, #f4f9fb 0, #fff 68%);
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
  max-width: 760px;
}
.wallet-summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #66808e;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.wallet-summary-heading .lucide {
  width: 18px;
  height: 18px;
  color: #2d647f;
}
.wallet-summary-card > strong {
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.wallet-summary-card > strong small {
  font-size: 15px;
  color: #6c8595;
  font-weight: 500;
}
.wallet-summary-card > p {
  color: #6c8595;
  font-size: 13px;
  line-height: 20px;
}
.wallet-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.wallet-summary-actions .button {
  min-height: 38px;
  padding: 0 14px;
}
.wallet-section {
  max-width: 900px;
  margin: 0 0 28px;
}
.wallet-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}
.wallet-section-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
}
.wallet-section-heading > span {
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.wallet-section-heading > a {
  font-size: 13px;
  font-weight: 600;
}
.wallet-address-list,
.wallet-account-list {
  display: grid;
  gap: 8px;
}
.wallet-address-card,
.wallet-account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid #e1e9ed;
  border-radius: 10px;
  background: var(--page);
}
.wallet-address-card:hover,
.wallet-account-card:hover {
  background: #f8fbfc;
  border-color: #cbdde5;
}
.wallet-asset-icon,
.wallet-account-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #e8f5ee;
  color: #13894f;
}
.wallet-account-icon {
  background: #e8f0f4;
  color: #2d647f;
}
.wallet-asset-icon .lucide,
.wallet-account-icon .lucide {
  width: 19px;
  height: 19px;
}
.wallet-address-copy,
.wallet-account-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.wallet-address-copy strong,
.wallet-account-copy strong {
  font-size: 14px;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wallet-address-copy code {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wallet-account-copy span {
  font-size: 12px;
  color: var(--muted);
  line-height: 18px;
}
.wallet-account-balance {
  display: grid;
  gap: 2px;
  text-align: right;
  flex: 0 0 auto;
}
.wallet-account-balance strong {
  font-size: 14px;
  line-height: 19px;
}
.wallet-account-balance span {
  font-size: 11px;
  color: var(--muted);
}
.wallet-empty-state {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}
[data-portal-theme="dark"] .wallet-summary-card {
  border-color: #40545c;
  background: linear-gradient(145deg, #29383e 0, #20282c 68%);
}
[data-portal-theme="dark"] .wallet-address-card,
[data-portal-theme="dark"] .wallet-account-card {
  border-color: #3a484e;
  background: #20282c;
}
[data-portal-theme="dark"] .wallet-address-card:hover,
[data-portal-theme="dark"] .wallet-account-card:hover {
  background: #29373c;
  border-color: #4b6670;
}
@media (max-width: 700px) {
  .wallet-summary-card {
    padding: 18px;
    border-radius: 12px;
  }
  .wallet-summary-card > strong {
    font-size: 28px;
    line-height: 36px;
  }
  .wallet-summary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .wallet-summary-actions .button:last-child {
    grid-column: 1/-1;
  }
  .wallet-account-card {
    gap: 8px;
    padding: 10px;
  }
  .wallet-account-balance {
    margin-left: auto;
  }
}

.wallet-help-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px;
  padding: 16px 22px;
  background: #e7f1ee;
  border-radius: 0;
  color: #172d3a;
  text-decoration: none;
}
.wallet-help-banner:hover {
  text-decoration: none;
  background: #dcebe6;
}
.wallet-help-mark {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  line-height: 1;
  color: #172d3a;
  flex: 0 0 auto;
}
.wallet-help-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.wallet-help-copy strong {
  font-size: 22px;
  line-height: 27px;
  font-weight: 500;
}
.wallet-help-copy small {
  font-size: 13px;
  line-height: 19px;
}
.wallet-help-banner > .button {
  min-height: 40px;
  background: #dce8e5;
  padding: 0 20px;
}
.wallet-total-balance {
  display: grid;
  gap: 3px;
  margin: 0 0 18px;
}
.wallet-total-balance > span {
  font-size: 13px;
  color: var(--muted);
}
.wallet-total-balance > strong {
  font-size: 32px;
  line-height: 38px;
  font-weight: 500;
}
.wallet-total-balance > strong small {
  font-size: 18px;
  font-weight: 500;
}
.wallet-primary-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.wallet-primary-actions .button {
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}
.wallet-tabs {
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 24px;
}
.wallet-tabs button {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 16px 13px;
  font-size: 15px;
}
.wallet-tabs button.is-active {
  color: var(--ink);
  font-weight: 500;
}
.wallet-tabs button.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--ink);
  border-radius: 3px 3px 0 0;
}
.wallet-account-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  color: var(--muted);
  background: var(--page);
}
.wallet-account-select select {
  appearance: none;
  border: 0;
  background: transparent;
  min-height: 38px;
  padding: 0 24px 0 0;
  font-size: 13px;
  color: var(--ink);
  outline: none;
}
.wallet-account-select .lucide {
  position: absolute;
  right: 8px;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.wallet-asset-list {
  display: grid;
  gap: 16px;
}
.wallet-asset-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 24px;
  background: var(--page);
}
.wallet-asset-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wallet-asset-title strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wallet-asset-title strong small {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.wallet-asset-symbol {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d3a400;
  font-size: 18px;
  font-weight: 600;
}
.wallet-asset-amount {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}
.wallet-asset-amount strong {
  font-size: 28px;
  line-height: 34px;
  font-weight: 500;
}
.wallet-asset-amount > span {
  font-size: 13px;
  font-weight: 500;
}
.wallet-asset-amount small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
}
.wallet-asset-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.wallet-asset-actions .button {
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}
.wallet-external-empty {
  padding: 28px 0;
  color: var(--muted);
  font-size: 16px;
}
[data-portal-theme="dark"] .wallet-help-banner {
  background: #293b3a;
  color: #e5f1ed;
}
[data-portal-theme="dark"] .wallet-help-banner:hover {
  background: #304845;
}
[data-portal-theme="dark"] .wallet-help-banner > .button {
  background: #3b504c;
  color: #e5f1ed;
}
[data-portal-theme="dark"] .wallet-tabs button.is-active {
  color: var(--ink);
}
[data-portal-theme="dark"] .wallet-asset-card {
  background: #20282c;
  border-color: #3a484e;
}
@media (max-width: 900px) {
  .wallet-asset-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }
  .wallet-asset-amount {
    display: flex;
  }
  .wallet-asset-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 700px) {
  .wallet-primary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .wallet-primary-actions .button:last-child {
    grid-column: 1/-1;
  }
  .wallet-help-banner {
    padding: 14px 16px;
    gap: 10px;
  }
  .wallet-help-mark {
    width: 34px;
    height: 34px;
    font-size: 26px;
  }
  .wallet-help-copy strong {
    font-size: 16px;
    line-height: 21px;
  }
  .wallet-help-copy small {
    font-size: 11px;
    line-height: 16px;
  }
  .wallet-help-banner > .button {
    display: none;
  }
  .wallet-asset-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .wallet-asset-actions .button:last-child {
    grid-column: 1/-1;
  }
}

/* Portal colour contract. Keep this last so legacy page adapters cannot
 * override contrast-safe primary and secondary interaction states. */
.button:not(.primary) {
  background: var(--secondary);
  color: var(--text-on-secondary);
}
.button:not(.primary):hover {
  background: var(--secondary-hover);
  color: var(--text-on-secondary);
}
.button:not(.primary):active {
  background: var(--secondary-active);
  color: var(--text-on-secondary);
}
.button.primary,
.verification-actions .button.primary,
.account-action .button.primary,
.support-fab {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-on-primary) !important;
}
.button.primary:hover,
.verification-actions .button.primary:hover,
.account-action .button.primary:hover,
.support-fab:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--text-on-primary) !important;
}
.button.primary:active,
.verification-actions .button.primary:active,
.account-action .button.primary:active,
.support-fab:active {
  background: var(--primary-active);
  border-color: var(--primary-active);
  color: var(--text-on-primary) !important;
}
.button.primary :is(span, .lucide),
.support-fab .lucide {
  color: inherit;
  stroke: currentColor;
}
.button.primary:focus-visible,
.support-fab:focus-visible {
  outline-color: var(--primary-active);
}
[data-portal-theme="dark"] {
  --secondary: color-mix(in srgb, var(--primary) 14%, #2c3438);
  --secondary-hover: color-mix(in srgb, var(--primary) 22%, #394247);
  --secondary-active: color-mix(in srgb, var(--primary) 30%, #465158);
  --text-on-secondary: #fff;
}

.history-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  align-items: end;
  gap: 16px;
  margin: 24px 0;
}
.history-account-field {
  min-width: 0;
  margin: 0;
}
.history-account-field select {
  width: 100%;
  min-width: 0;
}
.history-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}
.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 100%;
}
.history-toolbar .filter {
  flex-shrink: 0;
}
.history-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}
.history-view-tabs {
  display: inline-flex;
  gap: 0;
  margin: 8px 0 16px;
  border: 0;
  overflow: visible;
}
.history-view-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--page);
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.history-view-tabs a:first-child {
  border-radius: 4px 0 0 4px;
}
.history-view-tabs a:last-child {
  border-radius: 0 4px 4px 0;
  border-left: 0;
}
.history-view-tabs a.is-active {
  background: var(--ink);
  color: var(--page);
  border-color: var(--ink);
}
@media (max-width: 833px) {
  .history-filters {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .history-controls {
    display: contents;
  }
  .history-account-field {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  .history-view-tabs {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    margin: 0;
  }
  .history-view-tabs a {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    height: auto;
    padding: 8px;
    white-space: normal;
    text-align: center;
  }
  .history-toolbar {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    margin: 0;
    justify-content: flex-start;
    min-width: 0;
  }
  .history-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin: 0;
    min-width: 0;
  }
  .history-toolbar .period-filter {
    grid-column: 1/-1;
  }
  .history-toolbar .filter {
    min-width: 0;
    flex: 1 1 0;
  }
  .history-toolbar .filter select {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.history-table--clickable tbody tr[data-history-id] {
  cursor: pointer;
}
.history-table--clickable tbody tr[data-history-id]:hover {
  background: var(--soft);
}
.history-table--clickable tbody tr[data-history-id]:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: -2px;
}
.transaction-info-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  margin: 0 0 24px;
}
.transaction-info-heading strong {
  font-size: 18px;
  font-weight: 500;
}
.transaction-info-amount {
  font-size: 26px;
  font-weight: 500;
}
.transaction-info-amount.is-credit {
  color: var(--green);
}
.transaction-info-amount.is-debit {
  color: var(--error);
}
.transaction-info-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.transaction-info-section-heading .order-info-section {
  margin: 0;
}
.transaction-info-id {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  text-align: right;
  overflow-wrap: anywhere;
}
.transaction-info-status.completed {
  color: var(--green);
  font-weight: 500;
}
.transaction-info-status.pending {
  color: #9b7500;
  font-weight: 500;
}
.transaction-info-status.rejected,
.transaction-info-status.failed {
  color: var(--error);
  font-weight: 500;
}
.transaction-info-status.cancelled,
.transaction-info-status.reversed {
  color: #8a5a00;
  font-weight: 500;
}
.withdrawal-info {
  display: grid;
  gap: 18px;
}
.withdrawal-info-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.withdrawal-info-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}
.withdrawal-info-icon {
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  line-height: 1;
}
.withdrawal-info-title h3 {
  margin: 0;
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
}
.withdrawal-info-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.withdrawal-info-header .transaction-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.withdrawal-info-header .transaction-detail-actions .icon-button {
  position: static;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.withdrawal-info-header .transaction-detail-actions .icon-button:hover {
  background: var(--soft);
}
.withdrawal-info-header .transaction-detail-actions .icon-button .lucide {
  width: 17px;
  height: 17px;
}
.withdrawal-info-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}
.withdrawal-info-amount > strong {
  font-size: 40px;
  line-height: 46px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.withdrawal-info-amount .status {
  flex-shrink: 0;
}
.withdrawal-timeline {
  display: grid;
  padding: 4px 0 2px;
}
.withdrawal-timeline-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  position: relative;
  min-height: 48px;
}
.withdrawal-timeline-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 27px;
  bottom: -3px;
  border-left: 1px solid var(--line);
}
.withdrawal-timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 1;
}
.withdrawal-timeline-step.is-complete .withdrawal-timeline-dot {
  background: #e6f4ec;
  color: var(--green);
}
.withdrawal-timeline-step.is-current .withdrawal-timeline-dot {
  background: #fff9dc;
  color: #9b7500;
}
.withdrawal-timeline-step strong {
  display: block;
  font-size: 13px;
  line-height: 20px;
}
.withdrawal-timeline-step small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 17px;
}
.withdrawal-info-route,
.withdrawal-info-summary {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-top: 14px;
}
.withdrawal-info-route > div,
.withdrawal-info-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.withdrawal-info-route span,
.withdrawal-info-summary span {
  color: var(--muted);
  font-size: 13px;
}
.withdrawal-info-route strong,
.withdrawal-info-summary strong {
  text-align: right;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.withdrawal-info-notice {
  padding: 14px 16px;
  border: 1px solid #f1e2a2;
  background: #fff9e2;
  border-radius: 4px;
}
.withdrawal-info-notice strong {
  display: block;
  font-size: 14px;
  line-height: 20px;
}
.withdrawal-info-notice p {
  margin: 4px 0 0;
  color: #6f5c26;
  font-size: 12px;
  line-height: 18px;
}
.withdrawal-info-notice.is-success {
  border-color: #bfe5cd;
  background: #eef8f2;
}
.withdrawal-info-notice.is-success p {
  color: #367052;
}
.withdrawal-info-notice.is-pending {
  border-color: #f1d79d;
  background: #fff7e3;
}
.withdrawal-info-notice.is-pending p {
  color: #7a5a1a;
}
.withdrawal-info-notice.is-neutral,
.withdrawal-info-notice.is-stopped {
  border-color: var(--line);
  background: var(--soft);
}
.withdrawal-info-notice.is-neutral p,
.withdrawal-info-notice.is-stopped p {
  color: var(--muted);
}
.withdrawal-timeline-step.is-informational .withdrawal-timeline-dot {
  background: #eaf0ff;
  color: #3d5fe0;
}
.withdrawal-timeline-step.is-stopped .withdrawal-timeline-dot {
  background: var(--soft);
  color: var(--error);
}

/* Complete member dark palette.
 * Several later page adapters predate the portal variables and used fixed
 * light colours. Keep these overrides last so every authenticated route uses
 * one continuous dark surface from the header through the full-height rail. */
[data-portal-theme="dark"] body.portal-page {
  background: var(--page);
  color: var(--ink);
}
[data-portal-theme="dark"] .portal-sidebar {
  background: var(--page);
  border-color: var(--line);
}
[data-portal-theme="dark"] .portal-sidebar .rail-link {
  color: var(--ink);
}
[data-portal-theme="dark"] .portal-sidebar .rail-link .lucide,
[data-portal-theme="dark"] .portal-sidebar .rail-link .lucide:last-child,
[data-portal-theme="dark"] .rail-link-compact .lucide:first-child,
[data-portal-theme="dark"] .rail-link-compact .lucide:last-child {
  color: var(--muted);
}
[data-portal-theme="dark"] .sidebar-balance {
  border-color: var(--line);
}
[data-portal-theme="dark"] .balance-visibility {
  border-color: var(--line);
  color: var(--muted);
}
[data-portal-theme="dark"] .balance-toggle {
  background: #455158;
}
[data-portal-theme="dark"] .balance-toggle::after {
  background: #b5c2c9;
}
[data-portal-theme="dark"] .balance-account p {
  color: var(--muted);
}
[data-portal-theme="dark"] .sidebar-groups > .rail-link,
[data-portal-theme="dark"] .sidebar-groups > .rail-subnav {
  border-color: var(--line);
}
[data-portal-theme="dark"] .rail-referral {
  border-color: #51445f;
  background: #302a38;
  color: #f1eafa;
}
[data-portal-theme="dark"] .rail-referral:hover {
  background: #393044;
}

[data-portal-theme="dark"] .primary-account-shell {
  border-color: var(--line);
  background: linear-gradient(180deg, #222b30 0, var(--page) 100%);
}
[data-portal-theme="dark"] .primary-account-header p,
[data-portal-theme="dark"] .accounts-secondary-title {
  color: var(--muted);
}
[data-portal-theme="dark"] .primary-account-card {
  border-color: #4a5961;
  box-shadow: 0 0 0 1px rgba(145, 165, 176, 0.08) inset;
}
[data-portal-theme="dark"] .account-stats-grid {
  border-color: var(--line);
  background: var(--soft);
}
[data-portal-theme="dark"] .account-stat,
[data-portal-theme="dark"] .account-meta-row,
[data-portal-theme="dark"] .account-meta-item {
  border-color: #465159;
}
[data-portal-theme="dark"] .account-meta-item small {
  color: var(--muted);
}
[data-portal-theme="dark"] .account-security-row a {
  color: var(--ink);
}
[data-portal-theme="dark"] .account-badge {
  background: #303a40;
  color: #c5d0d6;
}
[data-portal-theme="dark"] .account-badge-mode,
[data-portal-theme="dark"] .account-badge-running {
  background: #4a3b18;
  color: #f0cf72;
  border-color: #8c712b;
}
[data-portal-theme="dark"] .account-badge-pending {
  background: #4a3b18;
  color: #f0cf72;
  border-color: #8c712b;
}
[data-portal-theme="dark"] .account-badge-completed {
  background: #16452f;
  color: #8ce5b1;
  border-color: #2f8057;
}
[data-portal-theme="dark"] .account-action .button:not(.primary) {
  border-color: #465159;
  background: #2a3338;
  color: var(--ink);
}
[data-portal-theme="dark"] .account-action .button:not(.primary):hover {
  background: #343f45;
}
[data-portal-theme="dark"] .action-label {
  color: var(--ink);
}
[data-portal-theme="dark"] .account-details-note,
[data-portal-theme="dark"] .withdrawal-info-notice {
  border-color: #665b32;
  background: #3a3524;
}
[data-portal-theme="dark"] .account-details-note p,
[data-portal-theme="dark"] .withdrawal-info-notice p {
  color: #dfcc87;
}
[data-portal-theme="dark"] .withdrawal-info-notice.is-success {
  border-color: #365d49;
  background: #20382d;
}
[data-portal-theme="dark"] .withdrawal-info-notice.is-success p {
  color: #8ed5b0;
}
[data-portal-theme="dark"] .withdrawal-info-notice.is-pending {
  border-color: #66572d;
  background: #3b3120;
}
[data-portal-theme="dark"] .withdrawal-info-notice.is-pending p {
  color: #e8ca6b;
}
[data-portal-theme="dark"] .withdrawal-info-notice.is-neutral,
[data-portal-theme="dark"] .withdrawal-info-notice.is-stopped {
  border-color: var(--line);
  background: var(--soft);
}
[data-portal-theme="dark"] .withdrawal-info-notice.is-neutral p,
[data-portal-theme="dark"] .withdrawal-info-notice.is-stopped p {
  color: var(--muted);
}
[data-portal-theme="dark"]
  .withdrawal-timeline-step.is-complete
  .withdrawal-timeline-dot {
  background: #203a2f;
  color: #7fd9a6;
}
[data-portal-theme="dark"]
  .withdrawal-timeline-step.is-current
  .withdrawal-timeline-dot {
  background: #3c3520;
  color: #e8ca6b;
}
[data-portal-theme="dark"]
  .withdrawal-timeline-step.is-informational
  .withdrawal-timeline-dot {
  background: #22314a;
  color: #9db7ff;
}
[data-portal-theme="dark"]
  .withdrawal-timeline-step.is-stopped
  .withdrawal-timeline-dot {
  background: #3b2025;
  color: #ff9aa6;
}
[data-portal-theme="dark"] .transaction-info-status.pending {
  color: #e8ca6b;
}
[data-portal-theme="dark"] .transaction-info-status.cancelled,
[data-portal-theme="dark"] .transaction-info-status.reversed {
  color: #e0b15a;
}
[data-portal-theme="dark"] .orders-scope button.is-active,
[data-portal-theme="dark"] .history-view-tabs a.is-active {
  border-color: var(--line);
  background: var(--soft);
  color: var(--ink);
}
[data-portal-theme="dark"] .page-error,
[data-portal-theme="dark"] .status.rejected,
[data-portal-theme="dark"] .status.failed {
  background: #442a2a;
}

[data-portal-theme="dark"] .referral-hero {
  border-color: var(--line);
  background: linear-gradient(120deg, #343123, var(--page));
}
[data-portal-theme="dark"] .referral-card {
  border-color: var(--line);
}
[data-portal-theme="dark"] .promo-phone {
  box-shadow: 2px 2px 0 #6d6268;
}
[data-portal-theme="dark"] .wallet-summary-heading,
[data-portal-theme="dark"] .wallet-summary-card > strong small,
[data-portal-theme="dark"] .wallet-summary-card > p {
  color: var(--muted);
}
[data-portal-theme="dark"] .wallet-asset-icon {
  background: #203a2f;
  color: #7fd9a6;
}
[data-portal-theme="dark"] .wallet-account-icon {
  background: #2b3b44;
  color: #8dbbd1;
}

@media (min-width: 701px) and (max-width: 1260px) {
  [data-portal-theme="dark"] .portal-sidebar:hover .sidebar-head {
    background: #222c30;
  }
}

@media (max-width: 700px) {
  [data-portal-theme="dark"]
    .accounts-toolbar
    > .segmented
    button[aria-pressed="true"] {
    border-color: #58717d;
    background: #2b3b43;
    color: #9fd3ec;
  }
}
.order-modal-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.order-modal-symbol .symbol-badge {
  transform: scale(0.95);
}
.order-modal-profit {
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
}
.order-modal-profit.is-rise {
  color: var(--green);
}
.order-modal-profit.is-fall {
  color: var(--error);
}
.order-modal-overview {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.portal-dialog.dialog-no-title > header {
  min-height: 0;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 18px 0;
}
.portal-dialog.dialog-no-title > header h2 {
  display: none;
}
.portal-dialog.dialog-transaction-detail.dialog-no-title > header {
  min-height: 0;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.portal-dialog.dialog-transaction-detail.dialog-no-title > header h2 {
  display: none;
}
.portal-dialog > header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  padding: 16px 20px 0;
}
.portal-dialog > header h2 {
  flex: 1 1 auto;
  margin: 0;
  text-align: center;
  padding: 0 40px;
}
.portal-dialog > header .dialog-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.portal-dialog > header .icon-button {
  position: static;
  top: auto;
  right: auto;
  flex-shrink: 0;
}
.portal-dialog.dialog-transaction-detail > header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  margin-bottom: 10px;
  flex-wrap: nowrap;
}
.portal-dialog.dialog-transaction-detail > header .withdrawal-info-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  margin-right: auto;
}
.portal-dialog.dialog-transaction-detail > header .withdrawal-info-icon {
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.portal-dialog.dialog-transaction-detail > header .withdrawal-info-title h3 {
  margin: 0;
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
}
.portal-dialog.dialog-transaction-detail > header .withdrawal-info-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.portal-dialog.dialog-transaction-detail > header .dialog-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  order: 1;
}
.portal-dialog.dialog-transaction-detail > header .transaction-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: row;
  flex-wrap: nowrap;
}
.portal-dialog.dialog-transaction-detail > header .transaction-detail-actions .icon-button,
.portal-dialog.dialog-transaction-detail > header .icon-button {
  position: static;
  width: 32px;
  height: 32px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.portal-dialog.dialog-transaction-detail > header .transaction-detail-actions .icon-button:hover,
.portal-dialog.dialog-transaction-detail > header .icon-button:hover {
  background: var(--soft);
}
.portal-dialog.dialog-transaction-detail > header .transaction-detail-actions .icon-button .lucide,
.portal-dialog.dialog-transaction-detail > header .icon-button .lucide {
  width: 16px;
  height: 16px;
}
.portal-dialog.dialog-transaction-detail > header [data-command="close-dialog"] {
  order: 2;
  margin-left: 2px;
}
.portal-dialog.dialog-transaction-detail > header h2[data-dialog-title] {
  display: none;
}
.portal-dialog [data-dialog-body] {
  min-width: 0;
}
.portal-dialog .order-info-id {
  line-height: 20px;
  overflow-wrap: anywhere;
}
.portal-dialog .order-info-overview {
  margin: 0;
  padding: 0;
}
.portal-dialog .order-info-overview div {
  display: grid;
  grid-template-columns: max-content minmax(24px, 1fr) minmax(0, max-content);
  align-items: end;
  gap: 8px;
  min-width: 0;
}
.portal-dialog .order-info-overview dt,
.portal-dialog .order-info-overview dd {
  min-width: 0;
  line-height: 20px;
}
.portal-dialog .order-info-overview dt {
  overflow-wrap: anywhere;
}
.portal-dialog .order-info-overview dd {
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}
.portal-dialog .order-info-fill {
  min-width: 12px;
  width: 100%;
  margin-bottom: 5px;
}
@media (max-width: 700px) {
  .portal-dialog .order-info-overview div {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 4px 12px;
    align-items: start;
  }
  .portal-dialog .order-info-fill {
    display: none;
  }
  .portal-dialog .order-info-overview dd {
    text-align: right;
  }
  .withdrawal-info-title h3 {
    font-size: 20px;
    line-height: 26px;
  }
  .withdrawal-info-amount > strong {
    font-size: 34px;
    line-height: 40px;
    font-weight: 800;
  }
  .withdrawal-info-route > div,
  .withdrawal-info-summary > div {
    align-items: flex-start;
  }
  .withdrawal-info-route strong,
  .withdrawal-info-summary strong {
    max-width: 62%;
  }
}

/* Admin-managed member promotion carousel. */
.promo.has-custom-background,
[data-portal-theme="dark"] .promo.has-custom-background {
  background-color: var(--promo-background, #e6dcde);
  background-image: var(--promo-background-image, none);
  background-position: center;
  background-size: cover;
  color: var(--promo-foreground, var(--ink));
}
.promo.has-custom-background:hover,
[data-portal-theme="dark"] .promo.has-custom-background:hover {
  background-color: var(--promo-background, #e6dcde);
  background-image: var(--promo-background-image, none);
  color: var(--promo-foreground, var(--ink));
  filter: brightness(0.97);
}
.promo.has-background-image {
  border-color: color-mix(
    in srgb,
    var(--promo-foreground, #fff) 34%,
    transparent
  );
}
.promo.has-background-image .promo-visual {
  display: none;
}
.promo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 20px;
}
.promo-icon > .lucide {
  width: 64px;
  height: 64px;
  color: #a5a5a5;
  stroke-width: 1;
}
.promotions-shell {
  position: relative;
  margin: 0 0 20px 0;
}
.promotions {
  position: relative;
  margin: 0;
}
.promo-pagination {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  height: auto;
  margin: 0;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(20, 29, 34, 0.28);
  pointer-events: auto;
}
.promo-pagination button {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: #e2e6e8;
  padding: 0;
  cursor: pointer;
}
.promo-pagination button[aria-current="true"] {
  background: #929b9f;
}
.promo-pagination button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Identity verification uses the same tokens and shell as the member portal. */
.kyc-page {
  max-width: 1120px;
  margin: 0 auto;
}
.kyc-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 24px;
}
.kyc-heading {
  margin-bottom: 28px;
}
.kyc-heading p {
  margin-top: 8px;
  font-size: 14px;
}
.kyc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 32px;
  align-items: start;
}
.kyc-card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--page);
}
.kyc-card-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
}
.kyc-card-heading h2,
.kyc-guide h2 {
  margin: 0 0 6px;
}
.kyc-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--soft);
  flex-shrink: 0;
}
.kyc-symbol .lucide {
  width: 24px;
  height: 24px;
}
.kyc-upload {
  position: relative;
  margin: 24px 0 12px;
  border: 1px dashed var(--muted);
  border-radius: 8px;
  background: var(--soft);
}
.kyc-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.kyc-upload:focus-within {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}
.kyc-upload label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 16px;
  text-align: center;
  pointer-events: none;
}
.kyc-upload label > .lucide {
  width: 28px;
  height: 28px;
}
.kyc-upload strong {
  overflow-wrap: anywhere;
  max-width: 100%;
}
.kyc-preview {
  display: block;
  max-width: 100%;
  max-height: 220px;
  margin: 16px auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: contain;
}
.kyc-form-footer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}
.kyc-form-footer p {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.kyc-form-footer .button {
  align-self: flex-start;
  min-height: 44px;
}
.kyc-status {
  display: grid;
  gap: 10px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.kyc-status strong {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kyc-guide {
  min-width: 0;
  padding: 12px 0;
}
.kyc-guide h2 {
  font-size: 16px;
}
.kyc-guide ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 28px;
  display: grid;
  gap: 18px;
}
.kyc-guide li {
  display: flex;
  gap: 10px;
  color: var(--muted);
  line-height: 21px;
}
.kyc-guide li .lucide {
  color: var(--green);
  margin-top: 2px;
}
.kyc-help {
  display: flex;
  gap: 8px;
  align-items: center;
  line-height: 20px;
}
.kyc-result {
  display: grid;
  gap: 20px;
  line-height: 24px;
}
.kyc-result > strong {
  font-size: 20px;
}
.kyc-result p {
  color: var(--muted);
}
.kyc-result .button {
  justify-self: start;
}
.kyc-notice {
  margin-bottom: 20px;
  border: 1px solid currentColor;
  border-radius: 6px;
  padding: 14px 18px;
  line-height: 22px;
}
@media (max-width: 1024px) {
  .kyc-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .kyc-guide {
    padding: 20px;
    border-radius: 10px;
    background: var(--soft);
  }
}
@media (max-width: 700px) {
  .kyc-card {
    padding: 20px 16px;
  }
  .kyc-card-heading {
    gap: 12px;
  }
  .kyc-card-heading h2 {
    font-size: 18px;
  }
  .kyc-heading h1 {
    font-size: 28px;
    line-height: 36px;
  }
  .kyc-form-footer .button,
  .kyc-result .button {
    width: 100%;
  }
  .kyc-back {
    margin-bottom: 20px;
  }
}

@media (max-width: 700px) {
  .promotions {
    scroll-behavior: smooth;
  }
  .promo-pagination button {
    flex: 0 0 8px;
  }
  .partner-promo > .promo-icon {
    margin-top: 10px;
  }
}

/* Account-specific terminal chooser. */
.portal-dialog.dialog-trade { width: 600px; padding: 28px 32px 32px; }
.portal-dialog.dialog-trade > header { min-height: 44px; padding: 0; margin-bottom: 24px; }
.dialog-trade [data-dialog-title] { font-size: 24px; font-weight: 500; line-height: 32px; }
.dialog-trade > header .icon-button { width: 44px; height: 44px; }
.trade-options { display: grid; gap: 12px; }
.trade-option { display: flex; align-items: center; gap: 16px; padding: 20px; min-height: 90px; border: 1px solid transparent; border-radius: 8px; background: var(--soft); color: var(--ink); }
.trade-option:hover { border-color: var(--line); }
.trade-option:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.trade-option > img { flex: 0 0 48px; border-radius: 8px; object-fit: contain; }
.trade-option-copy { display: grid; gap: 6px; min-width: 0; flex: 1; }
.trade-option-copy strong { font-size: 16px; font-weight: 500; line-height: 22px; overflow-wrap: anywhere; }
.trade-option-copy > span { color: var(--muted); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.trade-option > .lucide { width: 20px; height: 20px; flex-shrink: 0; }
@media (max-width: 600px) {
  .portal-dialog.dialog-trade { padding: 20px 16px 24px; }
  .portal-dialog.dialog-trade > header { margin-bottom: 16px; }
  .trade-option { gap: 12px; padding: 16px 12px; }
  .trade-option > img { width: 44px; height: 44px; flex-basis: 44px; }
}
