:root {
    --bs-success: #007c42;
    --bs-success-rgb: 0, 124, 66;
    --bs-border-color: #e5e8e4;
    --bs-body-color: #1d1f1e;
    --bs-body-bg: #eef1ed;
    --bg: #eef1ed;
    --surface: #ffffff;
    --primary: #007c42;
    --primary-dark: #004b2f;
    --primary-soft: #eaf7f0;
    --success: #2dbe7e;
    --warning: #f4b740;
    --danger: #e54b3f;
    --text: #1d1f1e;
    --muted: #6f7772;
    --subtle: #9aa19d;
    --border: #e5e8e4;
    --shadow: 0 18px 45px rgba(20, 40, 30, 0.09);
    --radius-app: 24px;
    --radius-card: 14px;
    --radius-control: 999px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.btn-success {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: #006b39;
    --bs-btn-hover-border-color: #006b39;
    --bs-btn-active-bg: #005c31;
    --bs-btn-active-border-color: #005c31;
}

.btn-outline-success {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--border);
    --bs-btn-hover-bg: var(--primary-soft);
    --bs-btn-hover-border-color: #cfe7d9;
    --bs-btn-hover-color: var(--primary);
    --bs-btn-active-bg: var(--primary-soft);
    --bs-btn-active-border-color: #cfe7d9;
    --bs-btn-active-color: var(--primary);
}

.app-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    height: 100vh;
    min-height: 620px;
    max-width: none;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    box-shadow: none;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: 100%;
    min-height: 0;
    padding: 22px 16px;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: rgba(250, 251, 249, 0.92);
}

.sidebar-backdrop,
.sidebar-mobile-head,
.menu-btn,
.mobile-profile-menu {
    display: none;
}

.brand,
.nav-item,
.nav-main,
.topbar,
.topbar-actions,
.topbar-title,
.profile-chip,
.panel-header,
.legend-row,
.activity-list div {
    display: flex;
    align-items: center;
}

.brand {
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
}

.nav-list {
    display: grid;
    gap: 5px;
}

.nav-item {
    position: relative;
    width: 100%;
    gap: 10px;
    min-height: 38px;
    padding: 0 11px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #8b948f;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.nav-item svg,
.sub-nav svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.nav-item.active,
.nav-item:hover,
.sub-nav a.active,
.sub-nav a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.nav-item.active::before {
    position: absolute;
    left: -16px;
    width: 4px;
    height: 22px;
    border-radius: 0 var(--radius-control) var(--radius-control) 0;
    background: var(--primary);
    content: "";
}

.nav-toggle {
    justify-content: space-between;
}

.nav-main {
    gap: 10px;
}

.chevron {
    width: 15px;
    height: 15px;
    transition: transform 0.18s ease;
}

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

.sub-nav {
    display: grid;
    gap: 3px;
    margin: 4px 0 6px 36px;
}

.sub-nav[hidden] {
    display: none;
}

.sub-nav a {
    padding: 8px 10px;
    border-radius: 9px;
    color: #8b948f;
    font-size: 12px;
    font-weight: 600;
}

.sidebar-card {
    margin-top: auto;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(150deg, var(--primary-dark), #007c42);
    color: #fff;
}

.sidebar-card p,
.sidebar-card span,
.eyebrow,
.panel p,
.metric-card small,
.profile-chip small {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.sidebar-card p,
.sidebar-card span {
    color: rgba(255, 255, 255, 0.72);
}

.sidebar-card strong {
    display: block;
    margin: 6px 0;
    font-size: 18px;
}

.workspace {
    min-width: 0;
    min-height: 0;
    padding: 22px;
    overflow-y: auto;
    background: #f7f8f6;
}

.topbar {
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.topbar-title {
    gap: 12px;
}

.eyebrow {
    margin-bottom: 3px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
}

h1,
h2,
h3 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    font-size: 23px;
    line-height: 1.1;
}

h2 {
    font-size: 15px;
}

h3 {
    font-size: 17px;
}

.topbar-actions {
    justify-content: flex-end;
    gap: 10px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(310px, 32vw);
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--surface);
}

.search-box svg {
    width: 16px;
    color: var(--subtle);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 12px;
}

.icon-btn,
.primary-btn,
.soft-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    font-weight: 700;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--muted);
}

.icon-btn:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.logout-btn:hover {
    color: var(--danger);
    background: #fff0ee;
}

.icon-btn svg {
    width: 17px;
    height: 17px;
}

.profile-chip {
    gap: 9px;
    min-height: 42px;
    padding: 5px 11px 5px 5px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--surface);
}

.profile-chip strong {
    display: block;
    font-size: 12px;
}

.profile-chip small {
    display: block;
    font-size: 10px;
}

.mobile-profile-menu {
    position: relative;
}

.profile-menu-btn {
    border: 0;
    cursor: pointer;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 30;
    min-width: 164px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 16px 36px rgba(20, 40, 30, 0.13);
}

.profile-dropdown a,
.profile-dropdown button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.profile-dropdown svg {
    width: 16px;
    height: 16px;
}

.avatar {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 50%;
    background: #ffe1c7;
    color: #853c12;
    font-size: 11px;
    font-weight: 800;
}

.avatar.large {
    width: 82px;
    height: 82px;
    margin-bottom: 14px;
    font-size: 23px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.metric-card,
.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface);
}

.metric-card {
    min-height: 128px;
    padding: 18px;
}

.metric-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.metric-card strong {
    display: block;
    margin: 14px 0 7px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1;
}

.metric-card.featured {
    border-color: transparent;
    background: var(--primary);
    color: #fff;
}

.metric-card.featured span,
.metric-card.featured small {
    color: rgba(255, 255, 255, 0.78);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr) minmax(260px, 0.8fr);
    gap: 14px;
}

.panel {
    padding: 18px;
}

.portfolio-panel {
    grid-row: span 2;
}

.fund-summary {
    grid-column: 1 / -1;
}

.panel-header {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.primary-btn,
.soft-btn {
    min-height: 34px;
    padding: 0 14px;
    border-radius: var(--radius-control);
    font-size: 12px;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
}

.primary-btn:hover {
    background: #006b39;
}

.soft-btn {
    border: 1px solid var(--border);
    background: #f8faf7;
    color: var(--primary);
}

.portfolio-list {
    display: grid;
    gap: 18px;
}

.portfolio-list div {
    display: grid;
    gap: 8px;
}

.portfolio-list span,
.portfolio-list strong {
    font-size: 13px;
}

progress {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius-control);
    background: #edf1ee;
}

progress::-webkit-progress-bar {
    background: #edf1ee;
}

progress::-webkit-progress-value {
    border-radius: var(--radius-control);
    background: var(--primary);
}

.bar-chart {
    display: flex;
    align-items: end;
    gap: 13px;
    height: 180px;
    padding: 8px 6px 0;
}

.bar-chart span {
    flex: 1;
    height: var(--h);
    min-width: 18px;
    border-radius: var(--radius-control);
    background: var(--primary);
}

.bar-chart .muted-bar {
    background: repeating-linear-gradient(135deg, #d7ddd8 0 3px, transparent 3px 7px);
}

.details-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.profile-card-head {
    display: grid;
    place-items: center;
    margin: 6px 0 22px;
}

.profile-photo {
    width: 118px;
    height: 118px;
    flex: 0 0 auto;
    border: 8px solid var(--primary-soft);
    background: var(--primary);
    color: #fff;
    font-size: 34px;
    box-shadow: 0 12px 28px rgba(0, 124, 66, 0.18);
}

.details-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.details-list dt {
    color: var(--muted);
    font-size: 12px;
}

.details-list dd {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
}

.success-text {
    color: var(--success);
}

.wallet-panel,
.rank-panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wallet-panel>div,
.rank-panel>div {
    min-width: 0;
    flex: 1;
}

.wallet-panel {
    border-color: #cfe7d9;
    background: linear-gradient(180deg, #f1fbf5 0%, #ffffff 100%);
}

.wallet-panel span,
.wallet-panel small,
.rank-panel span,
.rank-panel small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.wallet-panel strong,
.rank-panel strong {
    display: block;
    margin: 8px 0 7px;
    line-height: 1;
}

.wallet-panel strong {
    color: var(--primary);
    font-size: 34px;
}

.rank-panel {
    border-color: #e7e8d8;
    background: linear-gradient(180deg, #fffdf2 0%, #ffffff 100%);
}

.rank-panel strong {
    color: #9a6a00;
    font-size: 28px;
}

.wallet-panel svg,
.rank-panel svg {
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: 50%;
}

.wallet-panel svg {
    background: var(--primary-soft);
    color: var(--primary);
}

.rank-panel svg {
    background: #fff7df;
    color: #b67b00;
}

.summary-ring {
    display: grid;
    width: 220px;
    height: 220px;
    margin: 0;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 0 71%, #dbe5df 71% 100%);
}

.summary-ring div {
    display: grid;
    width: 142px;
    height: 142px;
    place-items: center;
    align-content: center;
    border-radius: 50%;
    background: #fff;
}

.summary-ring strong {
    font-size: 36px;
}

.summary-ring span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.fund-summary-layout {
    display: flex;
    align-items: center;
    gap: 28px;
}

.fund-breakdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
}

.fund-breakdown div {
    min-height: 132px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8faf7;
}

.fund-breakdown span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.fund-breakdown b {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.fund-breakdown div:nth-child(2) b {
    background: var(--success);
}

.fund-breakdown div:nth-child(3) b {
    background: var(--warning);
}

.fund-breakdown strong {
    display: block;
    margin: 16px 0 7px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1;
}

.fund-breakdown small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: var(--radius-control);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.status-pill.warning {
    background: #fff7df;
    color: #a46e00;
}

.table-wrap {
    overflow-x: auto;
}

.table-wrap .table {
    --bs-table-bg: #ffffff;
    --bs-table-striped-bg: #ffffff;
    --bs-table-hover-bg: #f8faf7;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    margin-bottom: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.table> :not(caption)>*>* {
    background-color: #ffffff;
    box-shadow: none;
}

.table thead th {
    background-color: #ffffff;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 13px;
}

th {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

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

.activity-list div {
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    background: #f8faf7;
}

.activity-list svg {
    width: 18px;
    color: var(--primary);
}

.activity-list span {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
}

.activity-list time {
    min-width: 172px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.activity-list strong {
    min-width: 90px;
    font-size: 13px;
    text-align: right;
}

.form-panel {
    max-width: 680px;
}

.purchase-page-grid {
    display: grid;
    gap: 16px;
    width: 100%;
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: stretch;
}

.checkout-panel,
.order-summary {
    min-height: 420px;
}

.fund-balance {
    display: grid;
    gap: 7px;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
}

.fund-balance span,
.fund-balance small {
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
    font-weight: 700;
}

.fund-balance strong {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1;
}

.purchase-instruction {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #cfe7d9;
    border-radius: 14px;
    background: var(--primary-soft);
}

.purchase-instruction strong {
    display: block;
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 13px;
}

.purchase-instruction p {
    line-height: 1.55;
}

.checkout-form {
    width: 100%;
}

.order-summary {
    display: flex;
    flex-direction: column;
}

.summary-line,
.summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.summary-line {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.summary-line strong {
    color: var(--text);
}

.summary-total {
    margin: 20px 0;
    padding: 18px;
    border-radius: 14px;
    background: var(--primary-soft);
}

.summary-total span {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.summary-total strong {
    color: var(--primary);
    font-size: 30px;
}

.checkout-btn {
    width: 100%;
    min-height: 46px;
    margin-top: auto;
}

.checkout-note {
    margin-top: 12px;
    text-align: center;
}

.trading-note {
    width: 100%;
    margin-top: 0;
}

.trading-note h2 {
    margin-bottom: 6px;
    font-size: 20px;
}

.trading-note h3 {
    margin: 16px 0 8px;
    font-size: 15px;
}

.trading-note p,
.trading-note li {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.trading-note ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 18px;
}

form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fbfcfb;
    color: var(--text);
    padding: 0 12px;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

input[readonly] {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 800;
}

.profile-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
}

.profile-card {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 240px;
    border-radius: 14px;
    background: var(--primary-soft);
    text-align: center;
}

.profile-upload {
    position: relative;
    display: grid;
    width: 118px;
    height: 118px;
    margin-bottom: 16px;
    place-items: center;
    cursor: pointer;
}

.profile-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.profile-upload-preview {
    display: grid;
    width: 118px;
    height: 118px;
    place-items: center;
    overflow: hidden;
    border: 8px solid #d9f0e4;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
}

.profile-upload-preview svg {
    width: 44px;
    height: 44px;
}

.profile-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-upload-action {
    position: absolute;
    right: 4px;
    bottom: 4px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 3px solid var(--primary-soft);
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
}

.profile-upload-action svg {
    width: 16px;
    height: 16px;
}

.profile-card p {
    margin-top: 6px;
    font-weight: 700;
}

.change-password-panel {
    margin-top: 16px;
}

.change-password-panel .panel-header>svg {
    width: 42px;
    height: 42px;
    padding: 10px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
}

.password-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
}

.password-form .primary-btn {
    min-height: 42px;
    white-space: nowrap;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    width: 30px;
    height: 30px;
    transform: translateY(-50%);
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.password-toggle:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.password-toggle svg {
    width: 17px;
    height: 17px;
}

/* Login */
.login-page {
    background: #f7f8f6;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(360px, 43%) 1fr;
    min-height: 100vh;
}

.login-intro {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: clamp(30px, 5vw, 72px);
    background: linear-gradient(145deg, #004b2f 0%, #007c42 58%, #159a5c 100%);
    color: #fff;
    overflow: hidden;
    position: relative;
}

.login-intro::before,
.login-intro::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    content: "";
}

.login-intro::before {
    width: 460px;
    height: 460px;
    right: -210px;
    bottom: -150px;
}

.login-intro::after {
    width: 270px;
    height: 270px;
    right: -55px;
    bottom: -55px;
}

.login-brand {
    color: #fff;
    position: relative;
    z-index: 1;
}

.login-brand .brand-mark {
    background: #fff;
    color: var(--primary);
}

.login-intro-content {
    max-width: 455px;
    margin: auto 0;
    position: relative;
    z-index: 1;
}

.login-kicker,
.login-heading>p {
    color: #8ce0b3;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
}

.login-intro h1 {
    max-width: 390px;
    margin: 14px 0 16px;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.08;
    letter-spacing: -.055em;
}

.login-intro-content>p {
    max-width: 390px;
    margin: 0;
    color: rgba(255, 255, 255, .76);
    font-size: 15px;
    line-height: 1.7;
}

.login-stat-row {
    display: flex;
    gap: 45px;
    margin-top: 42px;
}

.login-stat-row div {
    display: grid;
    gap: 4px;
}

.login-stat-row strong {
    font-size: 25px;
}

.login-stat-row span,
.login-copyright {
    color: rgba(255, 255, 255, .65);
    font-size: 12px;
}

.login-copyright {
    position: relative;
    z-index: 1;
    margin: 24px 0 0;
}

.login-panel {
    display: grid;
    place-items: center;
    padding: 32px;
    background: #f7f8f6;
}

.login-card {
    width: min(100%, 425px);
}

.login-mobile-brand {
    display: none;
}

.login-heading {
    margin-bottom: 31px;
}

.login-icon {
    display: grid;
    width: 44px;
    height: 44px;
    margin-bottom: 24px;
    place-items: center;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--primary);
}

.login-icon svg {
    width: 22px;
    height: 22px;
}

.login-heading>p {
    margin: 0 0 8px;
    color: var(--primary);
}

.login-heading h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.035em;
}

.login-heading>span {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    font-size: 13px;
}

.login-form {
    display: grid;
    gap: 9px;
}

.login-form>label,
.login-label-row label {
    font-size: 12px;
    font-weight: 700;
}

.login-input {
    position: relative;
    margin-bottom: 13px;
}

.login-input>svg {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 1;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.login-input .form-control {
    height: 48px;
    padding-left: 44px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
    box-shadow: none;
    font-size: 13px;
}

.login-input .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 124, 66, .1);
}

.login-input.password-field .form-control {
    padding-right: 44px;
}

.login-input .password-toggle {
    z-index: 2;
    right: 10px;
}

.login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-label-row a,
.login-signup a {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}

.remember-me input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--primary);
}

.login-submit {
    display: flex;
    min-height: 49px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 700;
}

.login-submit svg {
    width: 17px;
    height: 17px;
}

.login-signup {
    margin: 25px 0 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 1120px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 40;
        display: none;
        border: 0;
        background: rgba(12, 24, 18, 0.36);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 50;
        width: min(310px, 86vw);
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.24s ease;
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 18px 14px;
        border-right: 0;
        box-shadow: 18px 0 38px rgba(20, 40, 30, 0.16);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar>.brand {
        display: none;
    }

    .sidebar-mobile-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .sidebar-mobile-head .brand {
        display: flex;
    }

    .nav-list {
        display: grid;
        gap: 5px;
    }

    .nav-group {
        display: block;
    }

    .nav-item {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
    }

    .sidebar-mobile-head .brand span:last-child,
    .sidebar .nav-item span {
        display: inline;
    }

    .sub-nav {
        display: grid;
    }

    .sub-nav[hidden] {
        display: none;
    }

    .sidebar-card {
        display: block;
    }

    .workspace {
        padding: 18px 24px;
    }

    .menu-btn,
    .mobile-profile-menu {
        display: flex;
    }

    .topbar {
        flex-wrap: wrap;
    }

    .topbar-title {
        flex: 1 1 auto;
        order: 1;
    }

    .topbar-actions {
        display: contents;
    }

    .mobile-profile-menu {
        order: 2;
    }

    .topbar .search-box {
        order: 3;
        flex: 1 0 100%;
        width: 100%;
    }

    .topbar-actions>.icon-btn:not(.logout-btn),
    .topbar-actions>.profile-chip,
    .topbar-actions>.logout-btn {
        display: none;
    }

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

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

    .fund-summary-layout {
        align-items: stretch;
        flex-direction: column;
    }

    .summary-ring {
        align-self: center;
    }
}

@media (max-width: 780px) {
    .login-shell {
        display: block;
    }

    .login-intro {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 28px 22px;
    }

    .login-mobile-brand {
        display: block;
        margin-bottom: 52px;
    }

    .login-heading h2 {
        font-size: 26px;
    }

    .app-shell {
        grid-template-columns: 1fr;
        height: 100vh;
        min-height: 100vh;
        border-radius: 0;
    }

    .workspace {
        padding: 16px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: row;
    }

    .metrics-grid,
    .dashboard-grid,
    .checkout-grid,
    .profile-layout,
    .password-form {
        grid-template-columns: 1fr;
    }

    .portfolio-panel,
    .fund-summary {
        grid-row: auto;
    }

    .fund-breakdown {
        grid-template-columns: 1fr;
    }

    .activity-list div {
        display: grid;
        grid-template-columns: 20px minmax(0, 1fr);
    }

    .activity-list time,
    .activity-list strong {
        grid-column: 2;
        min-width: 0;
        text-align: left;
    }
}