:root {
    --navy: #10233f;
    --navy-2: #18365f;
    --blue: #2563eb;
    --teal: #0f766e;
    --gold: #b7791f;
    --ink: #172033;
    --muted: #667085;
    --line: #d9e2ec;
    --line-soft: #edf2f7;
    --surface: #ffffff;
    --canvas: #f5f7fa;
    --sidebar: #0f1f36;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 0;
}

.app-shell {
    min-height: 100vh;
    background: var(--canvas);
    padding: 0;
}

.app-sidebar {
    min-height: 100vh;
    padding: 24px 18px;
    background: var(--sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 4px 22px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 8px;
    background: #ffffff;
    color: var(--navy);
    font-weight: 800;
    font-size: 15px;
}

.brand-name {
    color: #ffffff;
    font-size: 17px;
    font-weight: 760;
    line-height: 1.1;
}

.brand-subtitle,
.sidebar-footer {
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
}

.sidebar-nav {
    gap: 6px;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.76);
    border-radius: 8px;
    padding: 11px 12px;
    font-weight: 650;
}

.sidebar-nav .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav .nav-link.active {
    color: #ffffff;
    background: var(--blue);
}

.sidebar-footer {
    margin-top: 28px;
    padding: 14px 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.app-content {
    padding: 28px 32px 44px;
}

.app-content > .container,
.app-content > .container-fluid {
    max-width: 1480px;
    padding: 0;
}

.page-header {
    margin-bottom: 24px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--line);
}

.page-eyebrow {
    color: var(--blue);
    font-size: 12px;
    font-weight: 780;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.page-title {
    color: var(--navy);
    font-size: 30px;
    font-weight: 760;
    line-height: 1.15;
    margin: 0;
}

.page-subtitle {
    max-width: 860px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.card {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 35, 63, 0.06);
    background: var(--surface);
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid var(--line-soft);
    color: var(--navy);
    font-weight: 740;
    padding: 14px 16px;
}

.card-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 740;
}

.card-body {
    padding: 16px;
}

label,
.control-label,
.question-label {
    color: #344054;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 7px;
}

.Select-control,
.Select-menu-outer,
.form-control,
input {
    border-color: var(--line) !important;
    border-radius: 7px !important;
}

.Select-control,
.form-control {
    min-height: 40px;
    box-shadow: none;
}

.Select-control:hover,
.form-control:focus {
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.btn {
    border-radius: 7px;
    font-weight: 720;
    padding: 9px 14px;
    box-shadow: none !important;
}

.btn-primary,
.btn-info {
    background: var(--blue);
    border-color: var(--blue);
    color: #ffffff;
}

.btn-primary:hover,
.btn-info:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-success {
    background: var(--teal);
    border-color: var(--teal);
}

.action-button {
    min-width: 150px;
}

.dash-table-container {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th {
    background: #f8fafc !important;
    color: #344054 !important;
    font-weight: 760 !important;
    border-color: var(--line) !important;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td {
    border-color: var(--line-soft) !important;
    color: var(--ink);
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner tr:nth-child(even) td {
    background: #fbfdff !important;
}

.dash-table-container .previous-next-container button,
.dash-table-container .page-number {
    border-radius: 6px;
}

.js-plotly-plot {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.markdown,
.dash-markdown {
    color: var(--muted);
    line-height: 1.6;
}

.questionnaire-panel {
    display: grid;
    gap: 12px;
}

.question-block {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.question-block label:not(.question-label) {
    font-weight: 500;
}

.login-shell {
    min-height: 100vh;
    background: linear-gradient(135deg, #10233f 0%, #18365f 52%, #f5f7fa 52%, #f5f7fa 100%);
}

.login-panel {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 34px;
    box-shadow: 0 20px 50px rgba(16, 35, 63, 0.18);
}

.login-brand {
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.login-title {
    color: var(--navy);
    font-size: 28px;
    font-weight: 760;
    margin-bottom: 8px;
}

.login-copy {
    color: var(--muted);
    margin-bottom: 22px;
}

.text-primary,
.text-info {
    color: var(--blue) !important;
}

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

.text-secondary {
    color: var(--muted) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 220ms ease-out;
}

@media (max-width: 992px) {
    .app-sidebar {
        position: relative;
        min-height: auto;
    }

    .app-content {
        padding: 22px 18px 34px;
    }

    .page-title {
        font-size: 25px;
    }

    .login-shell {
        background: var(--canvas);
        padding: 18px;
    }

    .login-panel {
        width: 100%;
        padding: 24px;
    }
}
