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

a, .btn-link {
    color: #006bb7;
}

.logo
{
    height: 54px;
}

footer {
    background-color: #2f5496;
    padding: 20px 20px 20px 0px;
    position: fixed;
    bottom: 0;
    border: 0;
    width: 100%;
    color: rgb(232, 168, 68);
    z-index: 1049;
}

footer .flag-container {
    text-align: center;
}

#footer-excedent {
    height: 88px;
}

#eu-flag {
    width: 230px;
}

.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;
}

h1:focus {
    outline: none;
}

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

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

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

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

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* SSbD / DMDMS Table & Assessment Styling */
table.scoring, table.presence, table.simplified, table.intermediate, table.full {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
}

table.scoring th, table.presence th, table.simplified th, table.intermediate th, table.full th {
    background-color: #2f5496;
    color: #ffffff;
    padding: 12px 16px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #e2e8f0;
}

table.scoring td, table.presence td, table.simplified td, table.intermediate td, table.full td {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
}

table.scoring tr:hover, table.presence tr:hover {
    background-color: #f8fafc;
}

.sticky {
    position: sticky;
    left: 0;
    background-color: #ffffff;
    z-index: 1;
}

/* Category Alert Badges & Cell Color Coding — background + legible text color */
.cat-nc,   .bg-nc   { background-color: #f0fdf4 !important; color: #15803d !important; }
.cat-neg,  .bg-neg  { background-color: #dcfce7 !important; color: #14532d !important; }
.cat-na,   .bg-na   { background-color: #f1f5f9 !important; color: #475569 !important; }
.cat-miss, .bg-miss { background-color: #fef9c3 !important; color: #78350f !important; }
.cat-pos,  .bg-pos,
.cat-cat1, .bg-cat1,
.cat-cat1b,.bg-cat1b { background-color: #fee2e2 !important; color: #7f1d1d !important; }
.cat-cat2, .bg-cat2  { background-color: #ffedd5 !important; color: #7c2d12 !important; }
.cat-cat3, .bg-cat3,
.cat-cat4, .bg-cat4,
.cat-cat5, .bg-cat5  { background-color: #fef9c3 !important; color: #78350f !important; }

/* Table cell background overrides for scoring grid */
table.scoring td.cat-nc   { background-color: #f0fdf4 !important; }
table.scoring td.cat-neg  { background-color: #dcfce7 !important; }
table.scoring td.cat-na   { background-color: #f1f5f9 !important; }
table.scoring td.cat-miss { background-color: #fef9c3 !important; }
table.scoring td.cat-pos  { background-color: #fee2e2 !important; }

/* Endpoint value badges — rendered by backend for non-MISS values */
.ep-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    border: 1px solid transparent;
}
.ep-h1   { background: #fee2e2; color: #7f1d1d; border-color: #fecaca; } /* H1 — red    */
.ep-h2   { background: #ffedd5; color: #7c2d12; border-color: #fed7aa; } /* H2 — orange */
.ep-h3   { background: #fef9c3; color: #78350f; border-color: #fde68a; } /* H3 — yellow */
.ep-safe { background: #dcfce7; color: #14532d; border-color: #bbf7d0; } /* safe— green */
.ep-na   { background: #f1f5f9; color: #475569; border-color: #e2e8f0; } /* NA  — grey  */
.ep-unknown { background: #f3f4f6; color: #374151; border-color: #d1d5db; }

/* MISS dropdown — yellow tint so it stands out as a data gap */
select.ep-miss-select {
    background: #fef9c3 !important;
    border: 1px solid #fde047 !important;
    border-radius: 6px !important;
    color: #78350f !important;
    font-weight: 600 !important;
}

/* Scoping-disabled endpoint columns */
table.scoring th.ep-inactive { background: #f1f5f9; color: #94a3b8; font-weight: 400; font-style: italic; }
table.scoring td.ep-inactive { background: #f8fafc !important; text-align: center; }
.ep-na-label { display: inline-block; font-size: 11px; color: #94a3b8; font-style: italic; }

/* Hazard/Risk Score levels CSS mapping */
.score-0, .score-vh { background-color: #fecaca !important; color: #7f1d1d; font-weight: 700; }
.score-1, .score-h { background-color: #fed7aa !important; color: #9a3412; font-weight: 700; }
.score-2, .score-m { background-color: #fef08a !important; color: #854d0e; font-weight: 700; }
.score-3, .score-l { background-color: #bbf7d0 !important; color: #166534; font-weight: 700; }

.warn-icon {
    display: inline-block;
    background-color: #f59e0b;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 6px;
    cursor: help;
}

.badge-role {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}
.role-benchmark {
    background-color: #dbeafe;
    color: #1e40af;
}
.role-alt {
    background-color: #f3e8ff;
    color: #6b21a8;
}

/* Custom Table Controls Inside Dynamic Tables */
table td input.input, table td select.input {
    width: 100% !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    text-align: center !important;
}

table td input.input[readonly] {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
    font-weight: 600;
}

.stat-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}
.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

/* Custom design styles for results dashboard integrated weights presets */
.btn-indigo {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
    border-color: #4338ca !important;
}

.btn-indigo .text-light {
    color: #e0e7ff !important;
}

.border-indigo {
    border-color: #4f46e5 !important;
}

/* Scoped Horizontal Scroll for Each Table Wrap Container */
.table-wrap {
    overflow-x: auto;
    width: 100%;
    margin-bottom: 24px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.badge.VH { background:#fee2e2 !important; color:#7f1d1d !important; }
.badge.H { background:#ffedd5 !important; color:#7c2d12 !important; }
.badge.M { background:#fef9c3 !important; color:#78350f !important; }
.badge.L { background:#dcfce7 !important; color:#14532d !important; }

table.scoring.scoring-summary thead th {
    writing-mode: horizontal-tb;
    transform: none;
    height: auto;
    max-height: none;
    white-space: nowrap;
}
table.scoring td.score .score-criterion {
    display: block;
    font-size: 11px;
    font-weight: 600;
    opacity: 0.85;
}

.d24-ref p { font-size: 13px; color: #475569; margin-bottom: 12px; }
.d24-ref table { width: 100%; font-size: 13px; border-collapse: collapse; }
.d24-ref th, .d24-ref td { border: 1px solid #e2e8f0; padding: 7px 9px; vertical-align: top; }
.d24-ref thead th { background: #f8fafc; font-weight: 600; }
.d24-ref .d24-matrix td, .d24-ref .d24-matrix th { text-align: center; }
.d24-ref .d24-matrix thead th:first-child, .d24-ref .d24-matrix tbody th { text-align: left; }
.d24-s0 { background: #fee2e2; color: #7f1d1d; font-weight: 700; }
.d24-s1 { background: #ffedd5; color: #9a3412; font-weight: 700; }
.d24-s2 { background: #fef9c3; color: #854d0e; font-weight: 700; }
.d24-s3 { background: #dcfce7; color: #14532d; font-weight: 700; }

.th-subhint { display: block; font-size: 10px; font-weight: 500; color: #64748b; }
.full-hazard-cell { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; }
.full-hazard-value-row { display: flex; gap: 4px; align-items: center; }
.full-hazard-value-row .input.narrow { flex: 1 1 0; min-width: 0; }
.full-hazard-value-row .unit-input { flex: 0 0 8.5rem; min-width: 0; font-size: 11px; color: #374151; }
.hazard-data-source { display: inline-block; font-size: 11px; font-weight: 600; color: #0369a1; background: #e0f2fe; border: 1px solid #bae6fd; border-radius: 6px; padding: 2px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.hazard-data-source.manual { color: #4b5563; background: #f3f4f6; border-color: #e5e7eb; }
.hazard-manual-required { display: block; font-size: 11px; font-weight: 600; color: #9a3412; background: #ffedd5; border: 1px solid #fdba74; border-radius: 6px; padding: 3px 8px; line-height: 1.3; max-width: 12rem; }

/* Uncertainty badges */
.badge.unc-low      { background: #dcfce7; color: #14532d; }
.badge.unc-moderate { background: #fef9c3; color: #78350f; }
.badge.unc-high     { background: #fee2e2; color: #7f1d1d; }
.badge.unc-gap      { background: #fecaca; color: #7f1d1d; }

/* Hide backend DB-fetch bar and button — data is pre-loaded from OA Platform */
.eco-fetch-bar { display: none !important; }
.eco-fetch-btn { display: none !important; }

/* HOL economic modelling tables */
.eco-hol {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}
.eco-hol-formula-note {
    margin: 10px 0 4px;
    font-size: 13px;
    color: #334155;
}
.eco-hol-star-note {
    margin: 0 0 12px;
    font-size: 12px;
    color: #b91c1c;
    font-weight: 600;
}
.eco-star {
    color: #dc2626;
    font-size: 14px;
}
.eco-stage-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 12px;
    border-bottom: 2px solid #9b1c2e;
}
.eco-stage-tab {
    border: none;
    background: #d1d5db;
    color: #374151;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 22px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    margin-right: 4px;
}
.eco-stage-tab.active,
.eco-stage-tab[aria-selected="true"] {
    background: #9b1c2e;
    color: #fff;
    position: relative;
    z-index: 1;
    margin-bottom: -2px;
    border-bottom: 2px solid #9b1c2e;
}
.eco-stage-tab:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}
.eco-stage-tab:disabled.active,
.eco-stage-tab:disabled[aria-selected="true"] {
    background: #e5e7eb;
    color: #9ca3af;
    border-bottom: none;
    margin-bottom: 0;
}
.eco-stage-panel-off {
    display: none !important;
}
.eco-chem-block {
    margin-bottom: 20px;
}
.eco-chem-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.eco-chem-cas {
    color: #6b7280;
    font-size: 13px;
}
.eco-kind {
    margin-bottom: 14px;
}
.eco-kind-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 12px;
}
.eco-kind-head-cost { background: #9b1c2e; }
.eco-kind-head-rev  { background: #166534; }
.eco-sigma { font-weight: 600; opacity: 0.95; }
table.eco-hol-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 0;
    box-shadow: none;
    border-radius: 0;
}
table.eco-hol-table th {
    color: #fff;
    padding: 8px 8px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.25);
}
table.eco-hol-table-cost thead th { background: #9b1c2e; }
table.eco-hol-table-rev thead th  { background: #166534; }
table.eco-hol-table td {
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
    text-align: center;
}
table.eco-hol-table-cost tbody tr:not(.eco-sum-row) td { background: #fdecec; }
table.eco-hol-table-rev tbody tr:not(.eco-sum-row) td  { background: #e8f7ee; }
table.eco-hol-table .eco-sum-row td {
    background: #f8fafc;
    border-top: 2px solid #cbd5e1;
}
table.eco-hol-table td.eco-star-cell {
    background: #fde68a !important;
}
table.eco-hol-table td.eco-unit-mismatch {
    background: #fecaca !important;
    box-shadow: inset 0 0 0 2px #dc2626;
}
.eco-empty-row { color: #9ca3af !important; font-size: 12px; background: #fff !important; }
.eco-line-total, .eco-stage-sum { font-weight: 700; white-space: nowrap; }
.eco-add-cost {
    background: #fff;
    border: 1px solid #9b1c2e;
    color: #9b1c2e;
    margin: 6px 0 12px;
    font-size: 12px;
}
.eco-add-rev {
    background: #fff;
    border: 1px solid #166534;
    color: #166534;
    margin: 6px 0 12px;
    font-size: 12px;
}
.eco-me-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
}
table.eco-hol-table td input.input.narrow,
table.eco-hol-table td input.eco-qty,
table.eco-hol-table td input.eco-value,
table.eco-hol-table td input.eco-qty-unit,
table.eco-hol-table td input.eco-value-unit {
    width: auto !important;
    min-width: 64px;
    max-width: 120px;
}
