html,
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top right, rgba(184, 134, 11, 0.16), transparent 28%),
        linear-gradient(180deg, #f5f7fb 0%, #eef2f7 100%);
    color: #162033;
}

a,
.btn-link {
    color: #0f4c81;
}

.content-shell {
    padding: 1.5rem;
    max-width: 1440px;
    margin: 0 auto;
}

.tracker-appbar {
    background: linear-gradient(90deg, #152847 0%, #233b65 55%, #31507f 100%);
    color: #fff;
    padding-inline: 1rem;
}

.brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand-title {
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.76);
}

.drawer-title {
    color: #22375a;
    font-weight: 700;
}

.hero-banner,
.page-banner {
    padding: 1.75rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #162847 0%, #203760 60%, #2b4a7d 100%);
    color: #fff;
    box-shadow: 0 18px 40px rgba(22, 40, 71, 0.18);
}

.hero-title {
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.hero-subtitle,
.page-banner .mud-typography-body1 {
    color: rgba(255, 255, 255, 0.78);
}

.hero-banner-stack {
    gap: 1rem;
}

.metric-card {
    height: 100%;
    padding: 1.25rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(29, 47, 77, 0.08);
    box-shadow: 0 12px 30px rgba(20, 32, 51, 0.08);
}

.accent-green {
    border-top: 5px solid #2e7d32;
}

.accent-blue {
    border-top: 5px solid #1565c0;
}

.accent-gold {
    border-top: 5px solid #b8860b;
}

.accent-slate {
    border-top: 5px solid #334155;
}

.dashboard-table-card,
.insight-panel,
.app-footer,
.page-banner + .mud-paper {
    border-radius: 16px;
}

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

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

.dashboard-table th {
    background: #eaf0f8;
    color: #22375a;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dashboard-table th,
.dashboard-table td {
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid #dfe6ef;
    text-align: left;
}

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

.detail-table td {
    padding: 0.8rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-table td:first-child {
    color: #526277;
    width: 48%;
}

.return-pill {
    padding: 1rem;
    text-align: center;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #dbe4ef;
}

.allocation-list {
    display: grid;
    gap: 1rem;
}

.allocation-row {
    display: grid;
    gap: 0.45rem;
}

.allocation-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
    color: #22375a;
}

.allocation-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #e7eef8;
    overflow: hidden;
}

.allocation-fill {
    height: 100%;
    border-radius: 999px;
}

.positive-fill {
    background: linear-gradient(90deg, #31507f 0%, #5f8fd1 100%);
}

.negative-fill {
    background: linear-gradient(90deg, #b45309 0%, #ef4444 100%);
}

.fund-cell {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.fund-symbol {
    font-weight: 700;
    color: #1a2d4d;
}

.fund-name {
    color: #5d6b82;
    font-size: 0.88rem;
}

.strategy-note {
    padding: 0.9rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.strategy-note:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.contribution-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.contribution-row:last-of-type {
    border-bottom: 0;
}

.contribution-inputs {
    min-width: 280px;
}

.positive-gap {
    color: #2e7d32;
    font-weight: 700;
}

.negative-gap {
    color: #c62828;
    font-weight: 700;
}

.note-row td {
    padding-top: 0;
    border-bottom: 1px solid #eef2f7;
}

.holdings-actions,
.settings-actions {
    gap: 1rem;
}

.app-footer {
    margin-top: auto;
    padding: 1.2rem 0 1.6rem;
    background: transparent;
    color: #546275;
}

.mud-nav-tabs .mud-tab-label {
    font-weight: 600;
    color: #fff;
}

.mud-nav-tabs .mud-tab.mud-tab-active {
    background-color: rgba(255, 255, 255, 0.14);
    border-radius: 10px;
}

.mobile-menu-btn {
    display: none !important;
}

#blazor-error-ui {
    background: #fff3cd;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

@media (max-width: 900px) {
    .mobile-menu-btn {
        display: inline-flex !important;
    }

    .mud-nav-tabs {
        display: none !important;
    }

    .content-shell {
        padding: 1rem;
    }

    .hero-banner-stack,
    .contribution-row,
    .holdings-actions,
    .settings-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .contribution-inputs {
        width: 100%;
        min-width: 0;
    }
}
