/*
 * Member application design system entrypoint.
 *
 * Keep this order deterministic: foundations first, then structure,
 * reusable components, page adapters, and responsive composition.
 * Every module is scoped to regular authenticated pages and explicitly
 * excludes the full-screen trading terminal.
 */

/* inlined: assets/css/member/00-tokens.css */
/* Member foundations: corporate-fintech colour, spacing and elevation. */
body.member-shell:not(.trading-custom-shell) {
    color-scheme: light;

    --member-primary: hsl(var(--primary));
    --member-primary-foreground: hsl(var(--primary-foreground));

    --member-bg: #f4f6f8;
    --member-surface: #ffffff;
    --member-surface-raised: #ffffff;
    --member-surface-muted: #f7f9fb;
    --member-surface-hover: #f1f4f7;
    --member-text: #162033;
    --member-text-muted: #647085;
    --member-border: #dfe4eb;
    --member-border-strong: #cbd3de;
    --member-overlay: rgba(15, 23, 42, .52);

    --member-success: #138a63;
    --member-success-soft: rgba(19, 138, 99, .10);
    --member-warning: #b7791f;
    --member-warning-soft: rgba(183, 121, 31, .11);
    --member-danger: #c9364f;
    --member-danger-soft: rgba(201, 54, 79, .10);
    --member-info: #3974b9;
    --member-info-soft: rgba(57, 116, 185, .10);

    --member-radius-xs: 6px;
    --member-radius-sm: 9px;
    --member-radius: 12px;
    --member-radius-lg: 16px;
    --member-shadow-card: 0 1px 2px rgba(15, 23, 42, .025), 0 8px 24px rgba(15, 23, 42, .045);
    --member-shadow-raised: 0 16px 42px rgba(15, 23, 42, .10);
    --member-focus-ring: 0 0 0 3px hsl(var(--primary) / .17);

    --member-content-max: 1280px;
    --member-readable-max: 880px;
    --member-header-height: 60px;
    --member-bottom-nav-height: 72px;
    --member-sidebar-expanded: 248px;
    --member-sidebar-collapsed: 76px;
    --member-sidebar-current: 0px;
    --member-shell-gutter: clamp(1rem, 2.5vw, 2rem);

    /* Compatibility with legacy member surface variables. */
    --dashboard-shell-bg: var(--member-bg);
    --dashboard-card-bg: var(--member-surface);
    --dashboard-soft-bg: var(--member-surface-muted);
    --dashboard-card-border: var(--member-border);
    --dashboard-card-shadow: var(--member-shadow-card);
    --dashboard-radius: var(--member-radius);
    --portfolio-card-surface: var(--member-surface);
    --portfolio-card-border: var(--member-border);
    --portfolio-card-radius: var(--member-radius);
    --portfolio-card-shadow: var(--member-shadow-card);
    --portfolio-card-hover: var(--member-surface-hover);
    --portfolio-card-selected: hsl(var(--primary) / .07);
}

html.dark body.member-shell:not(.trading-custom-shell) {
    color-scheme: dark;

    --member-bg: #0b0e13;
    --member-surface: #12161d;
    --member-surface-raised: #171c24;
    --member-surface-muted: #181d25;
    --member-surface-hover: #1d232d;
    --member-text: #edf1f7;
    --member-text-muted: #9aa6b7;
    --member-border: #252c37;
    --member-border-strong: #354050;
    --member-overlay: rgba(0, 0, 0, .68);

    --member-success: #45c397;
    --member-success-soft: rgba(69, 195, 151, .11);
    --member-warning: #e4ad55;
    --member-warning-soft: rgba(228, 173, 85, .12);
    --member-danger: #ef7186;
    --member-danger-soft: rgba(239, 113, 134, .11);
    --member-info: #72a8e4;
    --member-info-soft: rgba(114, 168, 228, .11);

    --member-shadow-card: 0 1px 1px rgba(0, 0, 0, .18), 0 10px 28px rgba(0, 0, 0, .20);
    --member-shadow-raised: 0 18px 48px rgba(0, 0, 0, .34);
}

@media (prefers-reduced-motion: reduce) {
    body.member-shell:not(.trading-custom-shell) {
        scroll-behavior: auto;
    }

    body.member-shell:not(.trading-custom-shell) *,
    body.member-shell:not(.trading-custom-shell) *::before,
    body.member-shell:not(.trading-custom-shell) *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}



/* inlined: assets/css/member/10-shell.css */
/* Member application frame and persistent desktop navigation contract. */
body.member-shell:not(.trading-custom-shell) {
    min-width: 320px;
    overflow-x: clip;
    padding-top: var(--member-header-height);
    background: var(--member-bg) !important;
    color: var(--member-text);
}

body.member-shell:not(.trading-custom-shell) .member-app-layout {
    min-height: calc(100dvh - var(--member-header-height));
}

body.member-shell:not(.trading-custom-shell) :is(.member-main, .member-app-main) {
    min-width: 0;
    margin-left: var(--member-sidebar-current);
    transition: none;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-page, .member-page-shell) {
    min-width: 0;
    min-height: calc(100dvh - var(--member-header-height));
    background: var(--member-bg) !important;
    color: var(--member-text);
}

body.member-shell:not(.trading-custom-shell) .member-page-container,
body.member-shell:not(.trading-custom-shell) .ui-page-container {
    width: min(100%, var(--member-content-max)) !important;
    max-width: var(--member-content-max) !important;
    margin-inline: auto;
}

body.member-shell:not(.trading-custom-shell) :is(
    .ui-readable,
    .ui-form-layout,
    .member-readable,
    .member-form-layout
) {
    width: min(100%, var(--member-readable-max));
    margin-inline: auto;
}

/* Compact, opaque topbar keeps content legible while scrolling. */
body.member-shell:not(.trading-custom-shell) #mainHeader,
body.member-shell:not(.trading-custom-shell) .member-topbar {
    min-height: var(--member-header-height);
    border-bottom: 1px solid var(--member-border) !important;
    background: rgba(255, 255, 255, .97) !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .025) !important;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}

html.dark body.member-shell:not(.trading-custom-shell) #mainHeader,
html.dark body.member-shell:not(.trading-custom-shell) .member-topbar {
    background: rgba(18, 22, 29, .97) !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .18) !important;
}

html.dark body.member-shell:not(.trading-custom-shell) .member-logo-link .theme-logo-single {
    filter: brightness(0) invert(1);
    opacity: .92;
}

/* Branding markup is generated at runtime, so these theme variants cannot rely
   on Tailwind's static class discovery. Keep the switch local to member pages. */
body.member-shell:not(.trading-custom-shell) .member-logo-link .theme-logo-light {
    display: block !important;
}

body.member-shell:not(.trading-custom-shell) .member-logo-link .theme-logo-dark {
    display: none !important;
}

html.dark body.member-shell:not(.trading-custom-shell) .member-logo-link .theme-logo-light {
    display: none !important;
}

html.dark body.member-shell:not(.trading-custom-shell) .member-logo-link .theme-logo-dark {
    display: block !important;
}

body.member-shell:not(.trading-custom-shell) :is(.member-header-inner, .member-topbar-inner) {
    width: min(var(--member-content-max), calc(100% - 2rem));
    max-width: var(--member-content-max) !important;
    margin-inline: auto;
    padding-inline: 0 !important;
}

body.member-shell:not(.trading-custom-shell) .member-header-content {
    height: var(--member-header-height);
}

body.member-shell:not(.trading-custom-shell) :is(.member-action-btn, .member-topbar-button) {
    width: 40px;
    height: 40px;
    border: 1px solid transparent;
    border-radius: var(--member-radius-sm) !important;
}

body.member-shell:not(.trading-custom-shell) :is(.member-action-btn, .member-topbar-button):hover {
    border-color: var(--member-border);
    background: var(--member-surface-hover) !important;
    color: var(--member-text) !important;
}

/* Persistent sidebar is opt-in via .member-sidebar-layout; the old drawer stays intact. */
body.member-shell:not(.trading-custom-shell) :is(.member-sidebar, #sidebarMenu.member-sidebar) {
    width: var(--member-sidebar-current);
    border-right: 1px solid var(--member-border);
    background: var(--member-surface) !important;
    box-shadow: none;
    transition: none;
}

body.member-shell:not(.trading-custom-shell) .member-sidebar [data-sidebar-label],
body.member-shell:not(.trading-custom-shell) .member-sidebar .member-sidebar-label,
body.member-shell:not(.trading-custom-shell) .member-sidebar .member-sidebar-section-title {
    transition: opacity .15s ease, visibility .15s ease;
}

body.member-shell:not(.trading-custom-shell) .member-sidebar a[aria-current="page"],
body.member-shell:not(.trading-custom-shell) .member-sidebar a[aria-current="true"],
body.member-shell:not(.trading-custom-shell) .member-sidebar .is-active {
    background: hsl(var(--primary) / .09) !important;
    color: var(--member-primary) !important;
    box-shadow: inset 3px 0 0 var(--member-primary);
}

body.member-shell:not(.trading-custom-shell) .member-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--member-border);
    border-radius: var(--member-radius-sm);
    background: var(--member-surface);
    color: var(--member-text-muted);
}

body.member-shell:not(.trading-custom-shell) .member-sidebar-toggle:hover {
    border-color: var(--member-border-strong);
    background: var(--member-surface-hover);
    color: var(--member-text);
}

/* Explicit theme controls live in the authenticated sidebar and share the
 * same persisted state as the profile setting and header theme action. */
body.member-shell:not(.trading-custom-shell) .member-sidebar-theme {
    flex: 0 0 auto;
    border-top: 1px solid var(--member-border);
    padding: .75rem;
    background: var(--member-surface);
}

body.member-shell:not(.trading-custom-shell) .member-sidebar-theme-heading {
    margin: 0 0 .5rem;
    padding-inline: .25rem;
    color: var(--member-text-muted);
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

body.member-shell:not(.trading-custom-shell) .member-theme-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .375rem;
}

body.member-shell:not(.trading-custom-shell) .member-theme-option {
    display: inline-flex;
    min-width: 0;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    border: 1px solid var(--member-border);
    border-radius: var(--member-radius-sm);
    background: var(--member-surface-muted);
    color: var(--member-text-muted);
    font-size: .75rem;
    font-weight: 650;
    line-height: 1.2;
}

body.member-shell:not(.trading-custom-shell) .member-theme-option:hover {
    border-color: var(--member-border-strong);
    background: var(--member-surface-hover);
    color: var(--member-text);
}

body.member-shell:not(.trading-custom-shell) .member-theme-option[aria-pressed="true"],
body.member-shell:not(.trading-custom-shell) .member-theme-option.is-active {
    border-color: hsl(var(--primary) / .45);
    background: hsl(var(--primary) / .12);
    color: var(--member-primary);
}

body.member-shell:not(.trading-custom-shell) .member-theme-option ion-icon {
    flex: 0 0 auto;
    font-size: 1rem;
}

/* Compact authenticated footer. The dedicated hook is preferred; the legacy
 * footer adapter keeps the current markup compact until it is migrated. */
body.member-shell:not(.trading-custom-shell) .member-app-footer,
body.member-shell:not(.trading-custom-shell) > footer {
    margin-top: auto;
    border-top: 1px solid var(--member-border) !important;
    background: var(--member-surface) !important;
    padding: 1rem var(--member-shell-gutter) !important;
    color: var(--member-text-muted);
}

body.member-shell:not(.trading-custom-shell) .member-app-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.25rem;
    width: min(100%, var(--member-content-max));
    margin-inline: auto;
    font-size: .8125rem;
}

body.member-shell:not(.trading-custom-shell) .member-app-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
}

body.member-shell:not(.trading-custom-shell) .member-app-footer a {
    color: var(--member-text-muted);
    text-decoration: none;
}

body.member-shell:not(.trading-custom-shell) .member-app-footer a:hover {
    color: var(--member-text);
}

body.member-shell:not(.trading-custom-shell) > footer > div {
    max-width: var(--member-content-max) !important;
}

body.member-shell:not(.trading-custom-shell) > footer > div > .grid {
    display: none;
}

body.member-shell:not(.trading-custom-shell) > footer > div > .pt-8 {
    padding-top: 0 !important;
    border-top: 0 !important;
}

@media (min-width: 1024px) and (max-width: 1279px) {
    body.member-shell.member-sidebar-layout:not(.trading-custom-shell) {
        --member-sidebar-current: var(--member-sidebar-collapsed);
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="expanded"]:not(.trading-custom-shell),
    html[data-member-sidebar-state="expanded"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) {
        --member-sidebar-current: var(--member-sidebar-expanded);
    }
}

@media (min-width: 1280px) {
    body.member-shell.member-sidebar-layout:not(.trading-custom-shell) {
        --member-sidebar-current: var(--member-sidebar-expanded);
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell),
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) {
        --member-sidebar-current: var(--member-sidebar-collapsed);
    }
}

@media (min-width: 1024px) {
    body.member-shell.member-sidebar-layout:not(.trading-custom-shell) :is(.member-sidebar, #sidebarMenu.member-sidebar) {
        top: var(--member-header-height);
        bottom: 0;
        left: 0;
        z-index: 40;
        height: auto;
        transform: none;
    }

    body.member-shell.member-sidebar-layout:not(.trading-custom-shell) #sidebarOverlay {
        display: none;
    }

    body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-app-footer {
        margin-left: var(--member-sidebar-current);
        transition: none;
    }

    body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar [data-sidebar-label],
    body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar .member-sidebar-label,
    body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar .member-sidebar-section-title {
        opacity: 1;
        visibility: visible;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar [data-sidebar-label],
    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar .member-sidebar-label,
    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar .member-sidebar-section-title,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar [data-sidebar-label],
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar .member-sidebar-label,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar .member-sidebar-section-title {
        width: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar-profile,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar-profile {
        padding: .75rem .625rem;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar-profile > .flex:first-child,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar-profile > .flex:first-child {
        display: none;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar-user,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar-user {
        justify-content: center;
        margin-bottom: 0;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar-user > :first-child,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar-user > :first-child {
        width: 40px;
        height: 40px;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar-balance,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar-balance {
        display: none;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar-section,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar-section {
        padding-inline: .5rem;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar-section-title,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar-section-title {
        display: none;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar-link,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar-link {
        justify-content: center;
        width: 48px;
        min-height: 44px;
        margin-inline: auto;
        padding-inline: 0;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar-link ion-icon,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar-link ion-icon {
        font-size: 20px;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar-theme,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar-theme {
        padding: .625rem .5rem;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-sidebar-theme-heading,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-sidebar-theme-heading {
        display: none;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-theme-options,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-theme-options {
        grid-template-columns: 1fr;
    }

    body.member-shell.member-sidebar-layout[data-member-sidebar-state="collapsed"]:not(.trading-custom-shell) .member-theme-option,
    html[data-member-sidebar-state="collapsed"] body.member-shell.member-sidebar-layout:not(.trading-custom-shell) .member-theme-option {
        width: 42px;
        min-height: 38px;
        margin-inline: auto;
        padding: 0;
    }
}

body.member-shell[data-member-sidebar-ready="true"]:not(.trading-custom-shell) :is(.member-main, .member-app-main),
body.member-shell[data-member-sidebar-ready="true"]:not(.trading-custom-shell) .member-app-footer {
    transition: margin-left .22s ease;
}

body.member-shell[data-member-sidebar-ready="true"]:not(.trading-custom-shell) :is(.member-sidebar, #sidebarMenu.member-sidebar) {
    transition: width .22s ease, transform .22s ease;
}



/* inlined: assets/css/member/20-components.css */
/* Shared semantic primitives with legacy member-* compatibility aliases. */
body.member-shell:not(.trading-custom-shell) :is(.ui-page, .member-page-shell) {
    color: var(--member-text);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-page-header, .member-page-header) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: .75rem 1.25rem;
    min-width: 0;
    color: var(--member-text);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-page-header, .member-page-header) > * {
    min-width: 0;
}

/* Existing pages wrap title and actions in one full-width flex row. */
body.member-shell:not(.trading-custom-shell) .member-page-header:not(.ui-page-header) > div:first-child,
body.member-shell:not(.trading-custom-shell) .member-page-header > .ui-page-header {
    width: 100%;
}

body.member-shell:not(.trading-custom-shell) .ui-page-header__main {
    display: flex;
    flex: 1 1 auto;
    align-items: flex-start;
    gap: .75rem;
}

body.member-shell:not(.trading-custom-shell) .ui-page-header__copy {
    min-width: 0;
}

body.member-shell:not(.trading-custom-shell) .ui-page-header__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
}

body.member-shell:not(.trading-custom-shell) .ui-page-header__back {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 36px;
    padding: .45rem .7rem;
    border: 1px solid var(--member-border);
    border-radius: var(--member-radius-sm) !important;
    background: var(--member-surface);
    color: var(--member-text-muted);
    font-size: .75rem;
    text-decoration: none;
}

body.member-shell:not(.trading-custom-shell) .ui-page-header__back:hover {
    border-color: var(--member-border-strong);
    background: var(--member-surface-hover);
    color: var(--member-text);
}

body.member-shell:not(.trading-custom-shell) .ui-page-header__actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-page-header, .member-page-header) h1,
body.member-shell:not(.trading-custom-shell) .ui-page-title {
    margin: 0;
    font-size: 1.5rem !important;
    font-weight: 750 !important;
    line-height: 1.2 !important;
    letter-spacing: -.025em;
    color: var(--member-text);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-page-eyebrow, .member-page-eyebrow) {
    margin: 0 0 .35rem;
    color: var(--member-text-muted);
    font-size: .6875rem;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: .12em;
    text-transform: uppercase;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-page-description, .member-page-description) {
    max-width: 68ch;
    margin: .4rem 0 0;
    color: var(--member-text-muted);
    font-size: .875rem;
    line-height: 1.6;
}

body.member-shell:not(.trading-custom-shell) :is(
    .ui-card,
    .member-card,
    .member-stat-card,
    .member-action-card,
    .member-table-card,
    .profile-card,
    .wallet-card,
    .transaction-card,
    .deposit-card,
    .withdraw-card,
    .swap-panel,
    .wallet-panel,
    .plan-card
) {
    border: 1px solid var(--member-border) !important;
    border-radius: var(--member-radius) !important;
    background: var(--member-surface) !important;
    color: var(--member-text) !important;
    box-shadow: var(--member-shadow-card) !important;
}

/* Override legacy accent-on-hover cards. Accent borders are reserved for
 * explicit selection, navigation and focus states. */
body.member-shell:not(.trading-custom-shell) :is(.ui-card, .member-card):hover {
    border-color: var(--member-border-strong) !important;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-card, .member-card):is(
    .is-active,
    .active,
    .selected,
    [aria-selected="true"],
    [data-state="active"]
) {
    border-color: var(--member-primary) !important;
    background: hsl(var(--primary) / .07) !important;
    box-shadow: inset 0 0 0 1px hsl(var(--primary) / .08) !important;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-card--flat, .member-card-flat) {
    box-shadow: none !important;
}

body.member-shell:not(.trading-custom-shell) :is(
    a.ui-card,
    button.ui-card,
    .ui-card--interactive,
    .member-action-card
) {
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

body.member-shell:not(.trading-custom-shell) :is(
    a.ui-card,
    button.ui-card,
    .ui-card--interactive,
    .member-action-card
):hover {
    border-color: var(--member-border-strong) !important;
    background: var(--member-surface-hover) !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .07) !important;
    transform: translateY(-1px);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-button, .member-button) {
    min-height: 40px;
    border-radius: var(--member-radius-sm) !important;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease, opacity .16s ease, transform .1s ease;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-button, .member-button):active:not(:disabled) {
    transform: translateY(1px);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-button, .member-button):disabled,
body.member-shell:not(.trading-custom-shell) :is(.ui-button, .member-button)[aria-disabled="true"],
body.member-shell:not(.trading-custom-shell) :is(.ui-button, .member-button):is(.is-loading, .ui-is-busy),
body.member-shell:not(.trading-custom-shell) :is(.ui-button, .member-button)[aria-busy="true"] {
    cursor: not-allowed;
    opacity: .55;
    pointer-events: none;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-button--primary, .member-button[class~="bg-primary"]) {
    border-color: var(--member-primary) !important;
    background: var(--member-primary) !important;
    color: var(--member-primary-foreground) !important;
    box-shadow: none !important;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-button--primary, .member-button[class~="bg-primary"]):hover {
    filter: brightness(1.04);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-button--secondary, .ui-button--ghost),
body.member-shell:not(.trading-custom-shell) .member-button[class~="bg-card"] {
    border-color: var(--member-border) !important;
    background: var(--member-surface) !important;
    color: var(--member-text) !important;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-button--secondary, .ui-button--ghost):hover,
body.member-shell:not(.trading-custom-shell) .member-button[class~="bg-card"]:hover {
    border-color: var(--member-border-strong) !important;
    background: var(--member-surface-hover) !important;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-field, .member-field) {
    display: grid;
    gap: .45rem;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-label, .member-label) {
    color: var(--member-text);
    font-size: .8125rem;
    font-weight: 650;
}

body.member-shell:not(.trading-custom-shell) :is(
    .ui-input,
    .member-input,
    input.member-input,
    select.member-input,
    textarea.member-input
) {
    min-height: 44px;
    border: 1px solid var(--member-border) !important;
    border-radius: var(--member-radius-sm) !important;
    background: var(--member-surface-muted) !important;
    color: var(--member-text) !important;
    box-shadow: none;
    outline: 0;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

body.member-shell:not(.trading-custom-shell) textarea:is(.ui-input, .member-input) {
    min-height: 112px;
    resize: vertical;
}

body.member-shell:not(.trading-custom-shell) :is(
    .ui-input,
    .member-input,
    input.member-input,
    select.member-input,
    textarea.member-input
):hover:not(:disabled) {
    border-color: var(--member-border-strong) !important;
}

body.member-shell:not(.trading-custom-shell) :is(
    .ui-input,
    .member-input,
    input.member-input,
    select.member-input,
    textarea.member-input
):focus {
    border-color: var(--member-primary) !important;
    background: var(--member-surface) !important;
    box-shadow: var(--member-focus-ring) !important;
}

body.member-shell:not(.trading-custom-shell) :is(
    .ui-input,
    .member-input,
    input.member-input,
    select.member-input,
    textarea.member-input
):disabled {
    cursor: not-allowed;
    opacity: .58;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-help, .member-field-help) {
    color: var(--member-text-muted);
    font-size: .75rem;
    line-height: 1.5;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-tabs, .member-tabs, .transaction-tabs) {
    display: flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
    overflow-x: auto;
    padding: .25rem;
    border: 1px solid var(--member-border);
    border-radius: var(--member-radius);
    background: var(--member-surface-muted);
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-tabs, .member-tabs, .transaction-tabs)::-webkit-scrollbar {
    display: none;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-tab, .member-tab, .transaction-tab) {
    flex: 0 0 auto;
    min-height: 36px;
    padding: .55rem .8rem;
    border: 0;
    border-radius: var(--member-radius-sm);
    background: transparent;
    color: var(--member-text-muted);
    font-size: .8125rem;
    font-weight: 650;
    text-decoration: none;
    scroll-snap-align: start;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-tab, .member-tab, .transaction-tab):hover {
    color: var(--member-text);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-tab, .member-tab, .transaction-tab):is(
    .is-active,
    [aria-current="page"],
    [aria-selected="true"]
) {
    background: var(--member-primary);
    color: var(--member-primary-foreground);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-status, .member-status) {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    width: fit-content;
    min-height: 26px;
    padding: .25rem .55rem;
    border: 1px solid var(--member-border);
    border-radius: 999px;
    background: var(--member-surface-muted);
    color: var(--member-text-muted);
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-status, .member-status):is(.is-success, [data-status="success"], [data-status="approved"], [data-status="completed"]) {
    border-color: rgba(19, 138, 99, .25);
    background: var(--member-success-soft);
    color: var(--member-success);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-status, .member-status):is(.is-warning, [data-status="warning"], [data-status="pending"]) {
    border-color: rgba(183, 121, 31, .26);
    background: var(--member-warning-soft);
    color: var(--member-warning);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-status, .member-status):is(.is-danger, [data-status="danger"], [data-status="failed"], [data-status="rejected"]) {
    border-color: rgba(201, 54, 79, .26);
    background: var(--member-danger-soft);
    color: var(--member-danger);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-status, .member-status):is(.is-info, [data-status="info"], [data-status="processing"]) {
    border-color: rgba(57, 116, 185, .25);
    background: var(--member-info-soft);
    color: var(--member-info);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-empty, .ui-empty-state, .member-empty-state) {
    display: grid;
    place-items: center;
    min-height: 190px;
    padding: clamp(1.5rem, 4vw, 3rem);
    text-align: center;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-empty, .ui-empty-state, .member-empty-state) > * {
    max-width: 34rem;
}

body.member-shell:not(.trading-custom-shell) .ui-live-status {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .4rem;
}

body.member-shell:not(.trading-custom-shell) .ui-live-status::before {
    width: .45rem;
    height: .45rem;
    border-radius: 999px;
    background: var(--member-success);
    content: "";
    box-shadow: 0 0 0 3px var(--member-success-soft);
}

body.member-shell:not(.trading-custom-shell) .ui-live-status[data-state="loading"] {
    color: var(--member-text-muted) !important;
}

body.member-shell:not(.trading-custom-shell) .ui-live-status[data-state="loading"]::before {
    background: var(--member-info);
    box-shadow: 0 0 0 3px var(--member-info-soft);
    animation: memberLivePulse 1.1s ease-in-out infinite;
}

body.member-shell:not(.trading-custom-shell) .ui-live-status[data-state="error"] {
    color: var(--member-danger) !important;
}

body.member-shell:not(.trading-custom-shell) .ui-live-status[data-state="error"]::before {
    background: var(--member-danger);
    box-shadow: 0 0 0 3px var(--member-danger-soft);
}

@keyframes memberLivePulse {
    50% { opacity: .35; transform: scale(.82); }
}

body.member-shell:not(.trading-custom-shell) :is(.ui-skeleton, .member-skeleton) {
    position: relative;
    overflow: hidden;
    border-radius: var(--member-radius-sm);
    background: var(--member-surface-muted);
    color: transparent !important;
    pointer-events: none;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-skeleton, .member-skeleton)::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .55) 48%, transparent 76%);
    content: "";
    transform: translateX(-100%);
    animation: memberSkeleton 1.35s ease-in-out infinite;
}

html.dark body.member-shell:not(.trading-custom-shell) :is(.ui-skeleton, .member-skeleton)::after {
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .07) 48%, transparent 76%);
}

@keyframes memberSkeleton {
    to { transform: translateX(100%); }
}

body.member-shell:not(.trading-custom-shell) :is(.ui-alert, .member-alert) {
    border: 1px solid var(--member-border);
    border-radius: var(--member-radius) !important;
    background: var(--member-surface-muted);
    color: var(--member-text);
    box-shadow: none !important;
}

body.member-shell:not(.trading-custom-shell) :is(.ui-alert, .member-alert):is(.is-success, [data-variant="success"]) {
    border-color: rgba(19, 138, 99, .25) !important;
    background: var(--member-success-soft) !important;
    color: var(--member-success);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-alert, .member-alert):is(.is-warning, [data-variant="warning"]) {
    border-color: rgba(183, 121, 31, .26) !important;
    background: var(--member-warning-soft) !important;
    color: var(--member-warning);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-alert, .member-alert):is(.is-danger, [data-variant="danger"], [data-variant="error"]) {
    border-color: rgba(201, 54, 79, .26) !important;
    background: var(--member-danger-soft) !important;
    color: var(--member-danger);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-alert, .member-alert):is(.is-info, [data-variant="info"]) {
    border-color: rgba(57, 116, 185, .25) !important;
    background: var(--member-info-soft) !important;
    color: var(--member-info);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-table, .member-table-card) {
    overflow: hidden;
    border: 1px solid var(--member-border);
    border-radius: var(--member-radius);
    background: var(--member-surface);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-table, .member-table-card) :is(th, td) {
    border-color: var(--member-border);
}

body.member-shell:not(.trading-custom-shell) :is(.ui-table, .member-table-card) th {
    background: var(--member-surface-muted);
    color: var(--member-text-muted);
    font-size: .6875rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

body.member-shell:not(.trading-custom-shell) :is(
    a,
    button,
    input,
    select,
    textarea,
    [tabindex]:not([tabindex="-1"])
):focus-visible {
    outline: 2px solid var(--member-primary) !important;
    outline-offset: 2px;
    box-shadow: var(--member-focus-ring);
}



/* inlined: assets/css/member/30-pages.css */
/* Page-level adapters: presentation only; no behavioural selectors change. */

body.member-shell:not(.trading-custom-shell) .member-page-header .text-primary {
    color: var(--member-text-muted) !important;
}

/* Dashboard: neutral surfaces and restrained hierarchy. */
body.member-shell.dashboard-page:not(.trading-custom-shell) :is(
    .dashboard-wallet-card,
    .dashboard-surface-card,
    .dashboard-stat-card,
    .dashboard-desktop-card,
    .dashboard-activity-card,
    .dashboard-monthly-overview-card,
    .dashboard-line-chart-card,
    .dashboard-cryptoaw-market-card,
    .dashboard-portfolio-card
) {
    border-color: var(--member-border) !important;
    border-radius: var(--member-radius) !important;
    background: var(--member-surface) !important;
    box-shadow: var(--member-shadow-card) !important;
}

body.member-shell.dashboard-page:not(.trading-custom-shell) .dashboard-portfolio-card::before,
body.member-shell.dashboard-page:not(.trading-custom-shell) .dashboard-portfolio-card::after {
    display: none !important;
}

body.member-shell.dashboard-page:not(.trading-custom-shell) .dashboard-cryptoaw-market-card:hover {
    border-color: var(--member-border-strong) !important;
    background: var(--member-surface-hover) !important;
}

/* Wallet and exchange: structured panels without accent outlines. */
body.member-shell.surface-finance:not(.trading-custom-shell) :is(
    .wallet-hero-shell,
    .wallet-market-panel,
    .wallet-pro-balance-panel,
    .wallet-pro-market-panel,
    .wallet-pro-side-card,
    .wallet-pro-modal-panel,
    .swap-panel
) {
    border-color: var(--member-border) !important;
    border-radius: var(--member-radius) !important;
    background: var(--member-surface) !important;
    box-shadow: var(--member-shadow-card) !important;
}

body.member-shell.surface-finance:not(.trading-custom-shell) :is(.wallet-hero-shell, .wallet-market-panel)::before,
body.member-shell.surface-finance:not(.trading-custom-shell) :is(.wallet-hero-shell, .wallet-market-panel)::after {
    display: none !important;
}

body.member-shell.surface-finance:not(.trading-custom-shell) .wallet-market-panel [data-market-row] {
    min-height: 62px;
    border-color: var(--member-border) !important;
    background: var(--member-surface);
}

body.member-shell.surface-finance:not(.trading-custom-shell) .wallet-market-panel [data-market-row]:hover {
    background: var(--member-surface-hover) !important;
}

body.member-shell.surface-finance:not(.trading-custom-shell) :is(.coin-tab, .wallet-pro-tab) {
    min-height: 34px;
    border-radius: var(--member-radius-sm) !important;
}

body.member-shell.surface-finance:not(.trading-custom-shell) :is(.coin-tab, .wallet-pro-tab):is(.active, .is-active, [aria-selected="true"]) {
    background: var(--member-primary) !important;
    color: var(--member-primary-foreground) !important;
}

body.member-shell.surface-finance:not(.trading-custom-shell) :is(.wallet-quick-item, .wallet-pro-action) {
    border-color: transparent !important;
    box-shadow: none !important;
}

body.member-shell.surface-finance:not(.trading-custom-shell) :is(.wallet-quick-item, .wallet-pro-action):hover {
    border-color: var(--member-border) !important;
    background: var(--member-surface-hover) !important;
    box-shadow: none !important;
}

/* Finance flows share clear step, summary and history surfaces. */
body.member-shell:not(.trading-custom-shell) :is(
    .transaction-deposit-page,
    .transaction-withdraw-page,
    .transaction-confirm-rebuild,
    .swap-pro-app
) :is(.member-card, form, .swap-panel) {
    border-color: var(--member-border) !important;
}

body.member-shell:not(.trading-custom-shell) .transaction-rebuild :is(.deposit-method, .withdraw-method, .plan-card) {
    border-color: var(--member-border) !important;
    border-radius: var(--member-radius) !important;
    box-shadow: none !important;
}

body.member-shell:not(.trading-custom-shell) .transaction-rebuild :is(.deposit-method, .withdraw-method, .plan-card):is(.active, .selected, [aria-checked="true"]) {
    border-color: var(--member-primary) !important;
    background: hsl(var(--primary) / .07) !important;
    box-shadow: inset 0 0 0 1px hsl(var(--primary) / .08) !important;
}

body.member-shell:not(.trading-custom-shell) .transaction-list-rebuild .member-card > a:hover,
body.member-shell:not(.trading-custom-shell) .transaction-rebuild a[href*="transactions/details"]:hover,
body.member-shell:not(.trading-custom-shell) .transaction-rebuild a[href*="transactions-details.php"]:hover {
    background: var(--member-surface-hover) !important;
}

/* Current transaction filters receive the semantic tabs behaviour before
 * markup migration adds .transaction-tabs/.transaction-tab explicitly. */
body.member-shell:not(.trading-custom-shell) .transaction-list-rebuild div:has(> a[href*="?filter="]) {
    min-width: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

body.member-shell:not(.trading-custom-shell) .transaction-list-rebuild div:has(> a[href*="?filter="])::-webkit-scrollbar {
    display: none;
}

body.member-shell:not(.trading-custom-shell) .transaction-list-rebuild div:has(> a[href*="?filter="]) > a {
    scroll-snap-align: start;
}

/* Account, security and KYC remain comfortably readable on wide screens. */
body.member-shell:not(.trading-custom-shell) :is(
    .profile-page-scroll,
    .profile-edit-scroll,
    .security-page-scroll,
    .settings-page-scroll,
    .kyc-page-scroll
) > :is(.member-page-header, .animate-panel-fade),
body.member-shell:not(.trading-custom-shell) :is(
    .profile-page-scroll,
    .profile-edit-scroll,
    .security-page-scroll,
    .settings-page-scroll,
    .kyc-page-scroll
) > form {
    width: min(100%, var(--member-readable-max));
    margin-inline: auto;
}

body.member-shell:not(.trading-custom-shell) :is(
    .profile-page-scroll,
    .profile-edit-scroll,
    .security-page-scroll,
    .settings-page-scroll,
    .kyc-page-scroll
) .member-card {
    border-color: var(--member-border) !important;
}

body.member-shell:not(.trading-custom-shell) .settings-page-scroll .member-card > :is(a, button, label, div) + :is(a, button, label, div),
body.member-shell:not(.trading-custom-shell) .security-page-scroll .member-card > :is(a, button, label, div) + :is(a, button, label, div) {
    border-top-color: var(--member-border) !important;
}

/* Support, plans and history use the same stable surface language. */
body.member-shell:not(.trading-custom-shell) :is(
    .support-page-scroll,
    .helpcenter-page-scroll,
    .referral-page-scroll,
    .plans-page-scroll,
    .investdetail-page-scroll,
    .stakedetail-page-scroll,
    .tradehistory-page-scroll,
    .tradedetail-page-scroll
) .member-card {
    border-color: var(--member-border) !important;
    background: var(--member-surface) !important;
}

/* Accent outlines are reserved for active/focus states, never every card. */
body.member-shell:not(.trading-custom-shell) :is(.member-card, .member-alert)[class*="border-primary"] {
    border-color: var(--member-border) !important;
}

body.member-shell:not(.trading-custom-shell) :is(.member-card, .member-alert):is(
    [class*="border-emerald"],
    [class*="border-green"],
    [class*="border-success"]
) {
    border-color: rgba(19, 138, 99, .30) !important;
}

body.member-shell:not(.trading-custom-shell) .member-alert:is(
    [class*="bg-emerald"],
    [class*="bg-green"],
    [class*="bg-success"]
) {
    background: var(--member-success-soft) !important;
    color: var(--member-success) !important;
}

body.member-shell:not(.trading-custom-shell) :is(.member-card, .member-alert):is(
    [class*="border-yellow"],
    [class*="border-amber"],
    [class*="border-warning"]
) {
    border-color: rgba(183, 121, 31, .30) !important;
}

body.member-shell:not(.trading-custom-shell) .member-alert:is(
    [class*="bg-yellow"],
    [class*="bg-amber"],
    [class*="bg-warning"]
) {
    background: var(--member-warning-soft) !important;
    color: var(--member-warning) !important;
}

body.member-shell:not(.trading-custom-shell) :is(.member-card, .member-alert):is(
    [class*="border-rose"],
    [class*="border-red"],
    [class*="border-destructive"]
) {
    border-color: rgba(201, 54, 79, .30) !important;
}

body.member-shell:not(.trading-custom-shell) .member-alert:is(
    [class*="bg-rose"],
    [class*="bg-red"],
    [class*="bg-destructive"]
) {
    background: var(--member-danger-soft) !important;
    color: var(--member-danger) !important;
}



/* inlined: assets/css/member/40-responsive.css */
/* Responsive member composition. Breakpoint contract: desktop starts at 1024px. */
@media (max-width: 1023px) {
    body.member-shell:not(.trading-custom-shell) {
        --member-shell-gutter: clamp(.875rem, 4vw, 1.25rem);
        --member-sidebar-current: 0px;
    }

    body.member-shell:not(.trading-custom-shell) :is(.member-main, .member-app-main) {
        margin-left: 0;
    }

    body.member-shell:not(.trading-custom-shell) :is(.member-sidebar, #sidebarMenu.member-sidebar) {
        width: min(86vw, 300px);
    }

    body.member-shell:not(.trading-custom-shell) :is(
        .ui-page,
        .ui-page-container,
        .member-page-shell,
        .member-page-container,
        #dash-scroll-root,
        [class$="-page-scroll"],
        [class*="-page-scroll "]
    ) {
        padding-bottom: calc(var(--member-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 16px) !important;
    }

    /* Migrated from the profile edit inline block. Keep this page as its own
     * touch-scrolling viewport until the legacy wrapper is removed. */
    body.member-shell:not(.trading-custom-shell) .profile-edit-scroll {
        max-height: calc(100dvh - 64px) !important;
        min-height: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        padding-bottom: calc(var(--member-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 16px) !important;
        -webkit-overflow-scrolling: touch;
    }

    body.member-shell:not(.trading-custom-shell) .ih-bottom-nav {
        border-color: var(--member-border) !important;
        background: rgba(255, 255, 255, .97) !important;
        box-shadow: 0 -8px 24px rgba(15, 23, 42, .08) !important;
        backdrop-filter: blur(16px) saturate(140%);
        -webkit-backdrop-filter: blur(16px) saturate(140%);
    }

    html.dark body.member-shell:not(.trading-custom-shell) .ih-bottom-nav {
        background: rgba(18, 22, 29, .97) !important;
        box-shadow: 0 -8px 26px rgba(0, 0, 0, .30) !important;
    }

    body.member-shell:not(.trading-custom-shell) .ih-bottom-nav-inner {
        height: var(--member-bottom-nav-height);
    }

    body.member-shell:not(.trading-custom-shell) .transaction-list-rebuild div:has(> a[href*="?filter="]) {
        margin-inline: -.25rem;
        padding-inline: .25rem 1.75rem;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 .4rem, #000 calc(100% - 1.5rem), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 .4rem, #000 calc(100% - 1.5rem), transparent 100%);
    }

    body.member-shell:not(.trading-custom-shell) :is(.ui-tabs, .member-tabs, .transaction-tabs) {
        padding-right: 1.75rem;
        scroll-padding-inline: .25rem 1.75rem;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 .4rem, #000 calc(100% - 1.5rem), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 .4rem, #000 calc(100% - 1.5rem), transparent 100%);
    }

    body.member-shell:not(.trading-custom-shell) > footer {
        display: none !important;
    }
}

@media (min-width: 768px) {
    body.member-shell:not(.trading-custom-shell) :is(.ui-page-header, .member-page-header) h1,
    body.member-shell:not(.trading-custom-shell) .ui-page-title {
        font-size: 1.75rem !important;
    }

    body.member-shell:not(.trading-custom-shell) :is(.ui-form-grid, .member-form-grid) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem 1.25rem;
    }

    body.member-shell:not(.trading-custom-shell) :is(.ui-form-grid, .member-form-grid) > .is-full,
    body.member-shell:not(.trading-custom-shell) :is(.ui-form-grid, .member-form-grid) > [data-grid-span="full"] {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    body.member-shell:not(.trading-custom-shell) .member-page-container {
        padding-inline: var(--member-shell-gutter) !important;
        padding-bottom: 3rem !important;
    }

    body.member-shell:not(.trading-custom-shell) .profile-edit-scroll {
        max-height: none !important;
        overflow: visible !important;
        padding-bottom: 4rem !important;
    }

    body.member-shell:not(.trading-custom-shell) main:not([data-investment-deal-screen]) {
        width: 100%;
        max-width: none;
    }

    body.member-shell:not(.trading-custom-shell) :is(.ui-page-header, .member-page-header) {
        padding-top: 1.5rem !important;
        padding-bottom: 1rem !important;
    }
}

@media (max-width: 479px) {
    body.member-shell:not(.trading-custom-shell) :is(.ui-page-header, .member-page-header) {
        align-items: flex-start;
    }

    body.member-shell:not(.trading-custom-shell) :is(.ui-page-header, .member-page-header) > :last-child:not(:first-child) {
        max-width: 100%;
    }

    body.member-shell:not(.trading-custom-shell) :is(.ui-page-header, .member-page-header) :is(.ui-status, .member-status, .member-alert) {
        flex-shrink: 1;
        white-space: normal;
    }

    body.member-shell:not(.trading-custom-shell) :is(.ui-empty, .ui-empty-state, .member-empty-state) {
        min-height: 168px;
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 339px) {
    body.member-shell:not(.trading-custom-shell) :is(.member-header-inner, .member-topbar-inner) {
        width: calc(100% - 1rem);
    }

    body.member-shell:not(.trading-custom-shell) :is(.ui-page-header, .member-page-header) h1,
    body.member-shell:not(.trading-custom-shell) .ui-page-title {
        overflow-wrap: anywhere;
    }

    body.member-shell:not(.trading-custom-shell) :is(.ui-page-header, .member-page-header) > * {
        flex-basis: 100%;
    }
}

@media print {
    body.member-shell:not(.trading-custom-shell) :is(#mainHeader, .member-topbar, .member-sidebar, .ih-bottom-nav, .member-app-footer, footer) {
        display: none !important;
    }

    body.member-shell:not(.trading-custom-shell) :is(.member-main, .member-app-main) {
        margin: 0 !important;
    }

    body.member-shell:not(.trading-custom-shell) :is(.ui-card, .member-card) {
        box-shadow: none !important;
        break-inside: avoid;
    }
}


