/* Presentation layer for the client pages reviewed in October 2026.
   Loaded after the generated brand theme; primary colors remain CRM-driven. */
.portal-ui {
    --portal-surface: #fff;
    --portal-subtle: #f5f7fb;
    --portal-border: #e2e7ef;
    --portal-ink: #202b40;
    --portal-muted: #626e82;
    --portal-shadow: 0 4px 20px rgba(24, 39, 75, .045);
    color: var(--portal-ink);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    line-height: 1.55;
}
.portal-ui { max-width: 1600px; padding-bottom: 32px; }
.portal-ui .card {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    box-shadow: var(--portal-shadow);
    min-width: 0;
}
.portal-ui .card-header {
    background: transparent;
    padding: 20px 24px 12px;
    flex-wrap: wrap;
    gap: 12px;
    border-radius: 16px 16px 0 0;
}
.portal-ui .card-body { padding: 24px; min-width: 0; }
.portal-ui .card-title { font-size: 17px; font-weight: 650; color: var(--portal-ink); }
.portal-ui :is(.custom-button, .btnfundingmethod, .btncancelfundingmethod, .btncancelsupport, .btnwallet-approved) {
    min-height: 44px;
    height: auto;
    padding: 11px 20px;
    border-radius: 10px !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.portal-ui .custom-button { margin: 0; min-width: 0; max-width: none; text-decoration: none; }
.portal-ui .custom-button.is-plain {
    border: 1px solid var(--portal-border);
    background: var(--portal-surface);
    color: var(--bw-primary, #334bc8);
}
.portal-ui .custom-button.is-plain:hover {
    background: var(--portal-subtle);
    border-color: var(--bw-primary, #334bc8);
}
.portal-ui .custom-button:not(.is-plain),
.portal-ui .wallet-actions .open-modal-deposit,
.portal-ui #openModalBtn {
    background: var(--bw-primary, #334bc8);
    color: #fff;
    border: 1px solid var(--bw-primary, #334bc8);
}
/* The Deposit button also carries .is-plain, whose light hover background would hide its white label. */
.portal-ui .wallet-actions .open-modal-deposit:hover,
.portal-ui #openModalBtn:hover {
    background: var(--bw-primary, #334bc8);
    border-color: var(--bw-primary, #334bc8);
    color: #fff;
    box-shadow: 0 6px 16px rgba(4, 7, 44, .22);
}
.portal-ui .openDeleteModal {
    color: #b42336;
    background: var(--portal-surface);
    border: 1px solid #edb9c1;
}
.portal-ui .openDeleteModal:hover { background: #fff1f3; color: #971b2b; }
.portal-ui :is(.btncancelfundingmethod, .btncancelsupport):not(.openDeleteModal) {
    border: 1px solid var(--portal-border);
    background: var(--portal-surface);
    color: var(--portal-ink);
}
.portal-ui :is(.btncancelfundingmethod, .btncancelsupport):not(.openDeleteModal):hover { background: var(--portal-subtle); }
.portal-ui :is(button, a, input, select, textarea, [tabindex]):focus-visible,
.portal-login :is(button, a, input):focus-visible {
    outline: 3px solid var(--bw-primary, #334bc8);
    outline-offset: 3px;
}
.portal-ui :is(button:disabled, button[aria-disabled='true']) {
    opacity: .55;
    cursor: not-allowed;
}
.portal-ui :is(.el-input__inner, .form-control, .form-select) {
    min-height: 44px;
    border: 1px solid var(--portal-border);
    border-radius: 8px;
    background-color: var(--portal-surface);
    color: var(--portal-ink);
    font-size: 14px;
    max-width: 100%;
}
.portal-ui :is(.item-label-home, .form-label) {
    display: inline-block;
    color: var(--portal-ink);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}
.portal-ui .el-tabs__nav-scroll { overflow-x: auto; scrollbar-width: thin; }
.portal-ui .el-tabs__nav { display: flex; width: max-content; min-width: 100%; }
.portal-ui :is(.el-tabs__item, .el-tabs__item_modal) {
    min-height: 48px;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    font-weight: 600;
    white-space: nowrap;
}
.portal-ui :is(.el-tabs__item, .el-tabs__item_modal).is-active {
    background: var(--portal-subtle);
    color: var(--bw-primary, #334bc8);
    border-bottom: 3px solid var(--bw-primary, #334bc8);
}
.portal-ui .table-container { width: 100%; max-width: 100%; overflow-x: auto; }
.portal-ui .table-container table { width: 100%; min-width: 640px; }
.portal-ui .table-container th {
    background: var(--portal-subtle);
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 600;
    vertical-align: top;
}
.portal-ui .table-container :is(th, td) { padding: 14px 16px !important; border-color: var(--portal-border); }
.portal-ui .table-container td { font-size: 13px; }
.portal-ui .custom-common-table__header__label { color: var(--portal-muted); margin-bottom: 8px; }
.portal-ui .table-container select { min-height: 40px; min-width: 100px; background: var(--portal-surface); color: var(--portal-ink); }
.portal-ui .custom-pagination { gap: 8px; flex-wrap: wrap; }
.portal-ui .custom-pagination :is(.btn-prev, .btn-next, .number) { min-width: 40px; min-height: 40px; border-radius: 8px; }
.portal-ui .modal-content,
.portal-ui .funding-dialog {
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
    background: var(--portal-surface);
    color: var(--portal-ink);
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.portal-ui .modal-footer { gap: 10px; padding-top: 20px; border-color: var(--portal-border); flex-wrap: wrap; }
.portal-ui .modal-content .el-form-item__content,
.portal-funding .el-form-item__content { left: 0; }
.portal-ui .portal-dialog-close {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--portal-border);
    border-radius: 10px;
    color: var(--portal-muted);
    background: var(--portal-subtle);
    font-size: 24px;
}
/* Overview: clear numeric hierarchy and consistent panel spacing. */
.portal-home .dashboard-stat-card { margin-bottom: 20px; }
.portal-home .dashboard-stat-card .card-body { padding: 22px 20px; }
.portal-home .dashboard-stat-card .ms-3 { margin-left: 0 !important; min-width: 0; }
.portal-home .dashboard-stat-card .stat-number {
    font-size: clamp(24px, 2.1vw, 34px);
    font-weight: 700;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
    white-space: normal;
    overflow-wrap: anywhere;
}
.portal-home .dashboard-stat-card .stat-change { color: var(--portal-muted); font-size: 12px; }
.portal-home .dashboard-assets-section > .el-tabs > .el-tabs__header {
    padding: 12px 20px;
    gap: 16px;
    flex-wrap: wrap;
}
.portal-home :is(.tab-icons, .pane-account_tab) { flex-wrap: wrap !important; gap: 16px !important; }
.portal-home .dashboard-assets-section .el-tabs__nav-wrap { min-width: 0; max-width: 100%; }
/* Wallets: remove fixed blank space and keep actions next to the selection. */
.portal-wallets .wallet-layout { margin: 0; width: 100%; gap: 24px; }
.portal-wallets .my-wallets__overview { padding: 0; }
.portal-wallets .wallet-overview__section { max-width: none; width: 100%; }
.portal-wallets .wallet-overview__section > .wallet-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--portal-ink);
}
.portal-wallets .wallet-overview__section > .flex {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 0;
}
.portal-wallets .wallet-overview__section > .flex > .flex {
    flex-direction: row !important;
    justify-content: flex-start;
    padding: 20px;
    border: 1px solid var(--portal-border);
    border-radius: 14px;
    background: var(--portal-surface);
    box-shadow: var(--portal-shadow);
    text-align: left !important;
    min-width: 0;
}
.portal-wallets .wallet-overview__section .text-center { text-align: left !important; }
.portal-wallets .wallet-overview__section p { font-size: 20px !important; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.portal-wallets .wallet-overview__section .text-sm { color: var(--portal-muted); }
.portal-wallets .wallet-collection { margin: 28px 0; }
.portal-wallets .wallet-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: flex-start; padding: 6px; }
.portal-wallets .wallet-card-selectable { border-radius: 14px; max-width: 100%; }
.portal-wallets .wallet-actions { margin: 0 0 24px; width: 100%; }
.portal-wallets .wallet-actions-layout { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.portal-wallets .wallet-money-actions-group { display: flex; gap: 12px; flex-wrap: wrap; }
.portal-wallets .wallet-actions .custom-button { width: auto !important; min-width: 132px; min-height: 46px; }
.portal-wallets .wallet-actions .custom-button svg { flex-shrink: 0; }
.portal-wallets .wallet-actions .open-modal-deposit svg [fill] { fill: currentColor !important; }
/* Reports: all filters remain available on narrow screens via local scrolling. */
.portal-reports > .row > div > .card,
.portal-funding > .row > div > .card { padding: 24px; }
.portal-reports .no-reports-data > .el-row { display: block; }
.portal-reports .table-container .responsive-hidden { display: table-cell; }
.portal-reports .table-container table { min-width: 760px; }
.portal-reports .btn_get_report_custom { border-radius: 10px; width: auto; padding: 0 16px; }
.portal-reports div.btn_get_report_custom { padding: 0; border: 0; background: transparent; }
/* Funding methods: visible selection cards replace loose labels. */
.portal-funding .funding-dialog { width: 650px; padding: 28px; position: relative; }
.portal-funding #registrationModal { padding: 16px; overflow-y: auto; }
.portal-funding #registrationModal .el-radio-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}
.portal-funding #registrationModal .el-radio-button { width: 100%; min-width: 0; height: auto; margin: 0; }
.portal-funding #registrationModal .el-radio-button__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    width: 100%;
    height: 100%;
    border: 1px solid var(--portal-border);
    border-radius: 10px;
    padding: 14px;
    white-space: normal;
    background: var(--portal-surface);
    color: var(--portal-ink);
    line-height: 1.4;
}
.portal-funding #registrationModal input:checked + .el-radio-button__inner {
    background: var(--bw-primary, #334bc8) !important;
    color: #fff !important;
    border: 1px solid var(--bw-primary, #334bc8) !important;
    border-radius: 10px !important;
    padding: 14px !important;
    box-shadow: none;
}
.portal-funding #registrationModal input:focus-visible + .el-radio-button__inner { outline: 3px solid var(--bw-primary, #334bc8); outline-offset: 3px; }
.portal-funding .ticket-item { gap: 20px; flex-wrap: wrap; }
.portal-funding .ticket-item > div { min-width: 0; overflow-wrap: anywhere; }
/* Platforms: use the available content width, without a nested sidebar offset. */
.portal-platforms .el-row-platform,
.portal-platforms .el-row-platform > .el-col { width: 100%; max-width: 100%; flex-basis: 100%; }
.portal-platforms .platforms-title { text-align: left; margin: 0 0 12px; font-size: 28px !important; font-weight: 700 !important; }
.portal-platforms .text-platform { text-align: left; margin: 0 0 24px; max-width: 720px; font-size: 15px; color: var(--portal-muted); }
.portal-platforms .links-wrapper { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0 0 28px; width: 100%; }
.portal-platforms .link { max-width: none; margin: 0; padding: 24px; background: var(--portal-surface); border-color: var(--portal-border); box-shadow: var(--portal-shadow); }
.portal-platforms .link > .flex { padding: 0 !important; gap: 20px; }
.portal-platforms .link .platform-name { display: block !important; overflow-wrap: anywhere; }
.portal-platforms .link .custom-button { flex-shrink: 0; min-width: 112px; }
@media (max-width: 991.98px) {
    .portal-wallets .wallet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-wallets .wallet-actions-layout { align-items: stretch; }
    .portal-wallets .wallet-money-actions { flex: 1 1 100%; }
    .portal-wallets .wallet-money-actions-group > button { flex: 1 1 0; }
    .portal-wallets .wallet-overview__section > .flex > .flex { padding: 16px; flex-wrap: wrap; }
}
@media (max-width: 575.98px) {
    .portal-ui { padding-right: 4px; padding-left: 4px; padding-bottom: 64px; }
    .portal-ui .card-body { padding: 16px; }
    .portal-ui .card-header { padding: 16px; }
    .portal-ui :is(.el-input__inner, .form-control, .form-select, select) { font-size: 16px; }
    .portal-ui .modal-content { max-width: calc(100vw - 24px); max-height: calc(100dvh - 32px); }
    .portal-ui .modal-content .col-6 { width: 100%; }
    .portal-ui .modal-footer > button { flex: 1 1 100%; margin: 0; }
    .portal-home .dashboard-assets-section > .el-tabs > .el-tabs__header { padding: 12px; }
    .portal-wallets .wallet-overview__section > .flex { grid-template-columns: 1fr; gap: 10px; }
    .portal-wallets .wallet-overview__section > .flex > .flex { flex-wrap: nowrap; }
    .portal-wallets .wallet-overview__section > .wallet-title { font-size: 22px; }
    .portal-wallets .wallet-grid { grid-template-columns: minmax(0, 420px); justify-content: center; }
    .portal-wallets .wallet-create-action { width: 100%; }
    .portal-wallets .wallet-create-action .custom-button { width: 100% !important; }
    .portal-wallets .wallet-money-actions-group { display: grid; grid-template-columns: 1fr; }
    .portal-wallets .wallet-money-actions-group .custom-button { width: 100% !important; }
    .portal-reports > .row > div > .card,
    .portal-funding > .row > div > .card { padding: 16px; }
    .portal-funding .funding-dialog { padding: 20px; }
    .portal-funding .ticket-item > div { width: 100%; }
    .portal-funding .ticket-item .gap-4 { flex-wrap: wrap; gap: 12px !important; }
    .portal-platforms .links-wrapper { grid-template-columns: 1fr; gap: 14px; }
    .portal-platforms .link { padding: 20px; }
    .portal-platforms .link > .flex { flex-wrap: wrap; }
    .portal-platforms .platforms-title { font-size: 24px !important; }
}
@media (prefers-reduced-motion: reduce) {
    .portal-ui *, .portal-login * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
[data-layout-mode='dark'] .portal-ui {
    --portal-surface: #222b3b;
    --portal-subtle: #1b2332;
    --portal-border: #394356;
    --portal-ink: #e6ecf6;
    --portal-muted: #b0bdd0;
}

/* Wallet cards keep the original curved design, tinted with each country's flag colors. */
.portal-wallets .wallet-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: center;
    gap: 18px;
    width: 100%;
    max-width: 1080px;
    box-sizing: border-box;
    margin-right: auto;
    margin-left: auto;
    padding: 6px;
}
.portal-wallets .USD_wallet_card__box { width: 100%; border-radius: 16px; transition: transform .18s ease, box-shadow .18s ease; }
.portal-wallets .USD_wallet_card__box .custom-wallet-bg__img { display: block; height: auto; border-color: var(--wallet-color); }
.portal-wallets .USD_wallet_card__box:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(4,7,44,.16); }
.portal-wallets .USD_wallet_card__box[aria-pressed='true'] { outline: 3px solid var(--wallet-color); outline-offset: 4px; }
.portal-wallets .USD_wallet_card__box:focus-visible { outline: 3px solid var(--portal-ink); outline-offset: 5px; }
.portal-wallets .USD_wallet_card__box .wallet-flag { width: 28px; height: 20px; object-fit: cover; border-radius: 4px; margin-right: 8px; box-shadow: 0 0 0 1px rgba(255,255,255,.45); flex-shrink: 0; }
.portal-wallets .USD_wallet_card__box .wallet-content__header-status > span { border: 1px solid var(--wallet-color); color: var(--wallet-color); background: #fff; }
.portal-wallets .USD_wallet_card__box .custom-switch.el-switch.is-checked .el-switch__core { background-color: var(--wallet-color); border-color: #fff; }
/* Active-wallet switch: a real submit button styled as the card's switch. */
.portal-wallets .USD_wallet_card__box .wallet-content__header-status.is-inactive > span { border-color: #b1b5c3; color: #626e82; }
.wallet-activate-form { margin: 0; }
.wallet-activate-switch { display: inline-flex; align-items: center; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.wallet-activate-switch:disabled { cursor: default; }
.wallet-activate-switch:focus-visible { outline: 2px solid var(--wallet-color, #04072c); outline-offset: 3px; border-radius: 10px; }
.portal-wallets .USD_wallet_card__box .el-switch__label { color: var(--wallet-color); font-weight: 600; margin-left: 8px; }
.portal-wallets .USD_wallet_card__box .wallet-total__amount { font-size: 22px; font-variant-numeric: tabular-nums; }
.portal-wallets #resetPasswordModal-new-wallet { z-index: 1055; }
.portal-wallets .new-wallet-dialog-position { display: flex; justify-content: center; align-items: center; min-height: 100dvh; padding: 24px 16px; }
.portal-wallets .new-wallet-dialog.modal-content { position: relative; width: 480px; max-width: 100%; margin: 0; padding: 0; border-radius: 20px; }
.new-wallet-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px; border-bottom: 1px solid var(--portal-border); }
.new-wallet-dialog-header h3 { margin: 0; font-size: 22px; font-weight: 650; color: var(--portal-ink); }
.new-wallet-dialog-body { padding: 28px; }
.new-wallet-dialog-body label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.portal-wallets .new-wallet-dialog-body .form-select { width: 100%; height: 50px; padding: 12px 40px 12px 14px; font-size: 16px; }
.new-wallet-dialog-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 20px 28px; background: var(--portal-subtle); border-top: 1px solid var(--portal-border); }
.new-wallet-error { margin: 12px 0 0; padding: 10px 12px; border: 1px solid #f3c7c7; border-radius: 10px; background: #fdf0f0; color: #a02b2b; font-size: 13px; line-height: 1.45; }
@media (max-width: 575.98px) {
    .new-wallet-dialog-header, .new-wallet-dialog-body, .new-wallet-dialog-footer { padding: 20px; }
    .new-wallet-dialog-header h3 { font-size: 20px; }
    .new-wallet-dialog-footer { flex-wrap: wrap; }
    .new-wallet-dialog-footer > button { flex: 1 1 100px; min-width: 0 !important; }
}

/* Deposit / withdrawal method chooser */
.funding-chooser.el-dialog { width: 680px !important; max-width: calc(100vw - 24px); padding: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px rgba(4,7,44,.22); }
.funding-chooser.el-dialog .el-dialog__header { align-items: flex-start; gap: 16px; padding: 28px 32px 22px; border-bottom: 1px solid var(--portal-border, #e2e7ef); }
.funding-chooser-heading { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.funding-chooser-title { font-size: 21px; font-weight: 650; color: var(--portal-ink, #202b40); line-height: 1.3; }
.funding-chooser-hint { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--portal-muted, #626e82); }
.funding-chooser-hint::before { content: ""; flex-shrink: 0; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat; }
.funding-chooser .bi-close-modal { flex-shrink: 0; transition: transform .15s ease; }
.funding-chooser .bi-close-modal:hover { transform: rotate(90deg); }
.funding-chooser.el-dialog > .el-dialog__body { padding: 24px 32px 32px; background: var(--portal-subtle, #f5f7fb); max-height: min(70vh, 640px); overflow-y: auto; }
.funding-chooser .funding-card-wrapper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.funding-chooser .funding-card {
    position: relative;
    width: auto !important;
    height: auto;
    min-height: 82px;
    padding: 16px 44px 16px 16px;
    background: var(--portal-surface, #fff);
    border: 1px solid var(--portal-border, #e2e7ef);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(24,39,75,.04);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.funding-chooser .funding-card::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    background: var(--portal-muted, #626e82);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .15s ease, background-color .15s ease;
}
.funding-chooser .funding-card:hover { border-color: var(--primary, #04072c); box-shadow: 0 10px 24px rgba(4,7,44,.10); transform: translateY(-1px); }
.funding-chooser .funding-card:hover::after { background: var(--primary, #04072c); transform: translateX(3px); }
.funding-chooser .funding-card:focus-visible { outline: 3px solid var(--primary, #04072c); outline-offset: 2px; }
.funding-chooser .funding-card > div { gap: 14px !important; }
.funding-method-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; background: #eef1f7; color: #04072c; font-size: 22px; font-weight: 700; line-height: 1; }
.funding-method-icon--coin { background: var(--coin); color: #fff; border-radius: 50%; }
.funding-method-icon--card { background: #eef0ff; color: #3f3dbc; }
.funding-method-icon--bank { background: #e8f4ef; color: #0f6b4f; }
.funding-method-icon--crypto { background: #fff4e5; color: #b35c00; }
.funding-method-title { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--portal-ink, #202b40); line-height: 1.3; overflow-wrap: anywhere; }
.funding-method-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.funding-method-tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: #fff4e5; color: #8a4b00; font-size: 12px; font-weight: 600; line-height: 1.6; }
.funding-method-tag--free { background: #e6f6ee; color: #0b6b43; }
.funding-method-limit { font-size: 12px; color: var(--portal-muted, #626e82); }
@media (max-width: 575.98px) {
    .funding-chooser.el-dialog .el-dialog__header { padding: 20px; }
    .funding-chooser.el-dialog > .el-dialog__body { padding: 16px 16px 20px; }
    .funding-chooser .funding-card-wrapper { grid-template-columns: 1fr; gap: 10px; }
    .funding-chooser-title { font-size: 18px; }
}
[data-layout-mode='dark'] .funding-chooser .funding-method-icon:not(.funding-method-icon--coin) { background: #2c3649; color: #e6ecf6; }

/* Method dialogs (opened from the chooser). The markup carries legacy inline widths, hence the !important overrides. */
.method-dialog { --md-border: #e2e7ef; --md-ink: #202b40; --md-muted: #626e82; --md-subtle: #f5f7fb; overflow-y: auto; }
.method-dialog .el-dialog.custom-dialog {
    display: flex;
    flex-direction: column;
    width: 600px !important;
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 32px);
    margin: 0 !important;
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(4,7,44,.24);
    color: var(--md-ink);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.method-dialog .el-dialog.custom-dialog:has([class*="md:w-1/2"]) { width: 860px !important; }
.method-dialog .el-dialog > br { display: none; }
.method-dialog .el-dialog__header { flex-shrink: 0; align-items: center; gap: 16px; padding: 22px 28px !important; border-bottom: 1px solid var(--md-border); }
.method-dialog-lead { display: flex; align-items: center; gap: 14px; min-width: 0; }
.method-dialog-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.method-dialog-title { font-size: 19px; font-weight: 650; line-height: 1.3; color: var(--md-ink); }
.method-dialog-subtitle { font-size: 13px; color: var(--md-muted); }
.method-dialog .bi-close-modal { flex-shrink: 0; transition: transform .15s ease; }
.method-dialog .bi-close-modal:hover { transform: rotate(90deg); }
.method-dialog .crypto-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 28px 0 !important;
    padding: 12px 14px;
    border: 1px solid #cfe3f5;
    border-radius: 12px;
    background: #eef6fd;
    color: #1d4f7a;
}
.method-dialog .crypto-note svg { width: 20px; height: 20px; flex-shrink: 0; }
.method-dialog .crypto-note .text-14px { font-size: 13px; line-height: 1.5; }
.method-dialog .el-dialog__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px 28px 28px !important; }
.method-dialog .el-dialog__body > .flex { gap: 28px !important; align-items: flex-start; }
.method-dialog form.custom-form { flex: 1 1 0; min-width: 0; width: 100%; }
.method-dialog .custom-form .custom-form-item { margin-bottom: 20px !important; }
.method-dialog .form-group-default { display: block; }
.method-dialog .el-form-item__label { display: block; height: auto; margin-bottom: 8px; padding: 0; font-size: 14px !important; font-weight: 600 !important; line-height: 1.4; color: var(--md-ink); text-align: left; }
.method-dialog .el-form-item__label span { font-size: inherit !important; }
.method-dialog .row[style],
.method-dialog div[style*="width:500px"],
.method-dialog div[style*="width: 500px"] { width: 100% !important; left: 0 !important; position: static !important; margin: 0 !important; padding: 0 !important; }
.method-dialog .el-input,
.method-dialog .el-form-item__content_banklocal,
.method-dialog .el-input__wrapper_localbank { display: block; width: 100%; }
.method-dialog .el-dialog__body select,
.method-dialog .el-dialog__body input:not([type=hidden]):not([type=file]):not([type=checkbox]):not([type=radio]),
.method-dialog .el-dialog__body textarea {
    width: 100% !important;
    min-height: 48px;
    padding: 10px 14px !important;
    border: 1px solid var(--md-border) !important;
    border-radius: 10px !important;
    background-color: #fff;
    color: var(--md-ink);
    font-size: 15px;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.method-dialog .el-dialog__body select { padding-right: 40px !important; }
.method-dialog .el-dialog__body select:focus,
.method-dialog .el-dialog__body input:focus,
.method-dialog .el-dialog__body textarea:focus { outline: none; border-color: var(--primary, #04072c) !important; box-shadow: 0 0 0 3px rgba(4,7,44,.12); }
.method-dialog [id^="fee_info_"] { display: inline-flex; align-items: center; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: #fff4e5; color: #8a4b00 !important; font-size: 12px !important; font-weight: 600; }
.method-dialog [id$="_error"], .method-dialog .text-red-600 { font-size: 13px; }
.method-dialog .el-dialog > [id$="_error"] { margin: 16px 28px 0 !important; }
.method-dialog .flex.mt-4.gap-x-4,
.method-dialog .button-container { justify-content: flex-end; gap: 12px !important; margin-top: 8px !important; padding-top: 20px; border-top: 1px solid var(--md-border); }
.method-dialog .custom-button { min-width: 120px; min-height: 46px; margin: 0 !important; border-radius: 10px !important; font-weight: 600; }
.method-dialog .text-center.mt-2 { margin: 4px 0 8px !important; font-size: 13px; color: var(--md-muted); }
/* Deposit details panel (address, network, QR) */
.method-dialog [class*="md:w-1/2"] {
    flex: 0 0 300px;
    width: 300px !important;
    margin: 0 !important;
    padding: 20px !important;
    border: 1px solid var(--md-border);
    border-radius: 16px;
    background: var(--md-subtle);
}
.method-dialog [class*="md:w-1/2"] .p-2 { padding: 0 !important; }
.method-dialog [class*="md:w-1/2"] p.opacity-70 { margin-bottom: 4px !important; font-size: 12px !important; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--md-muted); opacity: 1; }
.method-dialog [class*="md:w-1/2"] p:not(.opacity-70) { max-width: none !important; margin-bottom: 16px !important; font-size: 14px !important; color: var(--md-ink); overflow-wrap: anywhere; }
.method-dialog [class*="md:w-1/2"] img { display: block; width: 168px !important; height: auto; margin: 4px auto 0; padding: 10px; border: 1px solid var(--md-border); border-radius: 14px; background: #fff; }
.method-dialog [class*="md:w-1/2"] img[src=""] { display: none; }
@media (max-width: 767.98px) {
    .method-dialog .el-dialog__body > .flex { flex-direction: column; }
    .method-dialog [class*="md:w-1/2"] { flex-basis: auto; width: 100% !important; }
}
@media (max-width: 575.98px) {
    .method-dialog .el-dialog__header { padding: 18px 20px !important; }
    .method-dialog .crypto-note { margin: 16px 20px 0 !important; }
    .method-dialog .el-dialog__body { padding: 20px !important; }
    .method-dialog .flex.mt-4.gap-x-4,
    .method-dialog .button-container { flex-direction: column-reverse; align-items: stretch; }
    .method-dialog .custom-button { width: 100%; }
}

/* Transfer dialog */
#transferModalDetail.flex { align-items: flex-start; }
.transfer-dialog-position { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 100%; padding: 24px 16px; }
.transfer-dialog {
    --td-border: #e2e7ef; --td-ink: #202b40; --td-muted: #626e82; --td-subtle: #f5f7fb;
    position: relative;
    width: 100%;
    max-width: 760px;
    min-width: 0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(4,7,44,.24);
    color: var(--td-ink);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    text-align: left;
}
.transfer-dialog-header { display: flex; align-items: center; gap: 14px; padding: 24px 28px 20px; border-bottom: 1px solid var(--td-border); }
.transfer-dialog-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; background: #eef1f7; color: var(--primary, #04072c); }
.transfer-dialog-heading { flex: 1; min-width: 0; }
.transfer-dialog-heading h4 { margin: 0; font-size: 20px; font-weight: 650; line-height: 1.3; color: var(--td-ink); }
.transfer-dialog-heading p { margin: 2px 0 0; font-size: 13px; color: var(--td-muted); }
.transfer-dialog-close { flex-shrink: 0; width: 36px; height: 36px; border: 1px solid var(--td-border); border-radius: 50%; background: #fff; color: #484c57; font-size: 22px; line-height: 1; transition: transform .15s ease, background-color .15s ease; }
.transfer-dialog-close:hover { background: var(--td-subtle); transform: rotate(90deg); }
.transfer-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 20px 28px 0; padding: 4px; border-radius: 12px; background: var(--td-subtle); border: 1px solid var(--td-border); }
.transfer-tabs :is(.el-tabs__item_modal, .transfer-tab),
.portal-ui .transfer-tabs :is(.el-tabs__item_modal, .transfer-tab) {
    display: flex; align-items: center; justify-content: center;
    min-height: 42px; height: auto; padding: 8px 12px;
    border: 0; border-radius: 9px; background: transparent;
    color: var(--td-muted); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.transfer-tabs :is(.el-tabs__item_modal, .transfer-tab):hover { color: var(--td-ink); }
.transfer-tabs :is(.el-tabs__item_modal, .transfer-tab).is-active,
.portal-ui .transfer-tabs :is(.el-tabs__item_modal, .transfer-tab).is-active { background: #fff; color: var(--td-ink); border-bottom: 0; box-shadow: 0 1px 3px rgba(24,39,75,.12); }
.transfer-tabs :is(.el-tabs__item_modal, .transfer-tab):focus-visible { outline: 2px solid var(--primary, #04072c); outline-offset: 1px; }
.transfer-dialog #pane-internal { display: block; }
.transfer-pane { padding: 20px 28px 0; }
.transfer-note { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; padding: 12px 14px; border: 1px solid #cfe3f5; border-radius: 12px; background: #eef6fd; color: #1d4f7a; font-size: 13px; line-height: 1.5; }
.transfer-note::before { content: ""; flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; background: #1474bc; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.transfer-leg { position: relative; padding: 18px 18px 16px; border: 1px solid var(--td-border); border-radius: 16px; background: var(--td-subtle); }
.transfer-leg-tag { display: inline-block; margin-bottom: 12px; padding: 2px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--td-border); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--td-muted); }
.transfer-leg-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; }
.transfer-field { display: flex; flex-direction: column; min-width: 0; }
.transfer-field label { margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--td-ink); }
.transfer-field label span { color: #d14343; }
.transfer-field select,
.transfer-field input {
    width: 100%; min-height: 48px; padding: 10px 14px;
    border: 1px solid var(--td-border); border-radius: 10px; background-color: #fff;
    color: var(--td-ink); font-size: 15px; box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.transfer-field select { padding-right: 36px; }
.transfer-field input[id$="amount"]:not([readonly]) { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.transfer-field input[readonly] { background: #eef1f6; color: var(--td-ink); font-weight: 600; font-variant-numeric: tabular-nums; cursor: default; }
.transfer-field select:focus,
.transfer-field input:not([readonly]):focus { outline: none; border-color: var(--primary, #04072c); box-shadow: 0 0 0 3px rgba(4,7,44,.12); }
.transfer-error { margin-top: 6px; font-size: 12px; font-weight: 600; color: #c0392b; }
.transfer-swap-row { position: relative; z-index: 1; display: flex; justify-content: center; height: 0; }
.transfer-swap { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-top: -21px; border: 1px solid var(--td-border); border-radius: 50%; background: #fff; color: var(--primary, #04072c); box-shadow: 0 4px 12px rgba(24,39,75,.10); transition: transform .2s ease, box-shadow .15s ease; }
button.transfer-swap:hover { transform: rotate(180deg); box-shadow: 0 6px 16px rgba(24,39,75,.16); }
.transfer-swap + * , .transfer-swap-row + .transfer-leg { margin-top: 10px; }
.transfer-dialog-footer { display: flex; justify-content: flex-end; gap: 12px; margin: 22px -28px 0; padding: 18px 28px; border-top: 1px solid var(--td-border); background: #fff; border-radius: 0 0 20px 20px; }
.transfer-dialog-footer .transfer-submit { min-width: 150px; min-height: 46px; border-radius: 10px !important; font-weight: 600; }
.transfer-dialog-footer .btncancelfundingmethod { min-height: 46px; }
@media (max-width: 640px) {
    .transfer-dialog-position { align-items: flex-start; padding: 12px; }
    .transfer-dialog { border-radius: 18px; }
    .transfer-dialog-header { align-items: flex-start; gap: 12px; padding: 16px; }
    .transfer-dialog-icon { width: 40px; height: 40px; border-radius: 10px; }
    .transfer-dialog-heading h4 { font-size: 18px; }
    .transfer-dialog-heading p { font-size: 12px; line-height: 1.45; }
    .transfer-dialog-close { width: 32px; height: 32px; font-size: 20px; }
    .transfer-tabs { margin: 14px 16px 0; }
    .transfer-tabs :is(.el-tabs__item_modal, .transfer-tab),
    .portal-ui .transfer-tabs :is(.el-tabs__item_modal, .transfer-tab) { min-height: 40px; padding: 8px 6px; font-size: 13px; white-space: normal; text-align: center; line-height: 1.25; }
    .transfer-pane { padding: 14px 16px 0; }
    .transfer-note { margin-bottom: 14px; padding: 10px 12px; font-size: 12px; }
    .transfer-leg { padding: 14px 14px 12px; border-radius: 14px; }
    .transfer-leg-grid { grid-template-columns: 1fr; gap: 12px; }
    .transfer-field select,
    .transfer-field input { min-height: 46px; font-size: 14px; }
    .transfer-field select { text-overflow: ellipsis; }
    .transfer-dialog-footer { margin: 16px -16px 0; padding: 14px 16px 16px; flex-direction: column-reverse; gap: 10px; border-radius: 0 0 18px 18px; }
    .transfer-dialog-footer > button { width: 100%; min-width: 0 !important; margin: 0 !important; }
}

/* ===== Reports ===== */
.portal-reports .card > .text-2xl { margin-bottom: 20px !important; font-size: 26px !important; font-weight: 650 !important; color: var(--portal-ink); }
/* Tabs as a segmented control */
.portal-reports .el-tabs__header { margin: 0; border: 0; }
.portal-reports .el-tabs__nav-wrap::after { display: none; }
.portal-reports .el-tabs__nav { gap: 4px; width: max-content; min-width: 0; padding: 4px; border: 1px solid var(--portal-border); border-radius: 12px; background: var(--portal-subtle); }
.portal-reports .custom-tab.el-tabs .el-tabs__item,
.portal-reports .el-tabs__item {
    min-height: 42px;
    padding: 8px 18px !important;
    border: 0 !important;
    border-radius: 9px;
    background: transparent;
    color: var(--portal-muted);
    font-size: 14px;
    font-weight: 600;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.portal-reports .el-tabs__item:hover { color: var(--portal-ink); }
.portal-reports .custom-tab.el-tabs .el-tabs__item.is-active,
.portal-reports .el-tabs__item.is-active { border: 0 !important; background: var(--portal-surface); color: var(--portal-ink); box-shadow: 0 1px 3px rgba(24,39,75,.12); }
/* Toolbar: Get report */
.portal-reports .no-reports-data > .el-row > .my-5.w-fit { margin: 20px 0 14px auto !important; }
.portal-reports button.btn_get_report_custom {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 40px; padding: 0 16px;
    border: 1px solid var(--portal-border); border-radius: 10px;
    background: var(--portal-surface); color: var(--portal-ink);
    font-size: 14px; font-weight: 600;
    transition: background-color .15s ease, border-color .15s ease;
}
.portal-reports button.btn_get_report_custom:hover { background: var(--portal-subtle); border-color: #cdd5e1; }
.portal-reports button.btn_get_report_custom svg g { fill: currentColor; }
/* Table */
.portal-reports .table-container { border: 1px solid var(--portal-border); border-radius: 14px; background: var(--portal-surface); }
.portal-reports .table-container thead th { border-bottom: 1px solid var(--portal-border) !important; }
.portal-reports .custom-common-table__header__label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.portal-reports .custom-filter .el-input__wrapper {
    display: flex; align-items: center; gap: 6px;
    width: 100%; min-height: 40px; padding: 0 10px;
    border: 1px solid var(--portal-border); border-radius: 10px;
    background: var(--portal-surface); box-shadow: none;
}
.portal-reports .custom-filter .el-input__wrapper:focus-within { border-color: var(--primary, #04072c); box-shadow: 0 0 0 3px rgba(4,7,44,.10); }
.portal-reports .custom-filter .el-range__icon { width: 15px; flex-shrink: 0; color: var(--portal-muted); }
.portal-reports .custom-filter :is(select, input) { flex: 1; width: 100%; min-width: 0; min-height: 38px; padding: 0 !important; border: 0 !important; background: transparent; box-shadow: none; outline: none; color: var(--portal-ink); font-size: 13px; }
.portal-reports .report-row { cursor: pointer; }
.portal-reports .report-row > td { border-bottom: 1px solid var(--portal-border) !important; font-size: 14px; color: var(--portal-ink); vertical-align: middle; transition: background-color .12s ease; }
.portal-reports .report-row:hover > td { background: #f8fafc; }
.portal-reports .report-row.is-open > td { background: var(--portal-subtle); border-bottom-color: transparent !important; }
.portal-reports .report-cell-date { color: var(--portal-muted) !important; font-size: 13px !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.portal-reports .report-cell-date svg { width: 15px; height: 15px; margin-left: 4px; vertical-align: -2px; color: #9aa4b5; }
.portal-reports .report-cell-end { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.portal-reports .deposit_withdrawal_state__text { justify-content: flex-start !important; }
.portal-reports .report-cell-end .deposit_withdrawal_state__text { justify-content: flex-end !important; }
/* Status pills */
.report-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #eef0f3; color: #4b5563; font-size: 11px; font-weight: 700; letter-spacing: .04em; line-height: 1.4; white-space: nowrap; }
.report-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.report-status--completed, .report-status--approved, .report-status--success, .report-status--paid { background: #e6f6ee; color: #0b6b43; }
.report-status--pending, .report-status--waiting { background: #fff4e5; color: #8a4b00; }
.report-status--processing, .report-status--in-progress { background: #e8f0fe; color: #1e40af; }
.report-status--rejected, .report-status--failed, .report-status--declined, .report-status--error { background: #fdecec; color: #b42318; }
.report-status--cancelled, .report-status--canceled { background: #eef0f3; color: #4b5563; }
/* Expanded detail */
.portal-reports .report-detail > td { padding: 4px 16px 18px !important; background: var(--portal-subtle) !important; border-bottom: 1px solid var(--portal-border) !important; }
.portal-reports .report-detail > td > div[style] { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px !important; }
.portal-reports .report-detail > td > div[style] > div { min-width: 0 !important; padding: 10px 12px; border: 1px solid var(--portal-border); border-radius: 10px; background: var(--portal-surface); gap: 4px; }
.portal-reports .report-detail strong { color: var(--portal-muted) !important; font-size: 11px !important; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.portal-reports .report-detail span { color: var(--portal-ink); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.portal-reports .report-detail .btnfundingmethod { min-height: 34px; padding: 0 12px; font-size: 13px; }
/* Pagination */
.portal-reports .pagination-container { margin: 20px 0 4px !important; }
.portal-reports .custom-pagination .el-pager { display: flex; gap: 6px; margin: 0; padding: 0; }
.portal-reports .custom-pagination :is(.btn-prev, .btn-next, .number) { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--portal-border); background: var(--portal-surface); color: var(--portal-ink); font-weight: 600; }
.portal-reports .custom-pagination .number.is-active { border-color: var(--primary, #04072c); background: var(--primary, #04072c); color: #fff; }
.portal-reports .custom-pagination :is(.btn-prev, .btn-next)[disabled] { opacity: .45; }

/* Phones: rows become labelled cards, filters become a grid */
@media (max-width: 767.98px) {
    .portal-reports .card > .text-2xl { font-size: 22px !important; margin-bottom: 14px !important; }
    .portal-reports .el-tabs__nav-scroll { margin: 0 -4px; padding: 0 4px 4px; }
    .portal-reports .el-tabs__item { min-height: 40px; padding: 8px 14px !important; font-size: 13px; }
    .portal-reports .no-reports-data > .el-row > .my-5.w-fit { width: 100% !important; margin: 16px 0 12px !important; }
    .portal-reports .no-reports-data > .el-row > .my-5.w-fit button.btn_get_report_custom { width: 100%; justify-content: center; min-height: 44px; }
    .portal-reports .table-container { overflow: visible; border: 0; border-radius: 0; background: transparent; }
    .portal-reports .table-container table { min-width: 0 !important; }
    .portal-reports .table-container :is(table, thead, tbody, tr, th, td) { display: block; }
    .portal-reports .table-container tr.hidden { display: none !important; }
    .portal-reports .table-container thead tr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; border: 1px solid var(--portal-border); border-radius: 14px; background: var(--portal-subtle); }
    .portal-reports .table-container thead th { width: auto !important; padding: 0 !important; border: 0 !important; background: transparent; }
    .portal-reports .table-container thead th:first-child { grid-column: 1 / -1; }
    .portal-reports .table-container thead th:not(:has(.custom-filter)) { display: none; }
    .portal-reports .table-container .responsive-hidden { display: block; }
    .portal-reports .report-row {
        display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px;
        margin-top: 12px; padding: 14px 16px;
        border: 1px solid var(--portal-border); border-radius: 14px;
        background: var(--portal-surface); box-shadow: 0 1px 2px rgba(24,39,75,.04);
    }
    .portal-reports .report-row > td { padding: 0 !important; border: 0 !important; background: transparent !important; }
    .portal-reports .report-row > td.details-row { display: none !important; }
    .portal-reports .report-row > .report-cell-date { grid-column: 1; grid-row: 1; align-self: center; font-size: 12px !important; }
    .portal-reports .report-row > .report-cell-end { grid-column: 2; grid-row: 1; font-size: 16px; }
    .portal-reports .report-row > td[data-label]:not(.report-cell-date):not(.report-cell-end) {
        grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding-top: 10px !important; border-top: 1px dashed var(--portal-border) !important;
        font-size: 13px; text-align: right; overflow-wrap: anywhere;
    }
    .portal-reports .report-row > td[data-label]:not(.report-cell-date):not(.report-cell-end)::before { content: attr(data-label); flex-shrink: 0; color: var(--portal-muted); font-size: 12px; font-weight: 600; text-align: left; }
    .portal-reports .report-row .deposit_withdrawal_state__text { justify-content: flex-end !important; }
    .portal-reports .report-row.is-open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; background: var(--portal-subtle); }
    .portal-reports .report-detail { margin-top: -1px; border: 1px solid var(--portal-border); border-top: 0; border-radius: 0 0 14px 14px; background: var(--portal-subtle); }
    .portal-reports .report-detail > td { padding: 4px 14px 14px !important; border: 0 !important; }
    .portal-reports .report-detail > td > div[style] { grid-template-columns: 1fr 1fr; gap: 8px !important; }
    .portal-reports .custom-pagination { justify-content: center; }
}

/* ===== Funding methods ===== */
.portal-funding .card > .text-2xl { margin-bottom: 8px !important; font-size: 26px !important; font-weight: 650 !important; color: var(--portal-ink); }
.portal-funding .card > .el-tabs > .flex.justify-end + br { display: none; }
.portal-funding #openModalBtn { min-height: 44px; border-radius: 10px; }
/* Group heading (one per saved method) */
.portal-funding .card .el-tabs__nav-scroll { margin-top: 22px; }
.portal-funding .card .el-tabs__nav { width: auto; min-width: 0; padding: 0; border: 0; background: transparent; }
.portal-funding .card .el-tabs__active-bar { display: none; }
.portal-funding .card .el-tabs__item,
.portal-funding .card .el-tabs__item.is-active {
    min-height: 0; padding: 0 !important;
    border: 0 !important; background: transparent !important;
    color: var(--portal-muted) !important;
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    cursor: default;
}
/* Saved method card */
.portal-funding .ticket-list { margin-top: 10px !important; }
.portal-funding .ticket-item {
    align-items: center !important;
    padding: 18px 20px !important;
    border: 1px solid var(--portal-border) !important;
    border-radius: 14px;
    background: var(--portal-surface);
    box-shadow: 0 1px 2px rgba(24,39,75,.04);
    transition: box-shadow .15s ease, border-color .15s ease;
}
.portal-funding .ticket-item:hover { background: var(--portal-surface) !important; border-color: #cdd5e1 !important; box-shadow: 0 6px 18px rgba(24,39,75,.07); }
.portal-funding .ticket-item .text-sm.text-gray-500,
.portal-funding .ticket-item .text-sm.font-semibold.text-gray-500 { margin-bottom: 2px; color: var(--portal-muted) !important; font-size: 11px !important; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.portal-funding .ticket-item span { color: var(--portal-ink); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.portal-funding .ticket-item .status-badge { display: inline-block; margin-top: 2px; padding: 2px 10px !important; border-radius: 999px; background: #eef1f7 !important; color: var(--portal-ink) !important; font-size: 13px !important; letter-spacing: .1em; }
.portal-funding .ticket-item svg[onclick] { flex-shrink: 0; padding: 4px; border: 1px solid var(--portal-border); border-radius: 50%; color: var(--portal-ink) !important; transition: transform .2s ease, background-color .15s ease; }
.portal-funding .ticket-item svg[onclick]:hover { background: var(--portal-subtle); }
/* Inline edit panel */
.portal-funding .ticket-list > form.message-container:not(.hidden) {
    margin-top: -8px;
    padding: 20px !important;
    border: 1px solid var(--portal-border);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: var(--portal-subtle);
}
.portal-funding .ticket-list > form.message-container > .flex { padding: 0 !important; border: 0 !important; background: transparent !important; }
.portal-funding .ticket-list > form.message-container .row { width: 100%; margin: 0; }
.portal-funding .ticket-list > form.message-container .modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding: 16px 0 0; border-top: 1px solid var(--portal-border); }
/* New funding method dialog */
.portal-funding #registrationModal .funding-dialog { width: 680px; padding: 0; overflow: hidden auto; }
.funding-dialog-header { display: flex; align-items: center; gap: 14px; padding: 22px 28px; border-bottom: 1px solid var(--portal-border); }
.funding-dialog-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; background: #eef1f7; color: var(--primary, #04072c); }
.funding-dialog-heading { flex: 1; min-width: 0; }
.funding-dialog-heading h4 { margin: 0; font-size: 20px; font-weight: 650; color: var(--portal-ink); }
.funding-dialog-heading p { margin: 2px 0 0; font-size: 13px; color: var(--portal-muted); }
.funding-dialog-header .portal-dialog-close { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--portal-surface); font-size: 22px; line-height: 1; transition: transform .15s ease, background-color .15s ease; }
.funding-dialog-header .portal-dialog-close:hover { background: var(--portal-subtle); transform: rotate(90deg); }
.portal-funding #registrationModal form { padding: 22px 28px 0; }
.portal-funding #registrationModal form > .col-12:first-of-type > .item-label-home { margin-bottom: 12px; }
.portal-funding #registrationModal .el-radio-group { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.portal-funding #registrationModal .el-radio-button__inner,
.portal-funding #registrationModal input:checked + .el-radio-button__inner {
    flex-direction: column; gap: 8px;
    min-height: 92px; padding: 14px 10px !important;
    border-radius: 12px !important;
    font-size: 13px; font-weight: 600; text-align: center;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.portal-funding #registrationModal .el-radio-button__inner:hover { border-color: #cdd5e1; box-shadow: 0 4px 12px rgba(24,39,75,.06); }
.portal-funding #registrationModal input:checked + .el-radio-button__inner { box-shadow: 0 6px 16px rgba(4,7,44,.18); }
.funding-type-icon { width: 24px; height: 24px; flex-shrink: 0; }
.portal-funding #registrationModal .form-section.active { margin-top: 6px; padding: 18px 18px 6px; border: 1px solid var(--portal-border); border-radius: 14px; background: var(--portal-subtle); }
.portal-funding #registrationModal .form-section .row { margin: 0 -8px; }
.portal-funding #registrationModal .form-section [class*="col-"] { padding: 0 8px; }
.funding-dialog-footer { display: flex; justify-content: flex-end; gap: 10px; margin: 22px -28px 0; padding: 16px 28px; border-top: 1px solid var(--portal-border); background: var(--portal-surface); }
.funding-dialog-footer > button { min-width: 120px; min-height: 46px; border-radius: 10px !important; }
@media (max-width: 767.98px) {
    .portal-funding .card > .el-tabs > .flex.justify-end { justify-content: stretch !important; }
    .portal-funding #openModalBtn { width: 100%; }
    .portal-funding .ticket-item { gap: 14px !important; padding: 16px !important; }
    .portal-funding .ticket-item > div { width: 100% !important; justify-content: space-between; text-align: left !important; }
    .portal-funding .ticket-item .only-mobile { width: 100%; }
    .portal-funding .ticket-item .only-mobile > button { flex: 1; min-height: 42px; border-radius: 10px; }
    .portal-funding .ticket-list > form.message-container:not(.hidden) { padding: 16px !important; }
    .portal-funding .ticket-list > form.message-container [class*="col-6"] { width: 100%; }
    .portal-funding .ticket-list > form.message-container .modal-footer > button { flex: 1; }
    .portal-funding #registrationModal { padding: 10px; align-items: flex-start !important; }
    .funding-dialog-header { padding: 16px; }
    .funding-dialog-heading h4 { font-size: 18px; }
    .portal-funding #registrationModal form { padding: 16px 16px 0; }
    .portal-funding #registrationModal .el-radio-group { grid-template-columns: 1fr 1fr; }
    .portal-funding #registrationModal .el-radio-button__inner,
    .portal-funding #registrationModal input:checked + .el-radio-button__inner { min-height: 80px; }
    .portal-funding #registrationModal .form-section [class*="col-6"] { width: 100%; }
    .funding-dialog-footer { margin: 18px -16px 0; padding: 14px 16px; flex-direction: column-reverse; }
    .funding-dialog-footer > button { width: 100%; }
}

/* Funding methods: fixed-size row chevron, labels on one line */
.portal-funding .ticket-item > div[class*="w-"] { flex: 1 1 0; width: auto !important; min-width: 0; }
.portal-funding .ticket-item > div:last-child { flex: 0 1 auto; align-items: center; justify-content: flex-end; }
.portal-funding .ticket-item svg[onclick] { width: 32px !important; height: 32px !important; }
.portal-funding .ticket-item .text-sm.text-gray-500,
.portal-funding .ticket-item .text-sm.font-semibold.text-gray-500 { white-space: nowrap; }

/* ===== Platforms ===== */
.portal-platforms .platforms-page { max-width: 1120px; }
.platforms-hero { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 26px; }
.platforms-hero-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px; background: var(--primary, #04072c); color: #fff; box-shadow: 0 8px 20px rgba(4,7,44,.18); }
.portal-platforms .platforms-hero .platforms-title { margin: 0 0 6px; font-size: 28px !important; font-weight: 700 !important; line-height: 1.25; color: var(--portal-ink); text-align: left; }
.portal-platforms .platforms-hero .text-platform { margin: 0; max-width: 680px; font-size: 15px; line-height: 1.6; color: var(--portal-muted); text-align: left; }
.platforms-banner { align-items: center; gap: 12px; margin-bottom: 22px; padding: 14px 16px; border: 1px solid #bfe3cf; border-radius: 14px; background: #ecf8f1; color: #0b5b39; }
.platforms-banner-icon { display: inline-flex; flex-shrink: 0; color: #0b7a4b; }
.platforms-banner p { flex: 1; margin: 0; font-size: 14px; line-height: 1.5; }
.platforms-banner button { flex-shrink: 0; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 20px; line-height: 1; }
.platforms-banner button:hover { background: rgba(11,91,57,.1); }
.platforms-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.platform-card {
    display: flex; align-items: center; gap: 16px;
    padding: 20px 22px;
    border: 1px solid var(--portal-border); border-radius: 16px;
    background: var(--portal-surface);
    box-shadow: 0 1px 2px rgba(24,39,75,.04);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.platform-card:hover { border-color: #cdd5e1; box-shadow: 0 10px 26px rgba(24,39,75,.08); transform: translateY(-1px); }
.platform-card-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px; background: #eef1f7; color: #1f2937; }
.platform-card-icon--android { background: #e8f7ee; color: #2e9e5b; }
.platform-card-icon--windows { background: #e8f2fd; color: #0a6cc4; }
.platform-card-icon--web { background: #f0ecfd; color: #6a4bd1; }
.platform-card-text { flex: 1; min-width: 0; }
.portal-platforms .platform-card .platform-name { margin: 0; font-size: 17px; font-weight: 650; color: var(--portal-ink); overflow-wrap: anywhere; }
.platform-card-text span { display: block; margin-top: 2px; font-size: 13px; color: var(--portal-muted); }
.portal-platforms .platform-card-download { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 44px; padding: 0 18px; border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none; }
.platforms-login { padding: 24px 26px; border: 1px solid var(--portal-border); border-left: 4px solid var(--primary, #04072c); border-radius: 16px; background: var(--portal-surface); box-shadow: 0 1px 2px rgba(24,39,75,.04); }
.platforms-login-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.platforms-login-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; background: #eef1f7; color: var(--primary, #04072c); }
.platforms-login-head h4 { margin: 0; font-size: 18px; font-weight: 650; color: var(--portal-ink); }
.platforms-login-text { margin: 0 0 14px 50px; font-size: 15px; line-height: 1.6; color: var(--portal-ink); }
.platforms-login-note { display: flex; align-items: flex-start; gap: 8px; margin-left: 50px; padding: 10px 14px; border: 1px solid #f6d3b6; border-radius: 10px; background: #fff6ee; color: #9a4a0c; font-size: 13.5px; line-height: 1.5; }
.platforms-login-note svg { flex-shrink: 0; margin-top: 2px; color: #ed6400; }
@media (max-width: 767.98px) {
    .platforms-hero { gap: 12px; margin-bottom: 20px; }
    .platforms-hero-icon { width: 44px; height: 44px; border-radius: 12px; }
    .portal-platforms .platforms-hero .platforms-title { font-size: 22px !important; }
    .portal-platforms .platforms-hero .text-platform { font-size: 14px; }
    .platforms-grid { grid-template-columns: 1fr; gap: 12px; }
    .platform-card { flex-wrap: wrap; padding: 16px; }
    .platform-card-icon { width: 46px; height: 46px; }
    .portal-platforms .platform-card-download { width: 100%; justify-content: center; }
    .platforms-login { padding: 18px; }
    .platforms-login-text, .platforms-login-note { margin-left: 0; }
}

/* ===== Header on phones =====
   The Client/IB portal menu is toggled with the `hidden` attribute, but `.mobile-menu { display:flex }`
   overrode it, so it was always rendered inside the bar and pushed the header icons out of view. */
.custom-button-wrapper { position: relative; }
.mobile-menu[hidden] { display: none !important; }
.custom-button-wrapper .mobile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1005;
    min-width: 170px;
    margin: 0;
    padding: 6px;
    border: 1px solid #e2e7ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(4,7,44,.16);
}
.custom-button-wrapper .mobile-menu-item { border-left: 0; border-radius: 8px; white-space: nowrap; }
@media (max-width: 767.98px) {
    /* Keep page content from widening the layout viewport (which pushes the fixed header's right side off-screen). */
    .main-content, .page-content { overflow-x: clip; }
    #page-topbar .navbar-header { gap: 4px; }
    #page-topbar .navbar-header > .d-flex:last-child { flex-shrink: 0; min-width: 0; }
    #page-topbar .navbar-header > .d-flex:first-child { min-width: 0; }

    /* Reports: tabs stay in one scrollable row instead of the global stacked layout. */
    .portal-reports .el-tabs__nav { flex-direction: row !important; flex-wrap: nowrap; width: max-content; }
    .portal-reports .el-tabs__item { width: auto !important; margin-bottom: 0 !important; white-space: nowrap; }
    .portal-reports .el-tabs__item .tabs-label { display: inline; }
    .portal-reports .el-tabs__nav-scroll { overflow-x: auto !important; scrollbar-width: none; }
    .portal-reports .el-tabs__nav-scroll::-webkit-scrollbar { display: none; }
}

/* ===== Support ===== */
.portal-support .support-card { padding: 28px; }
.support-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.support-heading { margin: 0 0 4px; font-size: 26px; font-weight: 700; color: var(--portal-ink); }
.support-subheading { margin: 0; font-size: 14px; color: var(--portal-muted); }
.portal-support .support-new-btn { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 600; }
/* Tabs */
.support-tabs { display: inline-flex; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--portal-border); border-radius: 12px; background: var(--portal-subtle); }
.portal-support .support-tabs .el-tabs__item {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 40px; height: auto; padding: 8px 16px !important;
    border: 0 !important; border-radius: 9px; background: transparent;
    color: var(--portal-muted); font-size: 14px; font-weight: 600; cursor: pointer;
}
.portal-support .support-tabs .el-tabs__item.is-active { background: var(--portal-surface); color: var(--portal-ink); border: 0 !important; box-shadow: 0 1px 3px rgba(24,39,75,.12); }
.support-tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #e4e8ef; color: var(--portal-ink); font-size: 12px; }
.portal-support .el-tabs__item.is-active .support-tab-count { background: var(--primary, #04072c); color: #fff; }
/* Ticket list */
.support-list { display: flex; flex-direction: column; gap: 10px; }
.support-ticket { border: 1px solid var(--portal-border); border-radius: 14px; background: var(--portal-surface); overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.support-ticket:hover, .support-ticket.is-open { border-color: #cdd5e1; box-shadow: 0 6px 18px rgba(24,39,75,.07); }
.support-ticket-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.support-ticket-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: #fff4e5; color: #c25e00; }
.support-ticket.is-closed .support-ticket-icon { background: #e6f6ee; color: #0b6b43; }
.support-ticket-main { flex: 1; min-width: 0; }
.support-ticket-title { display: block; overflow: hidden; color: var(--portal-ink); font-size: 15px; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.support-ticket-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; color: var(--portal-muted); font-size: 12.5px; }
.support-ticket-meta span + span::before { content: "•"; margin-right: 12px; color: #c3cad6; }
.support-ticket-status { flex-shrink: 0; padding: 4px 10px; border-radius: 999px; background: #fff4e5; color: #8a4b00; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.support-ticket.is-closed .support-ticket-status { background: #eef0f3; color: #4b5563; }
.support-ticket-chevron { flex-shrink: 0; color: var(--portal-muted); transition: transform .2s ease; }
.support-ticket.is-open .support-ticket-chevron { transform: rotate(180deg); }
.support-ticket-body { padding: 0 18px 18px; border-top: 1px solid var(--portal-border); background: var(--portal-subtle); }
.support-ticket-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 0; }
.support-ticket-facts > div { padding: 10px 12px; border: 1px solid var(--portal-border); border-radius: 10px; background: var(--portal-surface); }
.support-ticket-facts dt { margin: 0 0 2px; color: var(--portal-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.support-ticket-facts dd { margin: 0; color: var(--portal-ink); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.support-ticket-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.portal-support :is(.btn-close-support, .btn-reply-support) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.portal-support .btn-close-support { border: 1px solid #edb9c1; background: var(--portal-surface); color: #b42336; }
.portal-support .btn-close-support:hover { background: #fff1f3; }
.portal-support .btn-reply-support { border: 1px solid var(--primary, #04072c); background: var(--primary, #04072c); color: #fff; }
/* Reply form */
.portal-support .reply-form:not(.hidden) { margin-top: 14px; padding: 14px; border: 1px solid var(--portal-border); border-radius: 12px; background: var(--portal-surface); }
.reply-form-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 14px; font-weight: 650; color: var(--portal-ink); }
.reply-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
/* Attachment picker */
.support-attach { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 0 14px; border: 1px dashed #c3cad6; border-radius: 10px; background: var(--portal-surface); color: var(--portal-ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.support-attach:hover { border-color: var(--primary, #04072c); }
.support-attach.has-file { border-style: solid; border-color: #9fd7b8; background: #ecf8f1; color: #0b5b39; }
.support-attach-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.support-attach--block { display: flex; justify-content: center; width: 100%; min-height: 54px; }
/* Conversation */
.support-thread { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.support-message { display: flex; align-items: flex-start; gap: 10px; max-width: 86%; }
.support-message.is-client { flex-direction: row-reverse; align-self: flex-end; }
.support-message-avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--primary, #04072c); color: #fff; font-size: 13px; font-weight: 700; }
.support-message.is-client .support-message-avatar { background: #dfe5ee; color: var(--portal-ink); }
.support-message-bubble { min-width: 0; padding: 10px 14px; border: 1px solid var(--portal-border); border-radius: 4px 14px 14px 14px; background: var(--portal-surface); }
.support-message.is-client .support-message-bubble { border-color: #cfdaf0; border-radius: 14px 4px 14px 14px; background: #eef3fc; }
.support-message-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 4px; }
.support-message-head strong { color: var(--portal-ink); font-size: 13px; }
.support-message-head time { color: var(--portal-muted); font-size: 12px; }
.support-message-text { color: var(--portal-ink); font-size: 14px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.support-message-file { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 10px; border: 1px solid var(--portal-border); border-radius: 8px; background: var(--portal-surface); color: var(--portal-ink); font-size: 13px; font-weight: 600; text-decoration: none; max-width: 100%; }
.support-message-file span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Empty states */
.support-empty, .support-welcome { display: flex; flex-direction: column; align-items: center; padding: 40px 16px; text-align: center; }
.support-empty-icon, .support-welcome-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 14px; border-radius: 18px; background: #eef1f7; color: var(--primary, #04072c); }
.support-empty-title { margin: 0 0 4px; font-size: 17px; font-weight: 650; color: var(--portal-ink); }
.support-empty-text { margin: 0; max-width: 420px; font-size: 14px; color: var(--portal-muted); }
.support-welcome { max-width: 640px; margin: 24px auto; }
.support-welcome .support-subheading { max-width: 460px; margin-bottom: 22px; }
/* Modals */
.support-modal .modal-content { border: 0; border-radius: 20px; box-shadow: 0 24px 60px rgba(4,7,44,.24); overflow: hidden; }
.support-modal .modal-header { align-items: center; gap: 14px; padding: 22px 26px; border-bottom: 1px solid var(--portal-border, #e2e7ef); }
.support-modal-icon, .support-confirm-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; background: #eef1f7; color: var(--primary, #04072c); }
.support-modal-heading { flex: 1; min-width: 0; }
.support-modal .modal-title-support { margin: 0; font-size: 20px; font-weight: 650; color: var(--portal-ink, #202b40); text-transform: none; }
.support-modal-heading p { margin: 2px 0 0; font-size: 13px; color: var(--portal-muted, #626e82); }
.support-modal .modal-body { padding: 22px 26px; }
.support-modal .modal-footer { gap: 10px; padding: 16px 26px; border-top: 1px solid var(--portal-border, #e2e7ef); }
.support-modal .modal-footer > .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 130px; min-height: 46px; margin: 0; border-radius: 10px; font-weight: 600; }
.support-field { margin: 0 0 20px; padding: 0; border: 0; }
.support-field-label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.support-field label, .support-field legend { margin: 0; color: var(--portal-ink, #202b40); font-size: 14px; font-weight: 600; }
.support-field legend { float: none; width: auto; margin-bottom: 10px; }
.support-field label span, .support-field legend span { color: #d14343; }
.support-field-label small { color: var(--portal-muted, #626e82); font-size: 12px; font-variant-numeric: tabular-nums; }
.support-modal .form-control { min-height: 46px; border: 1px solid var(--portal-border, #e2e7ef); border-radius: 10px; font-size: 15px; }
.support-modal .form-control:focus { border-color: var(--primary, #04072c); box-shadow: 0 0 0 3px rgba(4,7,44,.12); }
.support-categories { display: flex; flex-wrap: wrap; gap: 8px; }
.support-category { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--portal-border, #e2e7ef); border-radius: 999px; background: #fff; color: var(--portal-ink, #202b40); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
.support-category:hover { border-color: #b8c2d2; }
.btn-check:checked + .support-category { border-color: var(--primary, #04072c); background: var(--primary, #04072c); color: #fff; }
.btn-check:focus-visible + .support-category { outline: 3px solid var(--primary, #04072c); outline-offset: 2px; }
.support-editor { border: 1px solid var(--portal-border, #e2e7ef); border-radius: 10px; overflow: hidden; }
.support-editor .ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid var(--portal-border, #e2e7ef); background: #f8fafc; }
.support-editor .ql-container.ql-snow { border: 0; font-size: 15px; }
.portal-support .reply-form .ql-toolbar.ql-snow { border-radius: 10px 10px 0 0; background: #f8fafc; }
.portal-support .reply-form .ql-container.ql-snow { border-radius: 0 0 10px 10px; }
.support-confirm-title { margin: 14px 0 6px; font-size: 19px; font-weight: 650; color: var(--portal-ink, #202b40); }
.support-confirm-text { margin: 0 0 6px; color: var(--portal-muted, #626e82); font-size: 14px; }
.support-confirm-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.support-modal .modal-body.text-center { padding: 30px 26px 26px; }
.support-modal .support-confirm-icon { margin: 0 auto; background: #e6f6ee; color: #0b6b43; }
.support-modal .rating-stars .star { margin: 0 4px; color: #ccc; font-size: 30px; cursor: pointer; }
@media (max-width: 767.98px) {
    .portal-support .support-card { padding: 16px; }
    .support-header { flex-direction: column; align-items: stretch; }
    .support-heading { font-size: 22px; }
    .portal-support .support-new-btn { justify-content: center; width: 100%; }
    .support-tabs { display: flex; }
    .portal-support .support-tabs .el-tabs__item { flex: 1; justify-content: center; width: auto !important; margin: 0 !important; padding: 8px 10px !important; font-size: 13px; }
    .support-ticket-head { flex-wrap: wrap; gap: 10px 12px; padding: 14px; }
    .support-ticket-main { flex-basis: calc(100% - 100px); }
    .support-ticket-status { order: 5; margin-left: 54px; }
    .support-ticket-chevron { margin-left: auto; }
    .support-ticket-body { padding: 0 14px 14px; }
    .support-ticket-facts { grid-template-columns: 1fr; }
    .support-ticket-actions > button { flex: 1; }
    .reply-form-foot { flex-direction: column; align-items: stretch; }
    .support-message { max-width: 100%; }
    .support-modal .modal-header { padding: 16px; }
    .support-modal .modal-body { padding: 16px; }
    .support-modal .modal-footer { flex-direction: column-reverse; padding: 14px 16px; }
    .support-modal .modal-footer > .btn { width: 100%; }
    .support-modal .modal-content { border-radius: 0; }
}

/* Funding methods on phones: label/value pairs in a 2-column grid, actions full width */
.portal-funding .ticket-list { border: 0; border-radius: 0; }
@media (max-width: 767.98px) {
    .portal-funding .ticket-item {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 16px !important;
        align-items: start !important;
        padding: 16px !important;
        text-align: left;
    }
    .portal-funding .ticket-item > div,
    .portal-funding .ticket-item > div[class*="w-"] {
        display: block;
        width: auto !important;
        min-width: 0;
        margin: 0 !important;
        text-align: left !important;
    }
    .portal-funding .ticket-item > div:last-child {
        grid-column: 1 / -1;
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 14px !important;
    }
    .portal-funding .ticket-item > div > div { min-width: 0; }
    .portal-funding .ticket-item span { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
    .portal-funding .ticket-item .status-badge { margin: 4px 0 0; }
    .portal-funding .ticket-item svg[onclick] { display: none !important; }
    .portal-funding .ticket-item .only-mobile { display: flex !important; gap: 10px; width: 100%; padding-top: 14px; border-top: 1px solid var(--portal-border); }
    .portal-funding .ticket-item .only-mobile > *,
    .portal-funding .ticket-item .only-mobile form > button { flex: 1; width: 100%; min-width: 0; min-height: 42px; margin: 0; border-radius: 10px; }
    .portal-funding .ticket-item .only-mobile form { display: flex; flex: 1; min-width: 0; }
    /* La dirección de la wallet es larga: ocupa toda la fila. */
    .portal-funding .ticket-item > .funding-wallet-address { grid-column: 1 / -1; }
}

/* Direcciones crypto: una sola "palabra" larga, se parte por caracteres para no salirse. */
.portal-funding .funding-wallet-address,
.portal-funding .funding-wallet-address > div { min-width: 0; max-width: 100%; }
.portal-funding .ticket-item .funding-wallet-address__value {
    display: block;
    max-width: 100%;
    white-space: normal !important;
    word-break: break-all;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
}

/* Support modal: the <form> sits between .modal-content and .modal-body, so it must pass the height through for Bootstrap's scrollable dialog. */
.support-modal .modal-dialog-scrollable .modal-content > form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow: hidden; }
.support-modal .modal-dialog-scrollable .modal-content > form > .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.support-modal .modal-dialog-scrollable .modal-content > form > .modal-footer { flex-shrink: 0; }

/* ===== Copy Trading ===== */
.portal-copytrading .card.card-height-100 { padding: 24px; }
/* Tabs as a segmented control (scrolls sideways on narrow screens) */
.portal-copytrading .el-tabs__header { margin: 0 0 4px; border: 0; }
.portal-copytrading .el-tabs__nav-wrap::after { display: none; }
.portal-copytrading .el-tabs__nav-scroll { overflow-x: auto !important; scrollbar-width: none; }
.portal-copytrading .el-tabs__nav-scroll::-webkit-scrollbar { display: none; }
.portal-copytrading .el-tabs__nav { flex-direction: row !important; gap: 4px; width: max-content; min-width: 0; padding: 4px; border: 1px solid var(--portal-border); border-radius: 12px; background: var(--portal-subtle); }
.portal-copytrading .custom-tab.el-tabs .el-tabs__item,
.portal-copytrading .el-tabs__item {
    width: auto !important; min-height: 40px; margin: 0 !important; padding: 8px 16px !important;
    border: 0 !important; border-radius: 9px; background: transparent;
    color: var(--portal-muted); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.portal-copytrading .el-tabs__item:hover { color: var(--portal-ink); }
.portal-copytrading .custom-tab.el-tabs .el-tabs__item.is-active,
.portal-copytrading .el-tabs__item.is-active { border: 0 !important; background: var(--portal-surface); color: var(--portal-ink); box-shadow: 0 1px 3px rgba(24,39,75,.12); }
.portal-copytrading .el-tabs__item .tabs-label { display: inline; }
.portal-copytrading .el-tabs__content { padding: 20px 0 0 !important; }
.portal-copytrading #pane-myaccounts > .d-flex:first-child h5 { font-size: 20px; color: var(--portal-ink); }
/* Primary yellow action */
.portal-copytrading .ct-follow-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 18px; border-radius: 10px; font-size: 14px; box-shadow: 0 4px 12px rgba(245,166,35,.25); }
/* Shared buttons */
.ct-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-size: 13.5px; font-weight: 600; transition: background-color .15s ease, border-color .15s ease, opacity .15s ease; }
.ct-btn--dark { background: var(--primary, #04072c); border-color: var(--primary, #04072c); color: #fff; }
.ct-btn--success { background: #16a34a; border-color: #16a34a; color: #fff; }
.ct-btn--warn { background: #fff; border-color: #f59e0b; color: #b45309; }
.ct-btn--ghost { background: var(--portal-subtle); border-color: var(--portal-border); color: var(--portal-muted); }
.ct-btn:disabled { cursor: not-allowed; opacity: .75; }
/* My accounts */
.portal-copytrading .my-ct-accounts { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.portal-copytrading .ct-account-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--portal-border); border-top: 4px solid #f5b70a; border-radius: 16px; box-shadow: 0 1px 2px rgba(24,39,75,.04); }
.portal-copytrading .ct-account-card--follower { border-top-color: #38bdf8; }
.portal-copytrading .ct-account-card:hover { box-shadow: 0 10px 26px rgba(24,39,75,.08); }
.ct-acc-head { display: flex; align-items: center; gap: 12px; }
.ct-acc-id { flex: 1; min-width: 0; }
.ct-acc-login { color: var(--portal-ink); font-size: 16px; font-weight: 700; }
.ct-acc-meta { overflow: hidden; color: var(--portal-muted); font-size: 12.5px; white-space: nowrap; text-overflow: ellipsis; }
.portal-copytrading .ct-account-card--follower .mc-avatar { background: #e0f2fe; border-color: #38bdf8; color: #0369a1; }
.portal-copytrading .ct-role-badge { flex-shrink: 0; }
.ct-acc-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--portal-border); border-radius: 12px; background: var(--portal-subtle); }
.ct-acc-figures > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; min-width: 0; }
.ct-acc-figures > div + div { border-left: 1px solid var(--portal-border); }
.ct-acc-figures strong { overflow: hidden; color: var(--portal-ink); font-size: 16px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ct-acc-figures span { color: var(--portal-muted); font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.ct-acc-settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; align-items: end; gap: 10px; }
.ct-acc-field { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
.ct-acc-field > span:first-child { color: var(--portal-ink); font-size: 12.5px; font-weight: 600; }
.portal-copytrading .ct-acc-field :is(.form-control, .form-select) { min-height: 40px; border-radius: 10px; font-size: 14px; }
.ct-acc-input-suffix { position: relative; display: block; }
.ct-acc-input-suffix .form-control { padding-right: 30px; }
.ct-acc-input-suffix em { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: var(--portal-muted); font-style: normal; font-size: 13px; pointer-events: none; }
.ct-acc-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.ct-acc-dates > div { padding: 10px 12px; border: 1px solid var(--portal-border); border-radius: 10px; }
.ct-acc-dates dt { margin: 0 0 2px; color: var(--portal-muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ct-acc-dates dd { margin: 0; color: var(--portal-ink); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ct-acc-action { margin: 0; }
.ct-acc-action--row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ct-acc-action--row form { margin: 0; }
.ct-acc-following { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 12px 14px; border: 1px solid #cfe7f6; border-radius: 12px; background: #f0f8fd; color: var(--portal-muted); font-size: 13px; }
.ct-acc-following strong { color: var(--portal-ink); font-size: 14px; }
.ct-acc-following em { font-style: normal; }
.ct-note { display: flex; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.ct-note::before { content: ""; flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.ct-note--warn { background: #fff7e8; color: #9a5a05; }
.ct-note--ok { background: #ecf8f1; color: #0b6b43; }
.ct-note--info { background: #eef4fd; color: #1e4fa3; }
.portal-copytrading .ct-account-card .mc-sparkline { margin-top: auto; }
.ct-acc-foot { display: flex; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--portal-border); }
.ct-acc-remove { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: #b42336; font-size: 13px; font-weight: 600; }
.ct-acc-remove:hover { background: #fff1f3; }
/* Other panes: panels, stats, master/follower cards */
.portal-copytrading :is(.ct-detail-panel, .ct-positions, .master-card, .follower-card) { border-color: var(--portal-border); border-radius: 16px; }
.portal-copytrading .ct-section-title { color: var(--portal-muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.portal-copytrading .ct-stat { border: 1px solid var(--portal-border); border-radius: 12px; background: var(--portal-subtle); padding: 14px; }
.portal-copytrading :is(.ct-stat-val, .mc-metric-val, .fc-metric-val, .fc-balance-val, .ct-pos-profit) { font-family: inherit; font-variant-numeric: tabular-nums; }
.portal-copytrading .ct-stat-lbl { color: var(--portal-muted); font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.portal-copytrading .ct-detail-title { font-size: 17px; color: var(--portal-ink); }
.portal-copytrading .ct-pill { min-height: 30px; padding: 4px 14px; }
/* Modals */
.portal-copytrading .modal-content { border-radius: 18px !important; }
.portal-copytrading .modal-footer { gap: 10px; }
@media (max-width: 767.98px) {
    .portal-copytrading .card.card-height-100 { padding: 16px; }
    .portal-copytrading .el-tabs__item { padding: 8px 12px !important; font-size: 13px; }
    .portal-copytrading #pane-myaccounts > .d-flex:first-child { flex-direction: column; align-items: stretch !important; }
    .portal-copytrading #pane-myaccounts > .d-flex:first-child .ct-follow-btn { justify-content: center; width: 100%; }
    .portal-copytrading .my-ct-accounts { grid-template-columns: 1fr; }
    .portal-copytrading .ct-account-card { padding: 16px; }
    .ct-acc-head { flex-wrap: wrap; }
    .ct-acc-id { flex-basis: calc(100% - 60px); }
    .portal-copytrading .ct-role-badge { margin-left: 52px; }
    .ct-acc-settings { grid-template-columns: 1fr 1fr; }
    .ct-acc-settings .ct-btn { grid-column: 1 / -1; width: 100%; }
    .ct-acc-action .ct-btn, .ct-acc-action--row form, .ct-acc-action--row form .ct-btn { width: 100%; }
    .portal-copytrading .ct-detail-header { flex-direction: column; }
    .portal-copytrading .ct-range-pills { flex-wrap: wrap; }
    .portal-copytrading .masters-grid, .portal-copytrading .follower-cards { grid-template-columns: 1fr; }
    .portal-copytrading #master-pos-pagination { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 380px) {
    .ct-acc-figures { grid-template-columns: 1fr; }
    .ct-acc-figures > div + div { border-left: 0; border-top: 1px solid var(--portal-border); }
    .ct-acc-dates { grid-template-columns: 1fr; }
}

/* ===== Education ===== */
.edu-page { display: flex; flex-direction: column; gap: 24px; max-width: 1240px; }
.edu-hero {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 32px;
    padding: 40px 44px;
    border: 1px solid var(--portal-border); border-radius: 22px;
    background: radial-gradient(circle at 85% 20%, rgba(255,208,13,.16), transparent 45%), linear-gradient(135deg, #ffffff 0%, #f4f7fc 100%);
    box-shadow: 0 1px 2px rgba(24,39,75,.04);
    overflow: hidden;
}
.edu-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px; background: #eef1f7; color: var(--primary, #04072c); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.edu-hero h1 { margin: 0 0 14px; color: var(--portal-ink); font-size: clamp(28px, 3.2vw, 42px); font-weight: 750; line-height: 1.12; letter-spacing: -.01em; }
.edu-hero p { max-width: 560px; margin: 0 0 26px; color: var(--portal-muted); font-size: 16px; line-height: 1.65; }
.edu-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.portal-education .edu-cta { display: inline-flex; align-items: center; gap: 10px; width: auto; min-height: 50px; padding: 0 26px; border-radius: 12px; font-size: 15px; font-weight: 700; text-decoration: none; box-shadow: 0 8px 20px rgba(4,7,44,.18); transition: transform .15s ease, box-shadow .15s ease; }
.portal-education .edu-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(4,7,44,.24); }
.edu-hero-count { color: var(--portal-muted); font-size: 14px; }
.edu-hero-count strong { color: var(--portal-ink); font-size: 18px; }
.edu-hero-art { display: flex; justify-content: center; }
.edu-hero-art img { width: 100%; max-width: 520px; max-height: 360px; object-fit: contain; }
/* Benefits */
.edu-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.edu-features li { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid var(--portal-border); border-radius: 16px; background: var(--portal-surface); }
.edu-feature-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: #eef1f7; color: var(--primary, #04072c); }
.edu-features li:nth-child(2) .edu-feature-icon { background: #fff7e0; color: #b7791f; }
.edu-features li:nth-child(3) .edu-feature-icon { background: #e8f7ee; color: #1f8a51; }
.edu-features strong { display: block; margin-bottom: 2px; color: var(--portal-ink); font-size: 15px; }
.edu-features span:not(.edu-feature-icon) { color: var(--portal-muted); font-size: 13.5px; line-height: 1.5; }
/* Learning paths */
.edu-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.edu-section-head h2 { margin: 0 0 4px; color: var(--portal-ink); font-size: 22px; font-weight: 700; }
.edu-section-head p { margin: 0; color: var(--portal-muted); font-size: 14px; }
.edu-link { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; color: var(--primary, #04072c); font-size: 14px; font-weight: 650; text-decoration: none; }
.edu-link:hover svg { transform: translateX(3px); }
.edu-link svg, .edu-path-go svg { transition: transform .15s ease; }
.edu-path-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.edu-path-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--portal-border); border-radius: 18px; background: var(--portal-surface); color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.edu-path-card:hover { transform: translateY(-3px); border-color: #cdd5e1; box-shadow: 0 16px 34px rgba(24,39,75,.10); color: inherit; }
.edu-path-card:hover .edu-path-go svg { transform: translateX(3px); }
.edu-path-media { position: relative; display: flex; align-items: center; justify-content: center; height: 170px; background: linear-gradient(135deg, #f4f7fc, #eaf0fa); color: #9aa6b8; }
.edu-path-media img { width: 100%; height: 100%; padding: 16px; object-fit: contain; }
.edu-badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.edu-badge--free { background: #dcfce7; color: #15803d; }
.edu-badge--premium { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.edu-path-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 18px; }
.edu-path-step { color: var(--portal-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.edu-path-title { color: var(--portal-ink); font-size: 17px; font-weight: 700; line-height: 1.3; }
.edu-path-desc { display: -webkit-box; overflow: hidden; color: var(--portal-muted); font-size: 13.5px; line-height: 1.55; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.edu-path-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--portal-border); color: var(--portal-muted); font-size: 13px; }
.edu-path-go { display: inline-flex; align-items: center; gap: 4px; color: var(--primary, #04072c); font-weight: 650; }
@media (max-width: 991.98px) {
    .edu-hero { grid-template-columns: 1fr; padding: 28px; }
    .edu-hero-art { order: -1; }
    .edu-hero-art img { max-height: 240px; }
    .edu-features { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .edu-page { gap: 18px; }
    .edu-hero { gap: 18px; padding: 20px; border-radius: 18px; }
    .edu-hero-art img { max-height: 190px; }
    .edu-hero p { font-size: 15px; margin-bottom: 20px; }
    .portal-education .edu-cta { justify-content: center; width: 100%; }
    .edu-hero-actions { flex-direction: column; align-items: stretch; text-align: center; }
    .edu-features li { padding: 14px; }
    .edu-section-head { flex-direction: column; align-items: flex-start; }
    .edu-path-grid { grid-template-columns: 1fr; }
    .edu-path-media { height: 150px; }
}

/* ===== IB portal dashboard ===== */
.ib-dash { display: flex; flex-direction: column; gap: 20px; }
.ib-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid #cfe3f5; border-radius: 14px; background: #eef6fd; color: #1d4f7a; }
.ib-banner-icon { display: inline-flex; flex-shrink: 0; color: #1474bc; }
.ib-banner p { flex: 1; margin: 0; font-size: 14px; line-height: 1.5; }
.portal-ib .ib-banner-btn { display: inline-flex; align-items: center; flex-shrink: 0; width: auto; min-height: 40px; padding: 0 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ib-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.ib-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 18px; border: 1px solid var(--portal-border); border-radius: 16px; background: var(--portal-surface); box-shadow: 0 1px 2px rgba(24,39,75,.04); }
.ib-kpi-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 10px; border-radius: 11px; background: #eef1f7; color: var(--primary, #04072c); }
.ib-kpi:nth-child(2) .ib-kpi-icon { background: #fff7e0; color: #b7791f; }
.ib-kpi:nth-child(3) .ib-kpi-icon { background: #e8f2fd; color: #0a6cc4; }
.ib-kpi:nth-child(4) .ib-kpi-icon { background: #f0ecfd; color: #6a4bd1; }
.ib-kpi:nth-child(5) .ib-kpi-icon { background: #e8f7ee; color: #1f8a51; }
.ib-kpi:nth-child(6) .ib-kpi-icon { background: #fdecef; color: #c2334f; }
.ib-kpi-value { color: var(--portal-ink); font-size: 26px; font-weight: 750; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ib-kpi-label { color: var(--portal-ink); font-size: 13.5px; font-weight: 600; }
.ib-kpi-period { color: var(--portal-muted); font-size: 12px; }
/* IB profile */
.ib-profile { overflow: hidden; border: 1px solid var(--portal-border); border-radius: 18px; background: var(--portal-surface); box-shadow: 0 1px 2px rgba(24,39,75,.04); }
.ib-profile-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; background: linear-gradient(135deg, var(--primary, #04072c), #1c2a63); color: #fff; }
.ib-profile-eyebrow { display: block; margin-bottom: 2px; color: rgba(255,255,255,.7); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ib-profile-head strong { font-size: 22px; font-weight: 750; }
.ib-profile-total { text-align: right; }
.ib-profile-total span { display: block; color: rgba(255,255,255,.7); font-size: 12px; font-weight: 600; }
.ib-profile-total strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.ib-profile-total small { font-size: 13px; font-weight: 600; opacity: .8; }
.ib-profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.ib-profile-grid > div { min-width: 0; padding: 16px 22px; border-top: 1px solid var(--portal-border); }
.ib-profile-grid > div + div { border-left: 1px solid var(--portal-border); }
.ib-profile-grid dt { margin: 0 0 4px; color: var(--portal-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ib-profile-grid dd { margin: 0; color: var(--portal-ink); font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.ib-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #fff7e0; color: #9a5a05; font-size: 13px; }
.ib-profile-grid .ib-profile-link { grid-column: 1 / -1; border-left: 0 !important; background: var(--portal-subtle); }
.ib-profile-link dd { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ib-profile-link #referralLink { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--portal-border); border-radius: 10px; background: var(--portal-surface); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.ib-copy-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--primary, #04072c); border-radius: 10px; background: var(--primary, #04072c); color: #fff; font-size: 13.5px; font-weight: 600; }
.ib-copy-toast { padding: 4px 10px; border-radius: 999px; background: #e6f6ee; color: #0b6b43; font-size: 12.5px; font-weight: 600; transition: opacity .3s ease; }
/* Charts */
.ib-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ib-chart-card { min-width: 0; padding: 18px 18px 8px; border: 1px solid var(--portal-border); border-radius: 18px; background: var(--portal-surface); box-shadow: 0 1px 2px rgba(24,39,75,.04); }
.ib-chart-card--wide { grid-column: 1 / -1; }
.ib-chart-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.ib-chart-card h4 { margin: 0; color: var(--portal-ink); font-size: 16px; font-weight: 700; }
.ib-chart-card header p { margin: 2px 0 0; color: var(--portal-muted); font-size: 12.5px; }
.ib-chart-card header p:empty { display: none; }
.ib-chart-filters { display: flex; gap: 8px; }
.portal-ib .ib-chart-card .form-select { width: auto; min-width: 128px; min-height: 36px; border-radius: 9px; font-size: 13px; }
.ib-chart-card .apex-charts { min-height: 260px; }
@media (max-width: 1399.98px) { .ib-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991.98px) {
    .ib-charts { grid-template-columns: 1fr; }
    .ib-profile-grid { grid-template-columns: 1fr 1fr; }
    .ib-profile-grid > div:nth-child(3) { border-left: 0; }
}
@media (max-width: 575.98px) {
    .ib-dash { gap: 14px; }
    .ib-banner { flex-direction: column; align-items: stretch; }
    .ib-banner-icon { display: none; }
    .portal-ib .ib-banner-btn { justify-content: center; }
    .ib-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
    .ib-kpi { padding: 14px; }
    .ib-kpi-icon { width: 36px; height: 36px; margin-bottom: 8px; }
    .ib-kpi-value { font-size: 22px; }
    .ib-profile-head { flex-direction: column; align-items: flex-start; }
    .ib-profile-total { text-align: left; }
    .ib-profile-grid { grid-template-columns: 1fr; }
    .ib-profile-grid > div + div { border-left: 0; }
    .ib-profile-grid > div { padding: 14px 16px; }
    .ib-copy-btn { width: 100%; justify-content: center; }
    .ib-chart-card { padding: 16px 12px 6px; }
    .ib-chart-card header { flex-direction: column; }
    .ib-chart-filters, .portal-ib .ib-chart-card .form-select { width: 100%; }
    .ib-chart-filters .form-select { flex: 1; min-width: 0; }
}

/* ===== IB portal: Clients / Leads / Partners (DataTables) ===== */
.portal-ib-list .el-tabs__header { margin: 0 0 18px; border: 0; }
.portal-ib-list .el-tabs__nav-wrap::after { display: none; }
.portal-ib-list .el-tabs__nav-scroll { overflow-x: auto !important; scrollbar-width: none; }
.portal-ib-list .el-tabs__nav-scroll::-webkit-scrollbar { display: none; }
.portal-ib-list .el-tabs__nav { flex-direction: row !important; gap: 4px; width: max-content; min-width: 0; padding: 4px; border: 1px solid var(--portal-border); border-radius: 12px; background: var(--portal-subtle); }
.portal-ib-list .custom-tab.el-tabs .el-tabs__item,
.portal-ib-list .el-tabs__item {
    width: auto !important; min-height: 40px; margin: 0 !important; padding: 8px 18px !important;
    border: 0 !important; border-radius: 9px; background: transparent;
    color: var(--portal-muted); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.portal-ib-list .el-tabs__item:hover { color: var(--portal-ink); }
.portal-ib-list .custom-tab.el-tabs .el-tabs__item.is-active,
.portal-ib-list .el-tabs__item.is-active { border: 0 !important; background: var(--portal-surface); color: var(--portal-ink); box-shadow: 0 1px 3px rgba(24,39,75,.12); }
.portal-ib-list .el-tabs__item .tabs-label { display: inline; }
.portal-ib-list .el-tabs__content > br { display: none; }
.portal-ib-list .el-tab-pane > .flex { margin-bottom: 0 !important; }
.portal-ib-list .el-tab-pane .card-body { padding: 20px; border: 1px solid var(--portal-border); border-radius: 18px; background: var(--portal-surface); box-shadow: 0 1px 2px rgba(24,39,75,.04); }
.portal-ib-list .table-container, .portal-ib-list .table-responsive { width: 100%; margin: 0 !important; overflow: visible; }
/* Toolbar */
.portal-ib-list .dataTables_wrapper { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; overflow: visible; }
.portal-ib-list .dataTables_wrapper > table, .portal-ib-list .dataTables_wrapper > .dataTables_scroll { flex-basis: 100%; }
.portal-ib-list .dataTables_wrapper .dt-buttons { order: 1; float: none; margin: 0; }
.portal-ib-list .dataTables_wrapper .dataTables_filter { order: 2; float: none; margin: 0 0 0 auto; }
.portal-ib-list .dataTables_wrapper > table { order: 3; }
.portal-ib-list .dataTables_wrapper .dataTables_info { order: 4; float: none; padding: 0; color: var(--portal-muted); font-size: 13px; }
.portal-ib-list .dataTables_wrapper .dataTables_paginate { order: 5; float: none; margin-left: auto; padding: 0; }
.portal-ib-list .dataTables_wrapper .dt-button {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 0 !important; padding: 0 14px !important;
    border: 1px solid var(--portal-border) !important; border-radius: 10px !important;
    background: var(--portal-surface) !important; color: var(--portal-ink) !important; font-size: 13.5px; font-weight: 600; box-shadow: none !important;
}
.portal-ib-list .dataTables_wrapper .dt-button:hover { background: var(--portal-subtle) !important; }
.portal-ib-list .dataTables_wrapper .dt-button-collection { border: 1px solid var(--portal-border); border-radius: 12px; box-shadow: 0 12px 30px rgba(4,7,44,.14); padding: 6px; }
.portal-ib-list .dataTables_wrapper .dt-button-collection .dt-button { width: 100%; min-height: 34px; border: 0 !important; justify-content: flex-start; }
.portal-ib-list .dataTables_wrapper .dt-button-collection .dt-button.dt-button-active { background: #eef1f7 !important; }
.portal-ib-list .dataTables_filter label { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--portal-muted); font-size: 13px; font-weight: 600; }
.portal-ib-list .dataTables_filter input {
    width: 260px !important; min-height: 40px; margin: 0 !important; padding: 0 12px 0 36px !important;
    border: 1px solid var(--portal-border) !important; border-radius: 10px; background: var(--portal-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23626e82' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 12px center / 16px no-repeat; font-size: 14px;
}
.portal-ib-list .dataTables_filter input:focus { outline: none; border-color: var(--primary, #04072c) !important; box-shadow: 0 0 0 3px rgba(4,7,44,.10); }
/* Table */
.portal-ib-list table.dataTable { width: 100% !important; margin: 0 !important; border: 1px solid var(--portal-border) !important; border-collapse: separate !important; border-spacing: 0; border-radius: 14px; overflow: hidden; }
.portal-ib-list table.dataTable thead th {
    padding: 12px 14px !important; border-bottom: 1px solid var(--portal-border) !important; background: var(--portal-subtle) !important;
    color: var(--portal-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.portal-ib-list table.dataTable tbody :is(td, th) { padding: 13px 14px !important; border-top: 1px solid var(--portal-border) !important; color: var(--portal-ink); font-size: 13.5px; font-weight: 500; vertical-align: middle; }
.portal-ib-list table.dataTable tbody tr:first-child :is(td, th) { border-top: 0 !important; }
.portal-ib-list table.dataTable tbody tr { background: var(--portal-surface) !important; }
.portal-ib-list table.dataTable tbody tr:hover { background: #f8fafc !important; }
.portal-ib-list table.dataTable.display tbody tr > .sorting_1 { background: transparent !important; box-shadow: none !important; }
.portal-ib-list table.dataTable td.dataTables_empty { padding: 40px 16px !important; color: var(--portal-muted); text-align: center; }
/* Responsive (+) control and collapsed details */
.portal-ib-list table.dataTable.dtr-inline.collapsed > tbody > tr > :first-child::before { top: 50%; transform: translateY(-50%); width: 18px; height: 18px; margin-top: 0; border: 0; border-radius: 6px; background: var(--primary, #04072c); box-shadow: none; color: #fff; line-height: 18px; font-family: inherit; }
.portal-ib-list table.dataTable.dtr-inline.collapsed > tbody > tr.parent > :first-child::before { background: #c2334f; }
.portal-ib-list table.dataTable > tbody > tr.child td.child { padding: 0 !important; background: var(--portal-subtle); }
.portal-ib-list table.dataTable > tbody > tr.child ul.dtr-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; width: 100%; padding: 12px; }
.portal-ib-list table.dataTable > tbody > tr.child ul.dtr-details > li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--portal-border) !important; border-radius: 10px; background: var(--portal-surface); }
.portal-ib-list table.dataTable > tbody > tr.child span.dtr-title { min-width: 0; color: var(--portal-muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.portal-ib-list table.dataTable > tbody > tr.child span.dtr-data { color: var(--portal-ink); font-size: 13.5px; overflow-wrap: anywhere; }
/* Pagination */
.portal-ib-list .dataTables_paginate .paginate_button {
    display: inline-flex !important; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; margin: 0 2px !important; padding: 0 10px !important;
    border: 1px solid var(--portal-border) !important; border-radius: 9px !important; background: var(--portal-surface) !important; color: var(--portal-ink) !important; font-size: 13px; font-weight: 600;
}
.portal-ib-list .dataTables_paginate .paginate_button:hover { background: var(--portal-subtle) !important; }
.portal-ib-list .dataTables_paginate .paginate_button.current,
.portal-ib-list .dataTables_paginate .paginate_button.current:hover { border-color: var(--primary, #04072c) !important; background: var(--primary, #04072c) !important; color: #fff !important; }
.portal-ib-list .dataTables_paginate .paginate_button.disabled { opacity: .45; }
@media (max-width: 767.98px) {
    .portal-ib-list .el-tabs__item { padding: 8px 14px !important; font-size: 13px; }
    .portal-ib-list .el-tab-pane .card-body { padding: 14px; }
    .portal-ib-list .dataTables_wrapper .dt-buttons, .portal-ib-list .dataTables_wrapper .dataTables_filter { flex-basis: 100%; margin: 0; }
    .portal-ib-list .dataTables_wrapper .dt-buttons { display: flex; }
    .portal-ib-list .dataTables_wrapper .dt-button { flex: 1; justify-content: center; }
    .portal-ib-list .dataTables_filter label { flex-direction: column; align-items: stretch; gap: 6px; }
    .portal-ib-list .dataTables_filter input { width: 100% !important; }
    .portal-ib-list .dataTables_wrapper .dataTables_info, .portal-ib-list .dataTables_wrapper .dataTables_paginate { flex-basis: 100%; margin: 0; text-align: center; }
    .portal-ib-list table.dataTable > tbody > tr.child ul.dtr-details { grid-template-columns: 1fr 1fr; }
}

/* ===== IB portal: commissions & payouts ===== */
.ib-page-head h1 { margin: 0 0 6px; color: var(--portal-ink); font-size: 26px; font-weight: 700; }
.ib-page-head p { max-width: 820px; margin: 0; color: var(--portal-muted); font-size: 14.5px; line-height: 1.6; }
.ib-empty { padding: 28px; border: 1px dashed #c3cad6; border-radius: 16px; color: var(--portal-muted); text-align: center; }
.ibc-balance { display: flex; align-items: stretch; overflow: hidden; border: 1px solid var(--portal-border); border-radius: 18px; background: var(--portal-surface); box-shadow: 0 1px 2px rgba(24,39,75,.04); }
.ibc-balance-currency { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 96px; background: linear-gradient(135deg, var(--primary, #04072c), #1c2a63); color: #fff; font-size: 18px; font-weight: 750; letter-spacing: .06em; }
.ibc-balance-grid { display: grid; flex: 1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ibc-balance-grid > div { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; min-width: 0; }
.ibc-balance-grid > div + div { border-left: 1px solid var(--portal-border); }
.ibc-balance-grid span { color: var(--portal-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ibc-balance-grid strong { color: var(--portal-ink); font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ibc-balance-grid .is-highlight { background: #ecf8f1; }
.ibc-balance-grid .is-highlight strong { color: #0b6b43; }
.ib-panel { padding: 22px; border: 1px solid var(--portal-border); border-radius: 18px; background: var(--portal-surface); box-shadow: 0 1px 2px rgba(24,39,75,.04); }
.ib-panel-head { margin-bottom: 16px; }
.ib-panel-head h2 { margin: 0 0 4px; color: var(--portal-ink); font-size: 18px; font-weight: 700; }
.ib-panel-head p { margin: 0; color: var(--portal-muted); font-size: 13.5px; line-height: 1.55; }
.ibc-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1.4fr) auto; align-items: end; gap: 12px; }
.ibc-field { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
.ibc-field > span { color: var(--portal-ink); font-size: 13px; font-weight: 600; }
.portal-ib .ibc-field :is(.form-control, .form-select) { min-height: 44px; border-radius: 10px; }
.ibc-form-actions .el-button { width: auto; min-height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.ib-table-wrap { overflow-x: auto; border: 1px solid var(--portal-border); border-radius: 14px; }
.ib-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.ib-table thead th { padding: 12px 14px; border-bottom: 1px solid var(--portal-border); background: var(--portal-subtle); color: var(--portal-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.ib-table tbody td { padding: 13px 14px; border-top: 1px solid var(--portal-border); color: var(--portal-ink); font-size: 13.5px; vertical-align: top; }
.ib-table tbody tr:first-child td { border-top: 0; }
.ib-table tbody tr:hover td { background: #f8fafc; }
.ib-table td small { display: block; margin-top: 2px; color: var(--portal-muted); font-size: 12px; }
.ib-table td.is-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ib-table tr.is-empty td { padding: 32px 16px; color: var(--portal-muted); text-align: center; }
.ibc-details summary { color: var(--primary, #04072c); font-weight: 600; cursor: pointer; }
.ibc-details > div, .ibc-details > p { margin: 6px 0 0; color: var(--portal-muted); font-size: 12.5px; }
.ib-pagination:not(:empty) { margin-top: 14px; }
.ib-footnote { margin: 14px 0 0; color: var(--portal-muted); font-size: 12.5px; }
@media (max-width: 991.98px) {
    .ibc-form { grid-template-columns: 1fr 1fr; }
    .ibc-field--wide, .ibc-form-actions { grid-column: 1 / -1; }
    .ibc-balance-grid { grid-template-columns: 1fr 1fr; }
    .ibc-balance-grid > div:nth-child(3) { border-left: 0; }
    .ibc-balance-grid > div:nth-child(n+3) { border-top: 1px solid var(--portal-border); }
}
@media (max-width: 575.98px) {
    .ib-page-head h1 { font-size: 22px; }
    .ibc-balance { flex-direction: column; }
    .ibc-balance-currency { width: auto; padding: 10px; }
    .ib-panel { padding: 16px; }
    .ibc-form { grid-template-columns: 1fr; }
    .ibc-form-actions .el-button { width: 100%; }
    /* Tables become labelled cards */
    .ib-table-wrap { overflow: visible; border: 0; }
    .ib-table { min-width: 0; }
    .ib-table thead { display: none; }
    .ib-table, .ib-table tbody, .ib-table tr, .ib-table td { display: block; }
    .ib-table tbody tr { margin-bottom: 10px; padding: 12px 14px; border: 1px solid var(--portal-border); border-radius: 14px; }
    .ib-table tbody td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border: 0; text-align: right; }
    .ib-table tbody td::before { content: attr(data-label); flex-shrink: 0; color: var(--portal-muted); font-size: 12px; font-weight: 600; text-align: left; }
    .ib-table tbody tr:hover td { background: transparent; }
    .ib-table tr.is-empty td { display: block; text-align: center; }
    .ib-table tr.is-empty td::before { content: none; }
}

/* custom.css sets `label { height: 24px; margin-bottom: 12px }` globally; labels that wrap their control must size to content. */
.ibc-field, .ct-acc-field { height: auto !important; margin-bottom: 0 !important; font-family: inherit; line-height: 1.4; }
.ibc-field > span, .ct-acc-field > span:first-child { display: block; }

/* Native selects in the portal pages: consistent height, padding and chevron */
.portal-ib .ibc-field .form-select,
.portal-copytrading .ct-acc-field .form-select {
    appearance: none; -webkit-appearance: none;
    width: 100%; min-height: 46px; padding: 0 40px 0 14px;
    border: 1px solid var(--portal-border); border-radius: 10px;
    background: var(--portal-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23626e82' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 16px no-repeat;
    color: var(--portal-ink); font-size: 14.5px; line-height: 1.2; box-shadow: none; cursor: pointer;
}
.portal-ib .ibc-field :is(.form-select, .form-control):focus,
.portal-copytrading .ct-acc-field :is(.form-select, .form-control):focus { outline: none; border-color: var(--primary, #04072c); box-shadow: 0 0 0 3px rgba(4,7,44,.10); }
.portal-ib .ibc-field .form-control { min-height: 46px; padding: 0 14px; font-size: 14.5px; }
.portal-copytrading .ct-acc-field .form-select { min-height: 40px; font-size: 14px; }

/* IB lists on phones: let DataTables Responsive collapse columns instead of forcing a wide table */
.portal-ib-list .table-container table,
.portal-ib-list table.dataTable { min-width: 0 !important; }
.portal-ib-list .table-container, .portal-ib-list .table-responsive { overflow-x: visible !important; }
@media (max-width: 767.98px) {
    .portal-ib-list .dataTables_wrapper { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
    .portal-ib-list .dataTables_wrapper .dt-buttons,
    .portal-ib-list .dataTables_wrapper .dataTables_filter,
    .portal-ib-list .dataTables_wrapper .dataTables_info,
    .portal-ib-list .dataTables_wrapper .dataTables_paginate { width: 100%; margin: 0 !important; text-align: left; }
    .portal-ib-list .dataTables_wrapper .dt-buttons { flex-direction: row !important; }
    .portal-ib-list .dataTables_filter label { display: block; height: auto !important; margin: 0 !important; color: var(--portal-muted); font-size: 0; }
    .portal-ib-list .dataTables_filter input { display: block; width: 100% !important; font-size: 14px; }
    .portal-ib-list .dataTables_filter input::placeholder { color: var(--portal-muted); }
    .portal-ib-list .dataTables_wrapper .dataTables_info { text-align: center; }
    .portal-ib-list .dataTables_wrapper .dataTables_paginate { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; }
    .portal-ib-list table.dataTable thead th { padding: 10px !important; font-size: 11px; }
    .portal-ib-list table.dataTable tbody :is(td, th) { padding: 11px 10px !important; font-size: 13px; }
}
.portal-ib-list .dataTables_filter label { height: auto !important; margin: 0 !important; font-size: 0; }
.portal-ib-list .dataTables_filter input { font-size: 14px; }
/* Collapsed-row detail produced by cardRenderer() */
.ib-dtr { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; padding: 12px; background: var(--portal-subtle); }
.ib-dtr-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px; border: 1px solid var(--portal-border); border-radius: 10px; background: var(--portal-surface); }
.ib-dtr-label { color: var(--portal-muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ib-dtr-value { color: var(--portal-ink); font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.portal-ib-list table.dataTable > tbody > tr.child > td.child { padding: 0 !important; }
@media (max-width: 575.98px) { .ib-dtr { grid-template-columns: 1fr 1fr; padding: 10px; } }

/* ===== Styled dropdown (public/assets/js/portal-select.js) ===== */
.ibc-field > label { display: block; height: auto !important; margin: 0 !important; color: var(--portal-ink); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.4; }
.portal-select { position: relative; width: 100%; }
.portal-select-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; }
.portal-select-trigger {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 14px;
    border: 1px solid var(--portal-border, #e2e7ef); border-radius: 10px; background: var(--portal-surface, #fff);
    color: var(--portal-ink, #202b40); font-size: 14.5px; font-weight: 500; text-align: left; cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.portal-select-trigger:hover { border-color: #c3cad6; }
.portal-select-trigger:focus-visible, .portal-select.is-open .portal-select-trigger { outline: none; border-color: var(--primary, #04072c); box-shadow: 0 0 0 3px rgba(4,7,44,.10); }
.portal-select.is-invalid .portal-select-trigger { border-color: #d14343; box-shadow: 0 0 0 3px rgba(209,67,67,.12); }
.portal-select-trigger.is-placeholder .portal-select-value { color: var(--portal-muted, #626e82); }
.portal-select-value { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.portal-select-trigger > svg { flex-shrink: 0; color: var(--portal-muted, #626e82); transition: transform .2s ease; }
.portal-select.is-open .portal-select-trigger > svg { transform: rotate(180deg); }
.portal-select-badge { flex-shrink: 0; padding: 2px 8px; border-radius: 999px; background: #eef1f7; color: var(--primary, #04072c); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
.portal-select-list {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
    max-height: 260px; margin: 0; padding: 6px; overflow-y: auto; list-style: none;
    border: 1px solid var(--portal-border, #e2e7ef); border-radius: 12px; background: var(--portal-surface, #fff);
    box-shadow: 0 16px 40px rgba(4,7,44,.16);
    animation: portal-select-in .14s ease-out;
}
.portal-select.opens-up .portal-select-list { top: auto; bottom: calc(100% + 6px); }
@keyframes portal-select-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.portal-select-option { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border-radius: 8px; color: var(--portal-ink, #202b40); font-size: 14px; cursor: pointer; }
.portal-select-option-main { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.portal-select-option.is-placeholder { color: var(--portal-muted, #626e82); }
.portal-select-option.is-active { background: var(--portal-subtle, #f5f7fb); }
.portal-select-option.is-selected { font-weight: 650; }
.portal-select-check { flex-shrink: 0; color: var(--primary, #04072c); opacity: 0; }
.portal-select-option.is-selected .portal-select-check { opacity: 1; }
.portal-select.is-open { z-index: 40; }
.ibc-field:has(.portal-select.is-open) { position: relative; z-index: 40; }

/* IB tables on phones: each row is a labelled card (labels set by public/assets/js/ib-tables.js) */
@media (max-width: 767.98px) {
    .portal-ib-list .el-tab-pane .card-body { padding: 0; border: 0; background: transparent; box-shadow: none; }
    .portal-ib-list table.dataTable.ib-cards-ready,
    .portal-ib-list table.dataTable.ib-cards-ready > tbody { display: block; width: 100% !important; border: 0 !important; border-radius: 0; overflow: visible; background: transparent; }
    .portal-ib-list table.dataTable.ib-cards-ready > thead { display: none; }
    .portal-ib-list table.dataTable.ib-cards-ready > tbody > tr {
        display: block; margin-bottom: 12px; padding: 4px 14px;
        border: 1px solid var(--portal-border) !important; border-radius: 14px;
        background: var(--portal-surface) !important; box-shadow: 0 1px 2px rgba(24,39,75,.04);
    }
    .portal-ib-list table.dataTable.ib-cards-ready > tbody > tr > :is(td, th) {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 9px 0 !important; border: 0 !important; border-top: 1px solid var(--portal-border) !important;
        background: transparent !important; font-size: 13.5px; text-align: right; white-space: normal; overflow-wrap: anywhere;
    }
    .portal-ib-list table.dataTable.ib-cards-ready > tbody > tr > :is(td, th)::before {
        content: attr(data-label); flex-shrink: 0; max-width: 45%;
        color: var(--portal-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-align: left; text-transform: uppercase;
    }
    /* First column (ID / login) is the card title */
    .portal-ib-list table.dataTable.ib-cards-ready > tbody > tr > :is(td, th):first-child { border-top: 0 !important; padding-top: 12px !important; font-size: 15px; font-weight: 700; }
    .portal-ib-list table.dataTable.ib-cards-ready > tbody > tr > :is(td, th) > * { max-width: 100%; }
    .portal-ib-list table.dataTable.ib-cards-ready > tbody > tr > td.dataTables_empty { display: block; padding: 28px 0 !important; text-align: center; }
    .portal-ib-list table.dataTable.ib-cards-ready > tbody > tr > td.dataTables_empty::before { content: none; }
    .portal-ib-list table.dataTable.ib-cards-ready > tbody > tr:hover { background: var(--portal-surface) !important; }
}
@media (max-width: 767.98px) {
    .portal-ib-list :is(.table-container, .table-responsive, .dataTables_wrapper) { min-width: 0; max-width: 100%; }
    .portal-ib-list .dataTables_wrapper > * { min-width: 0; max-width: 100%; }
    .portal-ib-list table.dataTable.ib-cards-ready > tbody > tr > :is(td, th) { min-width: 0; }
}
@media (max-width: 767.98px) {
    .portal-ib-list table.dataTable.ib-cards-ready > tbody > tr > :is(td, th) { box-shadow: none !important; }
}

/* Card payment dialog: second step of the Credit/Debit card deposit (Stripe Elements). */
.card-pay {
    --cp-border: #e2e7ef; --cp-ink: #202b40; --cp-muted: #626e82; --cp-subtle: #f5f7fb;
    position: fixed; inset: 0; z-index: 1070; overflow-y: auto;
    background: rgba(4, 7, 44, .55); backdrop-filter: blur(3px);
}
.card-pay.hidden { display: none; }
.card-pay *, .card-pay *::before, .card-pay *::after { box-sizing: border-box; }
.card-pay-position { display: flex; align-items: center; justify-content: center; min-height: 100%; padding: 24px 16px; }
.card-pay-dialog {
    width: 100%; max-width: 460px; border-radius: 20px; background: #fff;
    box-shadow: 0 24px 60px rgba(4,7,44,.24); color: var(--cp-ink);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif; text-align: left;
    animation: card-pay-in .22s ease-out;
}
@keyframes card-pay-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.card-pay-header { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--cp-border); }
.card-pay-heading { flex: 1; min-width: 0; text-align: center; }
.card-pay-heading h4 { margin: 0; font-size: 17px; font-weight: 650; line-height: 1.3; color: var(--cp-ink); }
.card-pay-heading p { display: inline-flex; align-items: center; gap: 5px; margin: 2px 0 0; font-size: 12px; font-weight: 500; color: #1f8a4c; }
.card-pay-icon-btn { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border: 1px solid var(--cp-border); border-radius: 50%; background: #fff; color: #484c57; transition: background-color .15s ease, transform .15s ease; }
.card-pay-icon-btn:hover { background: var(--cp-subtle); }
.card-pay-close:hover { transform: rotate(90deg); }
.card-pay-icon-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.card-pay-body { padding: 20px 24px 22px; }

.card-pay-summary {
    position: relative; overflow: hidden; margin-bottom: 22px; padding: 18px 20px; border-radius: 16px; color: #fff;
    background: radial-gradient(circle at 100% 0, rgba(255,255,255,.16), transparent 55%), var(--primary, #04072c);
    box-shadow: 0 10px 24px rgba(4,7,44,.18);
}
.card-pay-summary-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.card-pay-summary-amount { display: block; margin: 2px 0 14px; font-size: 30px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.card-pay-summary dl { display: grid; gap: 6px; margin: 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.18); }
.card-pay-summary dl > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.card-pay-summary dl > div[hidden] { display: none; }
.card-pay-summary dt { font-weight: 500; opacity: .75; }
.card-pay-summary dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

.card-pay-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 14px; font-weight: 650; }
.card-pay-brands { display: inline-flex; gap: 6px; }
.card-pay-brands span { padding: 2px 7px; border: 1px solid var(--cp-border); border-radius: 6px; background: var(--cp-subtle); color: var(--cp-muted); font-size: 10px; font-weight: 700; letter-spacing: .03em; transition: opacity .15s ease, border-color .15s ease, color .15s ease; }
.card-pay-brands.has-brand span { opacity: .35; }
.card-pay-brands.has-brand span.is-active { opacity: 1; border-color: var(--primary, #04072c); color: var(--primary, #04072c); background: #fff; }

.card-pay-field { display: flex; flex-direction: column; min-width: 0; margin-bottom: 14px; }
.card-pay-field label { margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--cp-ink); cursor: pointer; }
.card-pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card-pay-input,
.card-pay-dialog input.card-pay-input {
    width: 100%; min-height: 48px; padding: 14px; border: 1px solid var(--cp-border); border-radius: 10px;
    background: #fff; color: var(--cp-ink); font-size: 15px; box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.card-pay-dialog input.card-pay-input { padding: 10px 14px; }
.card-pay-dialog input.card-pay-input::placeholder { color: #9aa4b5; }
.card-pay-dialog input.card-pay-input:focus,
.card-pay-input.StripeElement--focus { outline: none; border-color: var(--primary, #04072c); box-shadow: 0 0 0 3px rgba(4,7,44,.12); }
.card-pay-input.StripeElement--invalid { border-color: #d14343; box-shadow: 0 0 0 3px rgba(209,67,67,.12); }
.card-pay-input.StripeElement--complete { border-color: #45b26b; }

.card-pay-error { display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 14px; padding: 10px 12px; border: 1px solid #f3c7c7; border-radius: 10px; background: #fdf0f0; color: #a02b2b; font-size: 13px; line-height: 1.45; }
.card-pay-error[hidden] { display: none; }

.card-pay-submit {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; margin-top: 4px;
    border: 0; border-radius: 12px; background: var(--primary, #04072c); color: #fff; font-size: 15px; font-weight: 650;
    box-shadow: 0 8px 20px rgba(4,7,44,.20); transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.card-pay-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(4,7,44,.26); }
.card-pay-submit:focus-visible { outline: 3px solid rgba(4,7,44,.35); outline-offset: 2px; }
.card-pay-submit:disabled { opacity: .7; cursor: progress; transform: none; }
.card-pay-submit .card-pay-spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: card-pay-spin .7s linear infinite; }
@keyframes card-pay-spin { to { transform: rotate(360deg); } }

.card-pay-trust { display: flex; align-items: flex-start; justify-content: center; gap: 6px; margin: 14px 0 0; font-size: 12px; line-height: 1.45; color: var(--cp-muted); text-align: center; }
.card-pay-trust svg { flex-shrink: 0; margin-top: 1px; color: #1f8a4c; }

.card-pay-done { padding: 34px 28px 28px; text-align: center; }
.card-pay-done[hidden] { display: none; }
.card-pay-done-icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin-bottom: 16px; border-radius: 50%; background: #e7f6ec; color: #1f8a4c; animation: card-pay-pop .35s ease-out; }
@keyframes card-pay-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.card-pay-done h5 { margin: 0 0 6px; font-size: 20px; font-weight: 650; color: var(--cp-ink); }
.card-pay-done p { margin: 0 0 22px; font-size: 14px; color: var(--cp-muted); }

@media (max-width: 575.98px) {
    .card-pay-position { align-items: flex-end; padding: 12px 8px; }
    .card-pay-dialog { border-radius: 18px; }
    .card-pay-header { padding: 14px 16px; }
    .card-pay-body { padding: 16px; }
    .card-pay-summary-amount { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    .card-pay-dialog, .card-pay-done-icon { animation: none; }
}

/* Wallet cards: classic / modern design, chosen per client (wallet.layout). Each card carries both. */
.wallet-view-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.wallet-view-switch { display: inline-flex; padding: 3px; border: 1px solid var(--portal-border, #e2e7ef); border-radius: 999px; background: var(--portal-surface, #fff); }
.wallet-view-switch button { padding: 6px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--portal-muted, #626e82); font-size: 13px; font-weight: 600; transition: background-color .15s ease, color .15s ease; }
.wallet-view-switch button[aria-checked="true"] { background: var(--bw-primary, #04072c); color: #fff; }
[data-wallet-layout="modern"] .USD_wallet_card__box .custom-wallet-card-new,
[data-wallet-layout="classic"] .USD_wallet_card__box .wallet-card-modern { display: none; }

[data-wallet-layout="modern"] .wallet-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 1080px;
    box-sizing: border-box;
    margin-right: auto;
    margin-left: auto;
    justify-content: center;
}
.portal-wallets [data-wallet-layout="modern"] .wallet-card-selectable { width: 100%; }
.portal-wallets [data-wallet-layout="modern"] .wallet-card-selectable[aria-pressed="true"] { outline: none; }
.wallet-card-modern {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between; gap: 3px;
    box-sizing: border-box; aspect-ratio: 1.62; min-width: 0; max-width: 100%; padding: 14px 16px 12px; border-radius: 15px; color: #f7fbff;
    border: 1px solid color-mix(in srgb, var(--wc-glow, #1d7fe0) 50%, rgba(255, 255, 255, .12));
    background:
        radial-gradient(68% 96% at 87% 56%, color-mix(in srgb, var(--wc-glow, #1d7fe0) 21%, transparent) 0, transparent 75%),
        radial-gradient(100% 130% at 0% 0%, color-mix(in srgb, var(--wc-from, #003a85) 100%, transparent) 0, transparent 76%),
        linear-gradient(145deg, var(--wc-mid, #001b3d) 0%, var(--wc-to, #001027) 80%);
    box-shadow: 0 0 12px color-mix(in srgb, var(--wc-glow, #1d7fe0) 13%, transparent), 0 9px 20px rgba(2, 6, 23, .24);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
/* Light sweep across the card on hover. */
.wallet-card-modern::after {
    content: ""; position: absolute; inset: -40% -60%; z-index: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .08) 50%, transparent 58%);
    transform: translateX(-60%); transition: transform .9s ease;
}
.USD_wallet_card__box:hover .wallet-card-modern::after { transform: translateX(60%); }
@media (prefers-reduced-motion: reduce) { .wallet-card-modern::after { display: none; } }

.wcm-art { position: absolute; top: 28%; right: -2%; z-index: 1; width: 34%; height: 42%; pointer-events: none; }
.wallet-card-modern .wcm-art {
    background: linear-gradient(150deg,
        color-mix(in srgb, var(--wc-glow, #1d7fe0) 48%, #fff) 0%,
        var(--wc-glow, #1d7fe0) 52%,
        color-mix(in srgb, var(--wc-glow, #1d7fe0) 58%, var(--wc-to, #001027)) 100%);
    opacity: .88;
    -webkit-mask: url("../images/wallet-card-whales.png") center / 100% auto no-repeat;
    mask: url("../images/wallet-card-whales.png") center / 100% auto no-repeat;
    filter: drop-shadow(0 0 7px color-mix(in srgb, var(--wc-glow, #1d7fe0) 34%, transparent))
        drop-shadow(0 3px 7px rgba(0, 0, 0, .24));
}
.wcm-waves { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: hidden; fill: none; pointer-events: none; }
.wcm-waves path { stroke: color-mix(in srgb, var(--wc-glow, #1d7fe0) 36%, transparent); stroke-width: 1; }
.wcm-waves path + path { stroke: color-mix(in srgb, var(--wc-glow, #1d7fe0) 17%, transparent); stroke-width: .8; }
.wcm-top, .wcm-contactless, .wcm-middle, .wcm-currency, .wcm-bottom { position: relative; z-index: 2; }
.wcm-top, .wcm-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wcm-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wcm-heading .wcm-chip { width: 26px; height: 20px; }
.wcm-title { overflow: hidden; font-size: 11px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.wcm-status { display: inline-flex; flex-shrink: 0; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid color-mix(in srgb, var(--wc-glow, #1d7fe0) 50%, transparent); border-radius: 999px; background: rgba(2, 8, 23, .38); font-size: 10px; font-weight: 500; color: rgba(255, 255, 255, .88); }
.wcm-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.wallet-card-modern.is-active .wcm-status { color: #fff; }
.wallet-card-modern.is-active .wcm-dot { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.wcm-flag { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }

.wcm-middle { display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
.wcm-balance { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wcm-amount { font-size: clamp(20px, 2.2vw, 25px); font-weight: 700; line-height: 1.1; letter-spacing: -.015em; white-space: nowrap; font-variant-numeric: tabular-nums; transition: filter .2s ease; }
.wcm-amount small { margin-left: 5px; font-size: 8px; font-weight: 500; color: rgba(255, 255, 255, .76); vertical-align: 4px; }
.wcm-amount.is-long { font-size: clamp(18px, 1.9vw, 22px); }
.wcm-amount.is-xlong { font-size: clamp(16px, 1.7vw, 19px); }
[data-balance-hidden] .wcm-amount { filter: blur(9px); user-select: none; }
.wcm-eye { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: rgba(255, 255, 255, .6); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.wcm-eye:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.wcm-eye:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.wcm-eye .wcm-eye-closed, [data-balance-hidden] .wcm-eye .wcm-eye-open { display: none; }
[data-balance-hidden] .wcm-eye .wcm-eye-closed { display: inline; }

.wcm-chip { width: 40px; height: 30px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .45)); }
.wcm-contactless { display: flex; align-items: center; height: 19px; color: rgba(255, 255, 255, .82); }
.wcm-contactless svg { width: 21px; height: 21px; }

.wcm-currency { display: flex; align-items: center; gap: 7px; font-size: 10px; color: rgba(255, 255, 255, .74); }
.wcm-id { font-size: 10px; letter-spacing: .06em; color: rgba(255, 255, 255, .66); font-variant-numeric: tabular-nums; }
.wcm-activate { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid color-mix(in srgb, var(--wc-glow, #1d7fe0) 48%, transparent); border-radius: 999px; background: rgba(2, 8, 23, .42); color: #fff; font-size: 10px; font-weight: 500; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.wcm-activate:hover:not(:disabled) { border-color: var(--wc-glow, #a5b4fc); background: color-mix(in srgb, var(--wc-glow, #a5b4fc) 22%, rgba(2, 8, 23, .6)); }
.wcm-activate.wcm-details { padding-right: 13px; padding-left: 13px; }
.wcm-activate:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 575.98px) {
    .wallet-card-modern { padding: 13px 14px 11px; }
    .wcm-heading .wcm-chip { width: 26px; height: 20px; }
    .wcm-title { font-size: 11px; }
    .wcm-status { padding: 3px 7px; font-size: 9px; }
    .wcm-amount { font-size: 22px; }
    .wcm-amount.is-long { font-size: 19px; }
    .wcm-amount.is-xlong { font-size: 16px; }
}
@media (max-width: 991.98px) {
    [data-wallet-layout="modern"] .wallet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    [data-wallet-layout="modern"] .wallet-grid { grid-template-columns: minmax(0, 390px); }
}
@media (max-width: 991.98px) {
    .portal-wallets .wallet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .portal-wallets .wallet-grid { grid-template-columns: minmax(0, 420px); }
}

/* Wallet transactions: currency flag with an in/out badge, amounts with their currency symbol. */
.tx-avatar { position: relative; display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--portal-subtle, #f5f7fb); box-shadow: 0 0 0 1px var(--portal-border, #e2e7ef); }
.tx-flag { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.tx-avatar-text { font-size: 12px; font-weight: 700; }
.tx-direction { position: absolute; right: -3px; bottom: -3px; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 2px solid var(--portal-surface, #fff); border-radius: 50%; color: #fff; }
.tx-direction.is-in { background: #1f8a4c; }
.tx-direction.is-out { background: #d14343; }
.tx-meta { margin: 0; overflow: hidden; color: var(--portal-muted, #626e82); white-space: nowrap; text-overflow: ellipsis; }
.tx-amount { flex-shrink: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Let the description shrink (with ellipsis) so the amount column always fits on phones. */
.transaction-block .toggle-header { gap: 12px; }
.transaction-block .toggle-header > :first-child,
.transaction-block .transaction-text-left { flex: 1 1 auto; min-width: 0; }
.tx-day-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
