:root {
    --bs-primary: #d93b35;
    --bs-primary-rgb: 217, 59, 53;
    --bs-primary-text-emphasis: #992b27;
    --bs-primary-bg-subtle: #fbefee;
    --bs-primary-border-subtle: #efc5c2;
    --bs-link-color: #c9342f;
    --bs-link-hover-color: #992b27;
    --bs-body-color: #24272d;
    --bs-secondary-color: #727986;
    --bs-body-bg: #f5f6f8;
    --bs-border-color: #e7e9ed;

    --icl-red: #d93b35;
    --icl-red-dark: #ad2e29;
    --icl-red-soft: #fbefee;
    --icl-ink: #24272d;
    --icl-muted: #727986;
    --icl-border: #e7e9ed;
    --icl-canvas: #f5f6f8;
    --icl-card: #ffffff;
    --icl-success: #17875d;
    --icl-danger: #c63d3d;
    --icl-sidebar-width: 248px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--icl-canvas);
    color: var(--icl-ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.btn-primary {
    --bs-btn-bg: var(--icl-red);
    --bs-btn-border-color: var(--icl-red);
    --bs-btn-hover-bg: var(--icl-red-dark);
    --bs-btn-hover-border-color: var(--icl-red-dark);
    --bs-btn-active-bg: var(--icl-red-dark);
    --bs-btn-active-border-color: var(--icl-red-dark);
}

.portal-shell {
    background: var(--icl-canvas);
}

.portal-sidebar {
    width: var(--icl-sidebar-width) !important;
    flex: 0 0 var(--icl-sidebar-width);
    background: #fff;
    border-right: 1px solid var(--icl-border);
    z-index: 1040;
}

.portal-brand {
    min-height: 90px;
    justify-content: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f1f3;
}

.portal-logo {
    width: 158px;
    height: 66px;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
}

.portal-logo-sm {
    width: 82px;
    height: 34px;
    object-fit: contain;
}

.portal-nav {
    padding: 22px 14px;
}

.portal-nav-label {
    padding: 0 12px 8px;
    color: #9ca2ad;
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .095em;
    text-transform: uppercase;
}

.portal-nav-link {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin: 2px 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #626a77;
    font-size: .92rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease;
}

.portal-nav-link > i:first-child {
    width: 20px;
    font-size: 1.05rem;
    text-align: center;
}

.portal-nav-link:hover {
    background: #f6f7f9;
    color: var(--icl-ink);
}

.portal-nav-link.active {
    background: var(--icl-red-soft);
    color: var(--icl-red);
}

.portal-nav-button {
    cursor: pointer;
}

.portal-nav-button[aria-expanded="true"] .portal-nav-chevron {
    transform: rotate(180deg);
}

.portal-nav-chevron {
    transition: transform .16s ease;
}

.disabled-link {
    opacity: .72;
    cursor: default;
}

.disabled-link:hover {
    background: transparent;
    color: #626a77;
}

.portal-nav-badge {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f1f2f4;
    color: #8b919b;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.portal-subnav {
    margin: 4px 0 10px 34px;
    padding-left: 14px;
    border-left: 1px solid #e8eaee;
}

.portal-subnav-link {
    display: block;
    padding: 7px 10px;
    border-radius: 7px;
    color: #7b828e;
    font-size: .82rem;
    line-height: 1.3;
    text-decoration: none;
}

.portal-subnav-link:hover,
.portal-subnav-link.active {
    color: var(--icl-red);
    background: #fff7f6;
}

.portal-sidebar-footer {
    padding: 10px 14px 18px;
    border-top: 1px solid #f0f1f3;
}

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

.portal-header {
    position: sticky;
    top: 0;
    min-height: 72px;
    padding: 0 28px;
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid var(--icl-border);
    backdrop-filter: blur(10px);
    z-index: 1020;
}

.portal-menu-btn {
    padding: 0;
    border: 0;
    color: var(--icl-ink);
    font-size: 1.65rem;
}

.portal-user-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border: 0;
    border-radius: 10px;
    color: var(--icl-ink);
}

.portal-user-button:hover,
.portal-user-button:focus,
.portal-user-button.show {
    background: #f6f7f9;
}

.portal-user-button::after {
    display: none;
}

.portal-avatar {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--icl-red-soft);
    color: var(--icl-red);
    font-weight: 800;
}

.portal-dropdown {
    min-width: 220px;
    margin-top: 8px !important;
    border: 1px solid var(--icl-border);
    border-radius: 12px;
}

.portal-content {
    min-width: 0;
}

.dashboard-page {
    max-width: 1600px;
    padding: 34px 34px 0;
}

.dashboard-heading {
    margin-bottom: 24px;
}

.eyebrow {
    margin-bottom: 5px;
    color: #969da8;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.dashboard-title {
    margin: 0;
    color: #202329;
    font-size: clamp(1.65rem, 2.4vw, 2.2rem);
    font-weight: 750;
    letter-spacing: -.035em;
}

.dashboard-subtitle {
    margin-top: 5px;
    color: var(--icl-muted);
    font-size: .94rem;
}

.dashboard-as-of {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--icl-border);
    border-radius: 9px;
    background: #fff;
    color: #737a86;
    font-size: .82rem;
    white-space: nowrap;
}

.portal-card {
    border: 1px solid var(--icl-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(18, 25, 38, .02);
}

.portfolio-hero {
    position: relative;
}

.portfolio-hero::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at top right, rgba(217, 59, 53, .07), transparent 68%);
    pointer-events: none;
}

.metric-label,
.summary-label {
    color: #858c98;
    font-size: .78rem;
    font-weight: 600;
}

.portfolio-value {
    margin-top: 5px;
    color: #1f2228;
    font-size: clamp(2rem, 3.7vw, 3.15rem);
    font-weight: 760;
    letter-spacing: -.045em;
    line-height: 1.05;
}

.portfolio-return,
.fund-return {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
}

.portfolio-return span,
.fund-return span {
    color: #777e89;
}

.positive {
    color: var(--icl-success);
}

.negative {
    color: var(--icl-danger);
}

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

.summary-item {
    min-width: 0;
    padding: 4px 18px;
    border-left: 1px solid var(--icl-border);
}

.summary-item:first-child {
    border-left: 0;
}

.summary-item strong {
    display: block;
    margin-top: 5px;
    color: var(--icl-ink);
    font-size: 1rem;
    white-space: nowrap;
}

.dashboard-action {
    min-height: 48px;
    border-radius: 10px;
    font-size: .93rem;
    font-weight: 700;
}

.dashboard-section {
    margin-top: 30px;
}

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

.section-heading h2 {
    margin: 0;
    color: #2b2e34;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -.015em;
}

.section-heading p {
    margin: 4px 0 0;
    color: #868d98;
    font-size: .82rem;
}

.section-heading.compact h2 {
    font-size: 1rem;
}

.fund-summary-card {
    position: relative;
    display: block;
    min-height: 166px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--icl-border);
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.fund-summary-card:hover {
    transform: translateY(-2px);
    border-color: #d8dce2;
    color: inherit;
    box-shadow: 0 8px 24px rgba(31, 39, 51, .06);
}

.fund-summary-card.active {
    border-color: rgba(217, 59, 53, .48);
    box-shadow: inset 0 3px 0 var(--icl-red);
}

.fund-name {
    min-height: 38px;
    color: #2c3036;
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.35;
}

.selected-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--icl-red);
    box-shadow: 0 0 0 4px rgba(217, 59, 53, .09);
}

.fund-value {
    margin-top: 14px;
    color: #202329;
    font-size: 1.34rem;
    font-weight: 760;
    letter-spacing: -.025em;
}

.fund-meta {
    margin-top: 3px;
    color: #8a919c;
    font-size: .76rem;
}

.fund-return {
    margin-top: 12px;
    font-weight: 700;
}

.fund-detail-title {
    color: #25282e;
    font-size: 1.23rem;
    font-weight: 760;
}

.chart-range-switcher {
    padding: 3px;
    border: 1px solid var(--icl-border);
    border-radius: 9px;
    background: #f7f8fa;
}

.range-btn {
    min-width: 43px;
    padding: 5px 10px;
    border: 0 !important;
    border-radius: 7px !important;
    color: #747c87;
    font-size: .75rem;
    font-weight: 700;
}

.range-btn:hover {
    color: #3e434b;
}

.range-btn.active {
    background: #fff !important;
    color: var(--icl-red) !important;
    box-shadow: 0 1px 4px rgba(31, 39, 51, .08);
}

.fund-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.fund-kpi {
    padding: 13px 14px;
    border: 1px solid #eceef1;
    border-radius: 10px;
    background: #fafbfc;
}

.fund-kpi span {
    display: block;
    color: #8a919c;
    font-size: .7rem;
    font-weight: 600;
}

.fund-kpi strong {
    display: block;
    margin-top: 4px;
    color: #2a2d33;
    font-size: .92rem;
    white-space: nowrap;
}

.chart-shell {
    position: relative;
    height: 320px;
    padding: 8px 2px 0;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #7e8590;
    font-size: .74rem;
}

.legend-line {
    width: 18px;
    height: 3px;
    display: inline-block;
    margin-right: 7px;
    vertical-align: middle;
    border-radius: 99px;
}

.nav-line {
    background: var(--icl-red);
}

.cost-line {
    background: repeating-linear-gradient(90deg, #7b8494 0 6px, transparent 6px 10px);
}

.empty-chart,
.empty-list,
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #9198a2;
    text-align: center;
}

.empty-chart {
    height: 100%;
}

.empty-chart i,
.empty-list i,
.empty-state i {
    font-size: 1.45rem;
}

.empty-state {
    padding: 48px 24px;
}

.empty-state h3 {
    margin: 4px 0 0;
    color: #4e545d;
    font-size: 1rem;
}

.empty-state p {
    font-size: .84rem;
}

.fund-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--icl-red-soft);
    color: var(--icl-red);
}

.detail-list {
    border-top: 1px solid #eff0f2;
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #eff0f2;
}

.detail-row span {
    color: #808793;
    font-size: .79rem;
}

.detail-row strong {
    color: #30343a;
    font-size: .87rem;
    text-align: right;
}

.btn-soft {
    min-height: 43px;
    border: 1px solid #f0d1ce;
    border-radius: 9px;
    background: #fff8f7;
    color: var(--icl-red);
    font-size: .83rem;
    font-weight: 700;
}

.btn-soft:hover {
    border-color: #e5b4b0;
    background: #fff2f1;
    color: var(--icl-red-dark);
}

.activity-list,
.request-list {
    margin-top: 8px;
}

.activity-item,
.request-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 0;
    border-bottom: 1px solid #eff0f2;
}

.activity-item:last-child,
.request-item:last-child {
    border-bottom: 0;
}

.activity-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: .95rem;
}

.activity-icon.purchase {
    background: #eaf6f1;
    color: #177a58;
}

.activity-icon.withdrawal {
    background: #fff0ef;
    color: var(--icl-red);
}

.activity-icon.dividend {
    background: #eef3fa;
    color: #4c6789;
}

.activity-main {
    min-width: 0;
    flex: 1 1 auto;
}

.activity-main strong,
.activity-main span,
.activity-amount strong,
.activity-amount span {
    display: block;
}

.activity-main strong {
    color: #30343a;
    font-size: .84rem;
}

.activity-main span,
.activity-amount span {
    margin-top: 2px;
    color: #9299a3;
    font-size: .72rem;
}

.activity-amount {
    flex: 0 0 auto;
    text-align: right;
}

.activity-amount strong,
.request-amount {
    color: #30343a;
    font-size: .84rem;
}

.request-item {
    justify-content: space-between;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.status-pending {
    background: #fff5df;
    color: #9a6b0b;
}

.status-approved {
    background: #e9f6f0;
    color: #177557;
}

.status-declined {
    background: #fff0ef;
    color: #b63a35;
}

.portal-table thead th {
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom-width: 1px;
    color: #8a919b;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.portal-table tbody td {
    padding-top: 13px;
    padding-bottom: 13px;
    color: #545b65;
    font-size: .8rem;
    white-space: nowrap;
}

/* Login page compatibility */
.icl-login-bg {
    min-height: 100vh;
    background-position: center;
    background-size: cover;
}

.legend-swatch {
    display: inline-block;
    width: 20px;
    height: 4px;
}

@media (max-width: 1199.98px) {
    .portfolio-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .summary-item:first-child {
        padding-left: 0;
    }
}

@media (max-width: 991.98px) {
    .portal-sidebar {
        width: min(310px, 86vw) !important;
    }

    .portal-header {
        min-height: 66px;
        padding: 0 20px;
    }

    .dashboard-page {
        padding: 26px 22px 0;
    }

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

@media (max-width: 767.98px) {
    .dashboard-page {
        padding: 22px 15px 0;
    }

    .portfolio-value {
        font-size: 2.15rem;
    }

    .portfolio-summary-grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .summary-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 0;
        border-left: 0;
    }

    .summary-item strong {
        margin-top: 0;
    }

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

    .chart-shell {
        height: 330px;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 479.98px) {
    .fund-kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .fund-kpi {
        padding: 11px;
    }

    .fund-kpi strong {
        font-size: .82rem;
    }

    .chart-range-switcher {
        width: 100%;
    }

    .range-btn {
        flex: 1 1 auto;
        min-width: 0;
        padding-left: 5px;
        padding-right: 5px;
    }

    .chart-shell {
        height: 350px;
    }

    .chart-legend {
        gap: 12px;
        flex-wrap: wrap;
    }

    .activity-item {
        align-items: flex-start;
    }

    .activity-amount {
        max-width: 34%;
    }
}

/* --------------------------------------------------------------------------
   Portal shell / responsive navigation refinements
   -------------------------------------------------------------------------- */
.portal-sidebar {
    /* Bootstrap's backdrop is z-index 1040.  Keep the drawer above it so the
       backdrop darkens only the page, not the drawer or its click targets. */
    z-index: 1050;
}

.portal-sidebar .offcanvas-body {
    min-height: 0;
    overflow: hidden;
}

.portal-nav {
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #cfd3d9 transparent;
}

.portal-nav::-webkit-scrollbar {
    width: 6px;
}

.portal-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #cfd3d9;
}

@media (min-width: 992px) {
    .portal-sidebar {
        position: sticky !important;
        top: 0;
        align-self: flex-start;
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }

    .portal-sidebar .offcanvas-body {
        height: 100vh;
    }

    /* Keep the page and sidebar independent.  The sidebar becomes scrollable
       only while the pointer is over it and only if its contents need room. */
    .portal-nav {
        overflow-y: hidden;
        overscroll-behavior: contain;
    }

    .portal-sidebar:hover .portal-nav,
    .portal-sidebar:focus-within .portal-nav {
        overflow-y: auto;
    }
}

@media (max-width: 991.98px) {
    .portal-sidebar {
        z-index: 1050;
    }

    .portal-sidebar .offcanvas-body {
        height: 100%;
    }

    /* Touch devices do not have a meaningful hover state. */
    .portal-nav {
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .offcanvas-backdrop {
        z-index: 1040;
    }
}

/* Avoid the three secondary portfolio metrics colliding at laptop/desktop
   widths where the sidebar leaves the hero's middle column relatively narrow. */
@media (min-width: 1200px) and (max-width: 1599.98px) {
    .portfolio-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 0;
    }

    .summary-item:nth-child(3) {
        grid-column: 1 / -1;
        border-left: 0;
        border-top: 1px solid var(--icl-border);
        padding-top: 14px;
    }

    .summary-item strong {
        font-size: .92rem;
        white-space: normal;
    }
}

/* --------------------------------------------------------------------------
   Branded form focus states
   -------------------------------------------------------------------------- */
.form-control:focus,
.form-select:focus {
    border-color: rgba(var(--bs-primary-rgb), .65);
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .13);
}

.input-group:focus-within .input-group-text {
    border-color: rgba(var(--bs-primary-rgb), .65);
}

.input-group .form-control:focus {
    position: relative;
    z-index: 3;
}

.login-legal-link {
    color: #6c757d;
}

.login-legal-link:hover,
.login-legal-link:focus {
    color: #495057;
}

/* --------------------------------------------------------------------------
   Report workspace
   -------------------------------------------------------------------------- */
.report-page {
    max-width: 1600px;
    padding: 34px;
}

.report-filter-card,
.report-preview-card {
    overflow: hidden;
}

.report-title {
    color: #24272d;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 760;
    letter-spacing: -.025em;
}

.report-filter-form .form-control,
.report-filter-form .form-select {
    min-height: 44px;
}

.report-proceed-btn,
.report-download-btn {
    min-height: 44px;
    padding-left: 18px;
    padding-right: 18px;
    border-radius: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.report-derived-field[readonly] {
    background: #f8f9fb;
    color: #626a77;
    cursor: default;
}

.report-ready-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eaf6f1;
    color: #177a58;
    font-size: .76rem;
    font-weight: 750;
}

.report-preview-toolbar {
    padding: 16px 20px;
    border-bottom: 1px solid var(--icl-border);
    background: #fafbfc;
}

.report-preview-viewport {
    overflow: auto;
    padding: 24px;
    background: #edf0f3;
}

.report-document {
    width: min(100%, 1180px);
    min-width: 900px;
    min-height: 520px;
    margin: 0 auto;
    padding: 44px 48px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(30, 38, 50, .08);
    color: #111;
    font-family: "Times New Roman", Times, serif;
    font-size: 12px;
}

.report-document img {
    max-width: 100%;
    object-fit: contain;
}

.report-document table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
    --bs-table-bg: #fff;
    --bs-table-accent-bg: transparent;
    --bs-table-striped-bg: #fff;
    --bs-table-hover-bg: #fff;
    --bs-table-bg-type: transparent;
    --bs-table-bg-state: transparent;
}

/*
 * Browser preview only: Bootstrap 5 can paint table cells through its table
 * background variables/large inset shadow. Some shared report builders also
 * emit tables without the Bootstrap `.table` class, so target every cell
 * inside the report document rather than only `.table` descendants.
 */
.report-document table > :not(caption) > * > th,
.report-document table > :not(caption) > * > td {
    background-color: #fff !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Keep intentional coloured section/header rows emitted inline by reports. */
.report-document table tr[style*="background"] > th,
.report-document table tr[style*="background"] > td {
    background-color: inherit !important;
}

.report-document a {
    color: inherit;
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .report-page {
        padding: 26px 22px;
    }
}

@media (max-width: 767.98px) {
    .report-page {
        padding: 22px 15px;
    }

    .report-preview-viewport {
        padding: 12px;
    }

    .report-document {
        padding: 32px;
    }

    .report-proceed-btn,
    .report-download-btn {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   Money-first investment flow
   -------------------------------------------------------------------------- */
.invest-page {
    max-width: 1500px;
    padding: 34px;
}

.invest-heading {
    margin-bottom: 22px;
}

.invest-heading h1,
.invest-success-card h1 {
    margin: 4px 0 0;
    color: #25282e;
    font-size: clamp(1.65rem, 2.8vw, 2.25rem);
    font-weight: 780;
    letter-spacing: -.035em;
}

.invest-heading p,
.invest-success-card .success-lead {
    max-width: 720px;
    margin: 7px 0 0;
    color: var(--icl-muted);
    font-size: .94rem;
}

.invest-security-note {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border: 1px solid #dbece4;
    border-radius: 10px;
    background: #f5fbf8;
    color: #297257;
    font-size: .8rem;
    font-weight: 650;
}

.invest-security-note i {
    font-size: 1rem;
}

.portal-alert {
    border-radius: 12px;
    border-width: 1px;
}

.invest-stepper {
    display: flex;
    align-items: center;
    max-width: 760px;
    margin: 0 0 24px;
    padding: 14px 18px;
    border: 1px solid var(--icl-border);
    border-radius: 14px;
    background: #fff;
}

.invest-step {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #9aa0aa;
}

.invest-step.active {
    color: var(--icl-ink);
}

.invest-step-number {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border: 1px solid #d9dde3;
    border-radius: 50%;
    background: #fafbfc;
    color: #8a919c;
    font-size: .76rem;
    font-weight: 800;
}

.invest-step.active .invest-step-number {
    border-color: var(--icl-red);
    background: var(--icl-red-soft);
    color: var(--icl-red);
}

.invest-step strong,
.invest-step small {
    display: block;
    white-space: nowrap;
}

.invest-step strong {
    font-size: .78rem;
}

.invest-step small {
    margin-top: 1px;
    color: #9aa0aa;
    font-size: .68rem;
}

.invest-step-line {
    height: 1px;
    flex: 1 1 60px;
    min-width: 28px;
    margin: 0 14px;
    background: #e4e7eb;
}

.invest-step-line.active {
    background: rgba(var(--bs-primary-rgb), .6);
}

.invest-form-card,
.invest-payment-card,
.invest-summary-card,
.bank-details-card,
.invest-help-card,
.invest-success-card {
    overflow: hidden;
}

.invest-money-input .input-group-text {
    min-width: 52px;
    justify-content: center;
    border-right: 0;
    background: #f8f9fb;
    color: #4f5662;
    font-size: 1.15rem;
    font-weight: 750;
}

.invest-money-input .form-control {
    border-left: 0;
    font-size: 1.35rem;
    font-weight: 750;
    letter-spacing: -.02em;
}

.invest-money-input .form-control:focus {
    border-left: 0;
}

.quick-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.quick-amount {
    padding: 7px 11px;
    border: 1px solid #e1e4e9;
    border-radius: 999px;
    background: #fff;
    color: #606874;
    font-size: .78rem;
    font-weight: 700;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.quick-amount:hover {
    border-color: rgba(var(--bs-primary-rgb), .42);
    background: var(--icl-red-soft);
    color: var(--icl-red-dark);
}

.invest-continue-btn,
.invest-submit-btn {
    min-height: 50px;
    border-radius: 11px;
    font-size: .94rem;
    font-weight: 750;
}

.sticky-invest-summary {
    position: sticky;
    top: 104px;
}

.invest-summary-fund,
.bank-details-card h2,
.invest-help-card h2 {
    margin: 4px 0 0;
    color: #2a2e34;
    font-size: 1.06rem;
    font-weight: 760;
    line-height: 1.35;
}

.invest-summary-primary {
    margin: 22px 0 18px;
    padding: 18px;
    border-radius: 13px;
    background: linear-gradient(135deg, #fff7f6, #fbefee);
    border: 1px solid #f3d4d1;
}

.invest-summary-primary span,
.invest-summary-primary strong {
    display: block;
}

.invest-summary-primary span {
    color: #7b6462;
    font-size: .76rem;
    font-weight: 650;
}

.invest-summary-primary strong {
    margin-top: 5px;
    color: #9f2f2a;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -.04em;
}

.invest-summary-rows,
.bank-detail-list,
.success-summary {
    display: grid;
}

.invest-summary-rows > div,
.bank-detail-list > div,
.success-summary > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 0;
    border-bottom: 1px solid #f0f1f3;
}

.invest-summary-rows > div:last-child,
.bank-detail-list > div:last-child,
.success-summary > div:last-child {
    border-bottom: 0;
}

.invest-summary-rows span,
.bank-detail-list > div > span,
.success-summary span {
    color: #818894;
    font-size: .79rem;
}

.invest-summary-rows strong,
.bank-detail-list strong,
.success-summary strong {
    color: #34383f;
    font-size: .82rem;
    font-weight: 720;
    text-align: right;
}

.whole-unit-note,
.invest-confirmation {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 18px;
    padding: 13px 14px;
    border: 1px solid #e6e8ec;
    border-radius: 11px;
    background: #f8f9fb;
    color: #626a75;
    font-size: .78rem;
    line-height: 1.5;
}

.whole-unit-note i,
.invest-confirmation i {
    margin-top: 1px;
    color: var(--icl-red);
}

.whole-unit-note strong,
.whole-unit-note span {
    display: block;
}

.whole-unit-note strong {
    margin-bottom: 2px;
    color: #3d4249;
}

.bank-card-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    background: var(--icl-red-soft);
    color: var(--icl-red);
    font-size: 1rem;
}

.bank-copy-row > div {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.copy-bank-value {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #e1e4e9;
    border-radius: 7px;
    background: #fff;
    color: #707783;
}

.copy-bank-value:hover {
    border-color: rgba(var(--bs-primary-rgb), .35);
    color: var(--icl-red);
}

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

.payment-method-option {
    position: relative;
    cursor: pointer;
}

.payment-method-option > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-method-box {
    min-height: 80px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px;
    border: 1px solid #dfe2e7;
    border-radius: 12px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.payment-method-box > i {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f5f6f8;
    color: #777e89;
    font-size: 1rem;
}

.payment-method-box strong,
.payment-method-box small {
    display: block;
}

.payment-method-box strong {
    color: #3b3f46;
    font-size: .84rem;
}

.payment-method-box small {
    margin-top: 2px;
    color: #8b929c;
    font-size: .7rem;
}

.payment-method-option > input:checked + .payment-method-box {
    border-color: rgba(var(--bs-primary-rgb), .62);
    background: #fffafa;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .08);
}

.payment-method-option > input:checked + .payment-method-box > i {
    background: var(--icl-red-soft);
    color: var(--icl-red);
}

.proof-dropzone {
    min-height: 135px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px dashed #cdd2d9;
    border-radius: 12px;
    background: #fafbfc;
    color: #7d8490;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.proof-dropzone:hover,
.proof-dropzone.has-file {
    border-color: rgba(var(--bs-primary-rgb), .52);
    background: #fffafa;
}

.proof-dropzone > i {
    margin-bottom: 7px;
    color: var(--icl-red);
    font-size: 1.55rem;
}

.proof-title {
    color: #444a52;
    font-size: .83rem;
    font-weight: 720;
}

.proof-help,
.proof-selected {
    margin-top: 3px;
    font-size: .72rem;
}

.proof-selected {
    color: var(--icl-red-dark);
    font-weight: 650;
}

.invest-help-card {
    min-height: 420px;
}

.invest-help-visual {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 18px;
    background: var(--icl-red-soft);
    color: var(--icl-red);
    font-size: 1.6rem;
}

.invest-help-card > .card-body > p {
    margin: 12px 0 22px;
    color: var(--icl-muted);
    font-size: .86rem;
    line-height: 1.65;
}

.invest-help-list {
    display: grid;
    gap: 12px;
}

.invest-help-list > div {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #626a76;
    font-size: .8rem;
}

.invest-help-list i {
    color: var(--icl-success);
    font-size: 1rem;
}

.invest-success-page {
    display: grid;
    place-items: start center;
}

.invest-success-card {
    width: min(100%, 760px);
    margin-top: 34px;
}

.success-icon {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 50%;
    background: #eaf6f1;
    color: var(--icl-success);
    font-size: 2rem;
}

.invest-success-card .success-lead {
    margin-left: auto;
    margin-right: auto;
}

.success-summary {
    max-width: 560px;
    margin-top: 28px;
    padding: 4px 20px;
    border: 1px solid var(--icl-border);
    border-radius: 13px;
    background: #fafbfc;
}

.success-note {
    max-width: 560px;
}

@media (max-width: 1199.98px) {
    .sticky-invest-summary {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .invest-page {
        padding: 22px 15px;
    }

    .invest-stepper {
        align-items: flex-start;
        overflow-x: auto;
        padding: 12px;
    }

    .invest-step small {
        display: none;
    }

    .invest-step-line {
        min-width: 22px;
        margin-top: 15px;
    }

    .payment-method-grid {
        grid-template-columns: 1fr;
    }

    .invest-summary-rows > div,
    .bank-detail-list > div,
    .success-summary > div {
        gap: 14px;
    }
}

@media (max-width: 575.98px) {
    .invest-step strong {
        font-size: .72rem;
    }

    .invest-step-number {
        width: 26px;
        height: 26px;
        flex-basis: 26px;
    }

    .invest-step-line {
        margin: 13px 8px 0;
    }

    .quick-amount {
        flex: 1 1 calc(50% - 8px);
    }

    .invest-summary-primary strong {
        font-size: 1.65rem;
    }
}

/* --------------------------------------------------------------------------
   Money-first withdrawal flow
   -------------------------------------------------------------------------- */
.withdraw-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.withdraw-mode-option {
    position: relative;
    cursor: pointer;
}

.withdraw-mode-option > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.withdraw-mode-box {
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid #dfe2e7;
    border-radius: 12px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.withdraw-mode-box > i {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f5f6f8;
    color: #777e89;
    font-size: 1rem;
}

.withdraw-mode-box strong,
.withdraw-mode-box small {
    display: block;
}

.withdraw-mode-box strong {
    color: #3b3f46;
    font-size: .82rem;
}

.withdraw-mode-box small {
    margin-top: 2px;
    color: #8b929c;
    font-size: .68rem;
}

.withdraw-mode-option > input:checked + .withdraw-mode-box {
    border-color: rgba(var(--bs-primary-rgb), .62);
    background: #fffafa;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .08);
}

.withdraw-mode-option > input:checked + .withdraw-mode-box > i {
    background: var(--icl-red-soft);
    color: var(--icl-red);
}

.withdraw-input-panel {
    margin-top: 2px;
}

.withdraw-all-note {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 15px;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    background: #f8f9fb;
    color: #626a75;
    font-size: .8rem;
    line-height: 1.55;
}

.withdraw-all-note i {
    color: var(--icl-red);
    margin-top: 1px;
}

.withdraw-summary-primary {
    background: linear-gradient(135deg, #fff8f6, #f9eeee);
}

@media (max-width: 767.98px) {
    .withdraw-mode-grid {
        grid-template-columns: 1fr;
    }

    .withdraw-mode-box {
        min-height: 72px;
    }
}

/* --------------------------------------------------------------------------
   My Account + historical simulator
   -------------------------------------------------------------------------- */
.account-page,
.simulator-page {
    padding: 34px 34px 48px;
    max-width: 1680px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--icl-border);
    border-radius: 13px;
    overflow: hidden;
}

.profile-grid > div {
    min-width: 0;
    padding: 15px 17px;
    border-bottom: 1px solid var(--icl-border);
    background: #fff;
}

.profile-grid > div:nth-child(odd):not(.profile-wide) {
    border-right: 1px solid var(--icl-border);
}

.profile-grid > div:last-child,
.profile-grid > div:nth-last-child(2):nth-child(odd) {
    border-bottom: 0;
}

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

.profile-grid span,
.account-metrics span,
.sim-result-card > span {
    display: block;
    margin-bottom: 5px;
    color: var(--icl-muted);
    font-size: .72rem;
    font-weight: 650;
    letter-spacing: .02em;
}

.profile-grid strong {
    display: block;
    color: var(--icl-ink);
    font-size: .88rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

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

.stack-item {
    padding: 14px;
    border: 1px solid var(--icl-border);
    border-radius: 11px;
    background: #fafbfc;
}

.empty-inline {
    padding: 18px 4px;
    color: var(--icl-muted);
    font-size: .82rem;
}

.account-note,
.sim-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid #f0d7d4;
    border-radius: 13px;
    background: #fff9f8;
}

.account-note > i,
.sim-disclaimer > i {
    flex: 0 0 auto;
    color: var(--icl-red);
    font-size: 1.05rem;
}

.account-note p,
.sim-disclaimer {
    color: #6d737e;
    font-size: .78rem;
    line-height: 1.55;
}

.account-fund-card {
    overflow: hidden;
}

.account-chip {
    white-space: nowrap;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--icl-red-soft);
    color: var(--icl-red-dark);
    font-size: .69rem;
    font-weight: 700;
}

.account-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--icl-border);
    border-radius: 13px;
    overflow: hidden;
}

.account-metrics > div {
    min-width: 0;
    padding: 15px;
    border-right: 1px solid var(--icl-border);
    background: #fafbfc;
}

.account-metrics > div:last-child {
    border-right: 0;
}

.account-metrics strong {
    display: block;
    white-space: nowrap;
    font-size: .92rem;
}

.compact-list .detail-row {
    padding-top: 10px;
    padding-bottom: 10px;
}

.security-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 15px;
    background: var(--icl-red-soft);
    color: var(--icl-red);
    font-size: 1.35rem;
}

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

.sim-result-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--icl-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 16px rgba(28, 35, 45, .035);
}

.sim-result-card strong {
    display: block;
    margin: 2px 0 4px;
    font-size: 1.35rem;
    letter-spacing: -.025em;
}

.sim-result-card small {
    color: var(--icl-muted);
    font-size: .72rem;
}

.sim-result-card.positive strong { color: var(--icl-success); }
.sim-result-card.negative strong { color: var(--icl-danger); }

.sim-range {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--icl-border);
    border-radius: 10px;
    background: #f7f8fa;
}

.sim-range button {
    min-width: 42px;
    padding: 6px 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #707784;
    font-size: .72rem;
    font-weight: 700;
}

.sim-range button.active {
    background: #fff;
    color: var(--icl-red);
    box-shadow: 0 1px 5px rgba(30, 34, 42, .08);
}

.sim-chart-wrap {
    position: relative;
    height: 470px;
    min-height: 470px;
}

.sim-summary-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--icl-red);
    font-size: .83rem;
    font-weight: 750;
    text-align: right;
}

.sim-summary-action:hover,
.sim-summary-action:focus {
    color: var(--icl-red-dark);
}

.sim-summary-action i {
    font-size: .72rem;
}

.sim-lumpsum-list {
    display: grid;
    gap: 10px;
}

.sim-lumpsum-row {
    display: grid;
    grid-template-columns: 34px minmax(170px, .85fr) minmax(220px, 1.15fr) 42px;
    align-items: end;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--icl-border);
    border-radius: 12px;
    background: #fafbfc;
}

.sim-lumpsum-number {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    align-self: center;
    border-radius: 50%;
    background: var(--icl-red-soft);
    color: var(--icl-red);
    font-size: .75rem;
    font-weight: 800;
}

.sim-lumpsum-remove {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--icl-border);
    color: #7b828c;
}

.sim-lumpsum-remove:hover:not(:disabled) {
    border-color: #efc5c2;
    background: var(--icl-red-soft);
    color: var(--icl-red);
}

.portal-modal {
    border: 1px solid var(--icl-border);
    border-radius: 16px;
    overflow: hidden;
}

.password-requirements {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.password-requirements li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #5f6671;
    font-size: .82rem;
}

.password-requirements i {
    margin-top: 1px;
    color: var(--icl-success);
}

.portal-table th {
    white-space: nowrap;
    color: #767d88;
    font-size: .71rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.portal-table td {
    color: #454b55;
    font-size: .8rem;
}

@media (max-width: 1199.98px) {
    .sim-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-metrics > div:nth-child(2) { border-right: 0; }
    .account-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--icl-border); }
}

@media (max-width: 767.98px) {
    .account-page,
    .simulator-page { padding: 22px 15px 38px; }
    .profile-grid { grid-template-columns: 1fr; }
    .profile-grid > div,
    .profile-grid > div:nth-child(odd):not(.profile-wide) { border-right: 0; }
    .profile-grid > div:not(:last-child) { border-bottom: 1px solid var(--icl-border); }
    .profile-grid .profile-wide { grid-column: auto; }
    .sim-result-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .sim-result-card { padding: 16px; }
    .sim-result-card strong { font-size: 1.05rem; }
    .sim-chart-wrap { height: 420px; min-height: 420px; margin-left: -8px; margin-right: -8px; }
    .sim-lumpsum-row { grid-template-columns: 30px 1fr 1.15fr 42px; gap: 9px; }
}

@media (max-width: 480px) {
    .sim-result-grid { grid-template-columns: 1fr; }
    .account-metrics { grid-template-columns: 1fr; }
    .account-metrics > div { border-right: 0 !important; border-bottom: 1px solid var(--icl-border) !important; }
    .account-metrics > div:last-child { border-bottom: 0 !important; }
    .sim-range button { min-width: 36px; padding-left: 7px; padding-right: 7px; }
    .sim-chart-wrap { height: 390px; min-height: 390px; }
    .sim-lumpsum-row { grid-template-columns: 30px 1fr 42px; }
    .sim-lumpsum-row > div:nth-child(3) { grid-column: 2 / 3; }
    .sim-lumpsum-remove { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
}
