html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5I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I2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 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");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.blank-layout {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8fafc; /* soft background */
}

.upload-card {
    width: 420px;
    padding: 32px 28px;
    border-radius: 8px;
    background: transparent;
    box-shadow: 0 8px 28px rgba(0,0,0,0.04);
    text-align: center;
}

.upload-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 22px;
}

.file-name {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 18px;
}

.modern-upload {
    display: block;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 18px;
    cursor: pointer;
    transition: 0.15s;
    background: #f8fafc;
}

.modern-upload:hover {
    border-color: #3b82f6;
    background: #f1f5ff;
}

/* hide native input */
.modern-upload input[type="file"] {
    display: none;
}

.upload-content {
display: flex;
align-items: center;
gap: 12px;
justify-content: center;
}

.upload-content i {
    font-size: 28px;
    color: #3b82f6;
}

.upload-main {
font-weight: 600;
color: #1e293b;
}

.upload-sub {
font-size: 13px;
color: #64748b;
}

.field-label {
    font-size: 13px;
    color: #475569;
    margin-bottom: 4px;
    display: block;
}

.form-select {
    border-radius: 8px;
}

.validation-summary-errors {
    color: #dc2626;
    font-size: 13px;
}

.hint-text {
    display: block;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
    white-space: normal;      /* allow wrapping */
    word-break: break-word;   /* break long words if needed */
    margin-top: 10px;
}

.summary-container {
    width: 720px;
    max-width: 92vw;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.metric {
    background: white;
    padding: 14px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    text-align: center;
}

.metric-label {
    font-size: 12px;
    color: #64748b;
}

.metric-value {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.metric-value.gain {
    color: #16a34a;
}

.summary-header {
    text-align: center;
    margin-bottom: 6px;
}

.summary-title {
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
}

.summary-sub {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}
.card-section {
    background: white;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

.section-title {
    font-weight: 600;
    margin-top: 5px;
    margin-bottom: 5px;
    color: #0f172a;
}

.allocation-bar {
    display: flex;
    width: 100%;
    height: 28px;
    border-radius: 6px;
    overflow: hidden;
}

.alloc {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 12px;
}

.alloc.large {
    background: #2563eb;
    font-size: 8px;
}

    .alloc.mid {
        background: #7c3aed;
        font-size: 8px;
    }

    .alloc.small {
        background: #db2777;
        font-size: 8px;
    }

    .alloc.flexi {
        background: #eba709;
        font-size: 8px;
    }

    .alloc.debt {
        background: #64748b;
        font-size: 8px;
    }

    .alloc.unknown {
        background: #ba220b;
        font-size: 8px;
    }

.alloc-donut {
    display: flex;
    align-items: center; /* vertical center */
    justify-content: center; /* optional horizontal center */
    gap: 24px;
}

.donut {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    position: relative;
}

    .donut::after {
        content: "";
        position: absolute;
        inset: 28px;
        background: white;
        border-radius: 50%;
    }

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-item {
    font-size: 14px;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

    .dot.large {
        background: #4CAF50;
    }

    .dot.mid {
        background: #2196F3;
    }

    .dot.small {
        background: #FF9800;
    }

    .dot.flexi {
        background: #9C27B0;
    }

    .dot.debt {
        background: #607D8B;
    }

    .dot.unknown {
        background: #9E9E9E;
    }
.fund-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.fund-table th {
    text-align: left;
    color: #64748b;
    padding-bottom: 6px;
}

.fund-table td {
    padding: 6px 0;
}

.gain {
    color: #16a34a;
    font-weight: 500;
}

.premium-box {
    background: linear-gradient(135deg,#eef2ff,#f8fafc);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.allocation-box {
    background: linear-gradient(135deg,#eef2ff,#f8fafc);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.premium-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.premium-text {
    font-size: 18px;
    color: #475569;
}

.error-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-card {
    width: 420px;
    padding: 32px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    background: white;
}

.error-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.error-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.error-message {
    color: #666;
    font-size: 14px;
}

.num-col {
    text-align: center;
}

@media print {

    body * {
        visibility: hidden;
    }

    #reportArea, #reportArea * {
        visibility: visible;
    }

    #reportArea {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .btn,
    .premium-box {
        display: none !important;
    }

    .premium-container,
    .premium-container * {
        visibility: visible;
    }

    .premium-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

.center-btn {
    display: flex;
    justify-content: center; /* keep centered */
    gap: 12px; /* space between buttons */
    margin-top: 20px;
    margin-bottom: 24px; /*space below buttons */
}

    .center-btn .btn {
        font-weight: 600; /* semi-bold */
    }

.alloc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 14px;
    align-items: center;
    justify-content: center;
}

.loss-row td {
    color: #c62828; /* clean financial red */
    font-weight: 600; /* optional */
}

.alloc-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

    .dot.large {
        background: #4CAF50;
    }

    .dot.mid {
        background: #2196F3;
    }

    .dot.small {
        background: #FF9800;
    }

    .dot.flexi {
        background: #9C27B0;
    }

    .dot.debt {
        background: #607D8B;
    }

    .dot.unknown {
        background: #9E9E9E;
    }

.premium-container {
    max-width: 850px;
    margin: auto;
    padding: 30px;
}

.premium-header {
    font-size: 28px;
    font-weight: 600;
}

.premium-sub {
    color: #666;
    margin-bottom: 30px;
}

.score-grid {
    display: flex;
    gap: 30px;
    margin-bottom: 35px;
}

.score-meter {
    flex: 1;
}

.meter-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.meter-bar {
    height: 10px;
    background: #e9edf3;
    border-radius: 6px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: 6px;
}

    .meter-fill.diversification {
        background: #2ecc71;
    }

    .meter-fill.risk {
        background: #f39c12;
    }

.meter-value {
    margin-top: 6px;
    font-size: 14px;
    color: #666;
}

.score-card {
    flex: 1;
    text-align: center;
    padding: 20px;
    background: #f7f9fc;
    border-radius: 10px;
}

.score-title {
    font-size: 14px;
    color: #777;
}

.score-value {
    font-size: 42px;
    font-weight: 600;
}

.score-outof {
    color: #999;
}

.analysis-section {
    margin-bottom: 24px;
}

.section-text {
    line-height: 1.6;
    color: #444;
}

.action-list {
    padding-left: 18px;
}

    .action-list li {
        margin-bottom: 8px;
    }

.premium-container {
    max-width: 1100px;
    margin: auto;
    padding: 30px;
}

.summary-header {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.summary-sub {
    color: #6c757d;
    margin-bottom: 30px;
    align-content: center;
}

.premium-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0px 4px 14px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

/* SCORE CARDS */

.score-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.score-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0px 4px 14px rgba(0,0,0,0.08);
}

.score-title {
    font-weight: 600;
    margin-bottom: 10px;
}

/* Progress Bars */

.meter-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: 6px;
}

.diversification {
    background: linear-gradient(90deg,#3b82f6,#60a5fa);
}

.risk {
    background: linear-gradient(90deg,#f97316,#fb923c);
}

/* ANALYSIS SECTIONS */

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 20px;
}

.analysis-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 14px rgba(0,0,0,0.08);
}

.section-text {
    color: #495057;
    line-height: 1.6;
}

/* ACTIONS */

.action-list {
    list-style: none;
    padding: 0;
}

.action-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.action-icon {
    color: #22c55e;
    margin-right: 10px;
    font-weight: bold;
}

.section-footer-note {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.9rem;
    color: #6b7280;
    font-style: italic;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-card {
    text-align: center;
    padding: 40px;
    border-radius: 14px;
    background: white;
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e6e6e6;
    border-top: 5px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: auto;
    margin-bottom: 20px;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.error-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.error-card {
    max-width: 520px;
    width: 100%;
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.error-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.error-desc {
    color: #666;
    margin-bottom: 20px;
}

.error-details {
    background: #f7f7f7;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    color: #444;
    margin-bottom: 25px;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.blank-layout {
    background: #F3F4F6;
    font-family: "Inter", "Segoe UI", sans-serif;
}

.upload-container {
    background: white;
    max-width: 720px;
    margin: 80px auto;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
}

.faq-box {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

    .faq-box.open {
        max-height: 1000px; /* large enough for your content */
    }

.faq-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.overlap-section {
    margin-top: 18px;
}

.overlap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.overlap-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    margin-top: 6px;
    margin-bottom: 6px;
}

.overlap-badge {
    display: inline-block;
    background: linear-gradient(135deg,#4f7cff,#3b63e6);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
    margin-top: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.overlap-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 16px;
}

.overlap-table {
    width: 100%;
    font-size: 14px;
}

    .overlap-table th {
        text-align: left;
        font-weight: 600;
        color: #666;
        padding-bottom: 6px;
    }

    .overlap-table td {
        padding: 6px 0;
    }

    .overlap-table tr:not(:last-child) {
        border-bottom: 1px solid #f1f1f1;
    }