.Select-menu-outer {
    display: block !important;
    z-index: 1050 !important;
}

:root {
    --app-bg: #ffffff;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --surface-strong: #edf3f8;
    --text: #1f2933;
    --muted: #5f6f7a;
    --border: #d7e0e6;
    --border-strong: #b9c8d0;
    --primary: #325D88;
    --primary-dark: #244767;
    --primary-soft: #e7eef5;
    --accent: #b76b43;
    --accent-soft: #f5e7df;
    --shadow-sm: 0 2px 8px rgba(31, 41, 51, 0.07);
    --shadow-md: 0 12px 32px rgba(31, 41, 51, 0.10);
    --radius: 8px;

    --bs-primary: var(--primary);
    --bs-body-color: var(--text);
    --bs-body-bg: var(--app-bg);
    --bs-border-color: var(--border);
    --bs-link-color: var(--primary);
    --bs-link-hover-color: var(--accent);
}

html {
    scroll-behavior: smooth;
}

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

body {
    margin: 0;
    background: #ffffff;
    color: var(--text);
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: 0;
}

* {
    box-sizing: border-box;
}

a {
    color: var(--primary);
    font-weight: 600;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--accent);
}

.app-root {
    min-height: 100vh;
}

#page-content-container {
    min-height: calc(100vh - 245px);
    min-height: calc(100dvh - 245px);
}

.app-navbar.navbar {
    background: var(--primary) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(17, 38, 43, 0.18);
    padding: 0.55rem 1rem;
}

.app-navbar .container-fluid {
    max-width: 1280px;
    padding-left: 0;
    padding-right: 0;
}

.app-navbar img {
    display: block;
    height: 38px;
    max-width: 150px;
    border-radius: 4px;
}

.app-navbar .navbar-brand {
    color: #fff !important;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0;
}

.app-navbar .nav-link {
    margin-left: 0.15rem;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.78) !important;
    font-weight: 600;
    padding: 0.45rem 0.72rem !important;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus,
.app-navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff !important;
}

.app-page,
#page-home > div,
#page-calculator > div,
#page-scenario > div {
    width: min(1120px, calc(100% - 32px)) !important;
    margin: 0 auto !important;
    padding: 34px 0 28px;
}

#page-home > div,
.home-page {
    max-width: 1080px;
}

#page-calculator {
    min-height: calc(100vh - 240px);
    min-height: calc(100dvh - 240px);
    padding-bottom: 20px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0;
}

.app-page h1,
#page-home h1,
#page-calculator h1 {
    margin: 0 0 0.65rem !important;
    color: var(--primary-dark);
    font-size: clamp(1.85rem, 2.8vw, 2.55rem);
    line-height: 1.12;
    text-align: left !important;
}

.app-page h2,
#page-home h2 {
    margin: 2.3rem 0 0.9rem !important;
    color: var(--primary-dark);
    font-size: 1.35rem;
    text-align: left !important;
}

.app-page h3 {
    color: var(--primary-dark);
    font-size: 1.18rem;
}

#page-home p,
#page-calculator h5,
.scenario-page > p,
.meta-main > p {
    color: var(--muted);
}

#page-calculator h5 {
    margin: 0 0 1.4rem !important;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.55;
    text-align: left !important;
}

.home-page > p:first-of-type,
#page-home > div > p:first-of-type {
    max-width: 820px;
    color: #34434b;
    font-size: 1.04rem;
    font-weight: 400;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 1.25rem 0 1.6rem !important;
    padding: 0 !important;
    list-style: none;
}

.feature-list li {
    min-width: 0;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 0.9rem 1rem;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.6rem 0 2.2rem !important;
    padding-left: 0 !important;
    text-align: left !important;
}

.home-actions p {
    margin: 0 !important;
}

.method-grid {
    columns: 2 280px;
    column-gap: 2.4rem;
    margin: 0.75rem 0 1.25rem !important;
    padding-left: 1.2rem !important;
    list-style: disc;
}

.method-grid li {
    break-inside: avoid;
    margin-bottom: 0.32rem;
    padding-left: 0.1rem;
    color: #34434b;
}

.citation-card {
    position: relative;
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.citation-note p {
    margin: 0.8rem 0;
}

.citation-card pre {
    margin: 0 !important;
    border: 0 !important;
    background: var(--surface-muted) !important;
    color: #273842;
    font-size: 0.88rem;
    line-height: 1.45;
}

.btn {
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0;
    box-shadow: none !important;
}

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.btn-secondary,
.btn-outline-secondary {
    --bs-btn-color: var(--primary-dark);
    --bs-btn-border-color: var(--border-strong);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-hover-color: #fff;
}

.btn-link {
    color: var(--primary);
    font-weight: 600;
}

.btn-link:hover {
    color: var(--accent);
}

.form-control,
input[type="number"],
input[type="text"],
textarea {
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
}

.form-control:focus,
input[type="number"]:focus,
input[type="text"]:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.18rem rgba(37, 95, 107, 0.16);
    outline: 0;
}

label {
    color: #31424b;
    font-weight: 600;
    margin-bottom: 0.28rem;
}

input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    outline: none;
    margin-right: 7px;
    vertical-align: middle;
    cursor: pointer;
    background-color: #fff;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

input[type="checkbox"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: inset 0 0 0 3px #fff;
}

input[type="checkbox"]:disabled {
    background-color: #d7dde1;
    border-color: #d7dde1;
    cursor: not-allowed;
}

#upload-data,
#upload-parameters-data {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 96px !important;
    height: auto !important;
    margin: 0 0 1rem !important;
    border: 1px dashed var(--border-strong) !important;
    border-radius: var(--radius) !important;
    background: var(--surface);
    color: var(--primary-dark) !important;
    font-weight: 700;
    line-height: 1.4 !important;
    text-align: center !important;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s, background-color 0.15s;
    cursor: pointer;
}

#upload-data:hover,
#upload-parameters-data:hover {
    border-color: var(--primary) !important;
    background: var(--primary-soft);
}

#upload-data > div,
#upload-parameters-data > div {
    line-height: 1.4 !important;
}

.upload-hint {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.recorded-methods-panel {
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
}

.recorded-methods-panel h5 {
    margin: 0 0 0.75rem;
    color: var(--primary-dark);
    font-size: 1rem;
}

.recorded-methods-list {
    margin-bottom: 0.75rem;
}

.recorded-methods-list .list-group-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.Select-control {
    min-height: 38px;
    border-color: var(--border) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}

.is-focused:not(.is-open) > .Select-control {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.18rem rgba(37, 95, 107, 0.16) !important;
}

.Select-menu-outer {
    border-color: var(--border) !important;
    border-radius: 0 0 6px 6px;
    box-shadow: var(--shadow-md);
}

.Select-option,
.VirtualizedSelectOption {
    color: var(--text) !important;
}

.Select-option.is-focused,
.VirtualizedSelectFocusedOption {
    background-color: var(--primary-soft) !important;
    color: var(--primary-dark) !important;
}

.Select-option.is-selected,
.VirtualizedSelectSelectedOption {
    background-color: #d8e8eb !important;
    color: var(--primary-dark) !important;
}

.Select-value-label,
.Select--single > .Select-control .Select-value {
    color: var(--text) !important;
}

.rc-slider-track,
.rc-slider-tracks .rc-slider-track {
    background-color: var(--primary) !important;
}

.rc-slider-rail {
    background-color: #d9e2e7 !important;
}

.rc-slider-handle,
.rc-slider-handle:hover,
.rc-slider-handle:active,
.rc-slider-handle-click-focused,
.rc-slider-handle-dragging,
.rc-slider-handle:focus {
    border-color: var(--primary) !important;
}

.rc-slider-handle:active,
.rc-slider-handle-click-focused,
.rc-slider-handle-dragging,
.rc-slider-handle:focus {
    box-shadow: 0 0 0 4px rgba(37, 95, 107, 0.18) !important;
}

.rc-slider-dot-active {
    border-color: var(--primary) !important;
}

.rc-slider-mark-text-active {
    color: var(--primary) !important;
}

.card,
.accordion,
.list-group,
.modal-content {
    border-radius: var(--radius);
}

.card,
.modal-content {
    border-color: var(--border);
    box-shadow: var(--shadow-md);
}

.card-header,
.modal-header {
    border-bottom-color: var(--border);
    background: var(--surface-muted);
    color: var(--primary-dark);
    font-weight: 700;
}

.modal-footer {
    border-top-color: var(--border);
    background: var(--surface-muted);
}

.list-group {
    border-color: var(--border) !important;
    overflow: hidden;
}

.list-group-item {
    border-color: var(--border);
    color: var(--text);
}

.list-group-item:hover {
    background: var(--surface-muted);
}

.accordion-item {
    border-color: var(--border);
    background: var(--surface);
}

.accordion-button {
    color: var(--primary-dark);
    background: var(--surface);
    font-weight: 700;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-dark);
    background: var(--primary-soft);
    box-shadow: inset 0 -1px 0 var(--border);
}

.accordion-button:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.18rem rgba(37, 95, 107, 0.16);
}

.alert {
    border-radius: var(--radius);
}

.meta-page {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
}

.meta-layout {
    min-height: calc(100vh - 255px);
    background: var(--app-bg);
}

.meta-sidebar {
    background: var(--surface) !important;
    border-right: 1px solid var(--border) !important;
    box-shadow: 7px 0 24px rgba(31, 41, 51, 0.04);
}

.meta-sidebar,
.meta-main {
    padding: 1.5rem !important;
}

.meta-sidebar h2 {
    margin-top: 0 !important;
    color: var(--primary-dark);
    font-size: 1.55rem !important;
}

.meta-sidebar .page-title {
    margin-top: 0 !important;
}

.meta-sidebar p {
    color: var(--muted);
}

.meta-main {
    background: transparent;
}

.meta-main h3:first-child {
    margin-top: 0 !important;
}

.meta-main .list-group,
.meta-sidebar .accordion {
    box-shadow: var(--shadow-sm);
}

.scenario-page > .row {
    margin-bottom: 1.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
}

.scenario-page hr {
    margin: 2rem 0 1.15rem;
    border-top-color: var(--border);
    opacity: 1;
}

.scenario-page hr + hr {
    display: none;
}

.dash-graph {
    border-radius: var(--radius);
}

.dash-table-container {
    margin-top: 0.75rem;
}

.dash-table-container .dash-spreadsheet-container {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.dash-table-container .dash-spreadsheet-container,
.dash-table-container .dash-spreadsheet-inner {
    border-color: var(--border) !important;
}

.dash-table-container .dash-header {
    background-color: var(--surface-strong) !important;
    color: var(--primary-dark) !important;
    font-weight: 700 !important;
}

.dash-table-container .dash-cell {
    color: var(--text);
    border-color: #e6edf1 !important;
}

.dash-table-container .dash-cell.focused {
    border-color: var(--primary) !important;
}

.scenario-progress {
    margin-top: 0.85rem;
    border-radius: 999px;
    background-color: #e7eef5;
}

.scenario-progress .progress-bar {
    font-size: 0.72rem;
    font-weight: 700;
}

.scenario-progress-status {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.86rem;
}

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

.function-guide-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--surface);
}

.function-guide-figure {
    width: 190px;
    max-width: 100%;
}

.function-guide-svg {
    width: 100%;
    height: auto;
    display: block;
}

.function-guide-copy {
    min-width: 0;
    width: 100%;
}

.function-guide-equation {
    font-size: 0.82rem;
    max-width: 100%;
    padding-bottom: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    overflow-wrap: anywhere;
}

.function-guide-equation p,
.function-guide-description p {
    margin-bottom: 0;
}

.function-guide-equation mjx-container,
.function-guide-display-equation mjx-container {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
}

.function-guide-copy code {
    white-space: normal;
}

.app-footer {
    margin-top: 0 !important;
    border-top: 1px solid var(--border);
    background: #f8fafc !important;
    padding: 22px 0 !important;
}

.app-footer .container-fluid {
    max-width: 1120px !important;
    margin: 0 auto !important;
    padding: 0 16px;
}

.app-footer p {
    margin-bottom: 0.45rem;
    color: #667781 !important;
    font-size: 0.82rem !important;
    line-height: 1.45;
}

.app-footer p:last-child {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    #page-content-container {
        min-height: calc(100vh - 220px);
        min-height: calc(100dvh - 220px);
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .meta-layout {
        flex-wrap: wrap !important;
    }

    .meta-sidebar,
    .meta-main {
        flex: 0 0 100%;
        max-width: 100%;
        border-right: 0 !important;
    }

    .meta-sidebar {
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 575.98px) {
    .app-navbar.navbar {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .app-navbar .nav-link {
        margin-left: 0;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .app-page,
    #page-home > div,
    #page-calculator > div,
    #page-scenario > div {
        width: calc(100% - 24px) !important;
        padding-top: 24px;
    }

    .method-grid {
        columns: 1;
    }

    .scenario-page > .row {
        padding: 0.85rem;
    }

    .function-guide-item {
        flex-direction: column;
    }

    .function-guide-figure {
        max-width: 100%;
        width: 100%;
    }
}

/* Update the app UI to match a professional MCDA decision-support dashboard style.

Design direction:
Create a clean, institutional research-software interface. The app should feel polished, calm, and functional, not like a marketing landing page. Use a white page background, restrained blue primary color, clear spacing, subtle borders, and compact information-dense layouts.

Visual style:
- Main background: white.
- Primary color: #325D88.
- Primary dark: #244767.
- Primary soft background: #e7eef5.
- Accent color: #b76b43, used sparingly for small emphasis only.
- Text color: #1f2933.
- Muted text: #5f6f7a.
- Borders: #d7e0e6.
- Border radius: 6-8px.
- Shadows should be subtle, e.g. 0 2px 8px rgba(31, 41, 51, 0.07).
- Avoid decorative gradients, oversized cards, and one-page marketing styling.

Layout:
- Use a centered page width around 1120px.
- Page padding should be about 32-36px top and 24-28px bottom.
- Use consistent page titles across pages with the same class/style.
- Titles should be left-aligned, dark blue, bold, and around 2rem.
- Section headings should be smaller, dark blue, and left-aligned.
- Keep tool pages compact and workflow-oriented.

Navbar:
- Use #325D88 as the navbar background.
- Text should be white or near-white.
- Active/hover nav links should use a subtle translucent white background.
- Do not put a white box/background behind the logo.

Footer:
- Use a very light gray footer background, e.g. #f8fafc.
- Add a subtle top border.
- Footer text should be small, muted, and readable.

Buttons:
- Primary actions use #325D88 with white text.
- Secondary actions use outline buttons with the same palette.
- Download/export buttons should use the same secondary outline style, not unrelated light-gray buttons.
- Keep buttons rectangular with small radius, not pill-shaped.

Forms and inputs:
- Inputs, dropdowns, accordions, sliders, and tables should use the same blue focus color.
- Focus rings should be subtle, e.g. rgba(50, 93, 136, 0.16).
- Dash sliders should use #325D88 instead of default purple.
- Dropdown selected/focused states should use a soft blue background.

Upload boxes:
- Main upload controls should remain full drag-and-drop boxes.
- Use dashed border, white background, subtle shadow, 8px radius.
- Upload text should be concise: “Drag and Drop or Select Files”.
- Hover state should change border/background softly using the primary blue palette.

Tables:
- Tables should have subtle borders and light header backgrounds.
- Empty helper/placeholder tables should not create visible blank boxes.
- Use compact cell padding and clear headers.
- Comparison/recorded-results tables should be easy to scan.

Recorded results / comparison UI:
- If users can record multiple runs, show a “Recorded methods” list above the comparison table.
- Repeated method runs should be labeled with counters, e.g. ARAS 1, ARAS 2, Meta-MCDA 1.
- Each recorded run should have an individual Delete button.
- Also provide a Clear all recorded methods action.

Progress feedback:
- Long-running simulations should show a progress bar.
- Progress polling should be disabled by default and only enabled while the simulation is running.
- Show current round and total, e.g. “37 / 500”.
- Stop polling when complete or on error.

Home/reference content:
- Long method lists should not be shown as individual cards.
- Use compact multi-column text lists for many methods.
- Use cards only when they frame actual repeated items or tool surfaces.

Overall:
Make the UI consistent across Home, Meta-MCDA, Calculator, and Robustness pages. The result should look like one coherent professional research tool. */
