/* Orbit dark theme is loaded after page-level styles so mobile workspace rules
   cannot accidentally restore light backgrounds or dark-on-dark text. */
html[data-theme="dark"] body.member-portal-app,
html[data-theme="dark"] body.member-portal-app .content,
html[data-theme="dark"] body.member-portal-app .content > .p-3,
html[data-theme="dark"] body.member-portal-app .app-shell,
html[data-theme="dark"] body.member-portal-app .main-content,
html[data-theme="dark"] body.member-portal-app .member-portal-panel,
html[data-theme="dark"] body.member-portal-app .member-portal-sections,
html[data-theme="dark"] body.member-portal-app .member-dashboard-section,
html[data-theme="dark"] body.member-portal-app [data-member-home-summary],
html[data-theme="dark"] body.member-portal-app #member-profile,
html[data-theme="dark"] body.member-portal-app .member-profile-workspace {
    color: #e8eef7 !important;
    background: #07111f !important;
}

html[data-theme="dark"] body.member-portal-app .member-mobile-welcome h2,
html[data-theme="dark"] body.member-portal-app .member-home-section-heading h3,
html[data-theme="dark"] body.member-portal-app .member-section-title h1,
html[data-theme="dark"] body.member-portal-app .member-section-title h2,
html[data-theme="dark"] body.member-portal-app .member-section-title h3,
html[data-theme="dark"] body.member-portal-app .member-profile-page-title,
html[data-theme="dark"] body.member-portal-app .member-profile-hero h2,
html[data-theme="dark"] body.member-portal-app .member-profile-hero h3,
html[data-theme="dark"] body.member-portal-app .member-profile-hero strong {
    color: #f8fafc !important;
}

html[data-theme="dark"] body.member-portal-app .member-mobile-welcome p,
html[data-theme="dark"] body.member-portal-app .member-profile-hero-email,
html[data-theme="dark"] body.member-portal-app .member-profile-menu-label,
html[data-theme="dark"] body.member-portal-app .member-profile-collapse > summary small,
html[data-theme="dark"] body.member-portal-app .member-profile-security-link small,
html[data-theme="dark"] body.member-portal-app .text-muted {
    color: #9fb0c4 !important;
}

html[data-theme="dark"] body.member-portal-app .member-mobile-welcome-actions a,
html[data-theme="dark"] body.member-portal-app .member-mobile-welcome-actions button,
html[data-theme="dark"] body.member-portal-app .member-home-quick-actions,
html[data-theme="dark"] body.member-portal-app .member-service-grid,
html[data-theme="dark"] body.member-portal-app .member-home-metric,
html[data-theme="dark"] body.member-portal-app .member-profile-hero,
html[data-theme="dark"] body.member-portal-app .member-profile-form-section,
html[data-theme="dark"] body.member-portal-app .member-profile-kyc-panel,
html[data-theme="dark"] body.member-portal-app .member-profile-collapse,
html[data-theme="dark"] body.member-portal-app .member-profile-security-link,
html[data-theme="dark"] body.member-portal-app .member-section-card,
html[data-theme="dark"] body.member-portal-app .member-savings-workspace,
html[data-theme="dark"] body.member-portal-app .member-savings-plan-card,
html[data-theme="dark"] body.member-portal-app .member-loan-workspace,
html[data-theme="dark"] body.member-portal-app .card,
html[data-theme="dark"] body.member-portal-app .modal-content,
html[data-theme="dark"] body.member-portal-app .offcanvas,
html[data-theme="dark"] body.member-portal-app .dropdown-menu {
    color: #e8eef7 !important;
    border-color: #26364a !important;
    background: #101d2d !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.member-portal-app .member-home-quick-actions a,
html[data-theme="dark"] body.member-portal-app .member-home-quick-actions button,
html[data-theme="dark"] body.member-portal-app .member-service-grid a,
html[data-theme="dark"] body.member-portal-app .member-service-grid button,
html[data-theme="dark"] body.member-portal-app .member-profile-quick-links > a,
html[data-theme="dark"] body.member-portal-app .member-profile-setting-button,
html[data-theme="dark"] body.member-portal-app .member-profile-collapse > summary,
html[data-theme="dark"] body.member-portal-app .member-profile-collapse > summary > span > i,
html[data-theme="dark"] body.member-portal-app .member-profile-security-link {
    color: #e8eef7 !important;
    border-color: #26364a !important;
}

html[data-theme="dark"] body.member-portal-app .member-home-quick-actions > * {
    border-right-color: #26364a !important;
}

html[data-theme="dark"] body.member-portal-app .member-profile-collapse[open] > summary,
html[data-theme="dark"] body.member-portal-app .member-profile-collapse > summary:hover,
html[data-theme="dark"] body.member-portal-app .member-profile-security-link:hover,
html[data-theme="dark"] body.member-portal-app .member-profile-quick-links > a:hover {
    color: #f8fafc !important;
    border-color: #36506b !important;
    background: #15263a !important;
}

html[data-theme="dark"] body.member-portal-app .member-profile-setting-button:disabled {
    color: #aab8c9 !important;
    opacity: 1 !important;
}

html[data-theme="dark"] body.member-portal-app .member-profile-setting-button:disabled > i,
html[data-theme="dark"] body.member-portal-app .member-profile-setting-button:disabled strong {
    color: #aab8c9 !important;
}

html[data-theme="dark"] body.member-portal-app .member-profile-collapse > summary > i:last-child,
html[data-theme="dark"] body.member-portal-app .member-profile-quick-links > a > i:last-child,
html[data-theme="dark"] body.member-portal-app .member-home-metric .card-body > i:last-child {
    color: #8fa2b8 !important;
}

html[data-theme="dark"] body.member-portal-app .member-home-metric .h4,
html[data-theme="dark"] body.member-portal-app .member-home-metric strong,
html[data-theme="dark"] body.member-portal-app .member-home-metric span {
    color: #e8eef7 !important;
}

html[data-theme="dark"] body.member-portal-app .form-control,
html[data-theme="dark"] body.member-portal-app .form-select,
html[data-theme="dark"] body.member-portal-app .input-group-text,
html[data-theme="dark"] body.member-portal-app .list-group-item,
html[data-theme="dark"] body.member-portal-app .table {
    color: #e8eef7 !important;
    border-color: #314158 !important;
    background-color: #0c1928 !important;
}

html[data-theme="dark"] body.member-portal-app .table {
    --bs-table-bg: #0c1928;
    --bs-table-color: #e8eef7;
    --bs-table-border-color: #314158;
    --bs-table-striped-bg: #132236;
    --bs-table-hover-bg: #192b42;
}

html[data-theme="dark"] body.member-portal-app .bg-white,
html[data-theme="dark"] body.member-portal-app .bg-light {
    color: #e8eef7 !important;
    background-color: #101d2d !important;
}

html[data-theme="dark"] body.member-portal-app .mobile-bottom-nav {
    color: #b8c5d4 !important;
    border-top-color: #26364a !important;
    background: #0b1726 !important;
}

html[data-theme="dark"] body.member-portal-app .mobile-bottom-nav a,
html[data-theme="dark"] body.member-portal-app .mobile-bottom-nav button {
    color: #b8c5d4 !important;
}

html[data-theme="dark"] body.member-portal-app .mobile-bottom-nav .active {
    color: var(--tenant-primary, #2dd4bf) !important;
}

html[data-theme="dark"] body.member-portal-app .border,
html[data-theme="dark"] body.member-portal-app .border-top,
html[data-theme="dark"] body.member-portal-app .border-bottom,
html[data-theme="dark"] body.member-portal-app hr {
    border-color: #314158 !important;
}

html[data-theme="dark"] body.member-portal-app input::placeholder,
html[data-theme="dark"] body.member-portal-app textarea::placeholder {
    color: #74869c !important;
}

html[data-theme="dark"] body.member-portal-app .member-investment-risk-confirmation {
    color: #e8eef7 !important;
    border-color: #9a6700 !important;
    background: #2a210d !important;
}

html[data-theme="dark"] body.member-portal-app .member-investment-risk-confirmation-head span {
    color: #dbc58b !important;
}

html[data-theme="dark"] body.member-portal-app .member-investment-risk-check {
    border-top-color: rgba(245, 158, 11, .3) !important;
}
