
:root {
    --niu-red: #BA0C2F;
    --niu-dark-red: #900925;
    --niu-black: #202020;
    --white: #FFFFFF;
    --background: #F3F4F6;
    --text: #252525;
    --muted: #6B7280;
    --border: #E0E0E0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

/* NIU Header */

.niu-header {
    background: var(--niu-red);
    color: white;
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 24px 5%;
    border-bottom: 5px solid var(--niu-dark-red);
}

.niu-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
}

.header-text h1 {
    font-size: 30px;
    line-height: 1.3;
}

.header-text p {
    font-size: 15px;
    opacity: 0.95;
}

.project-label {
    margin-left: auto;
    text-align: right;
    font-size: 14px;
}

/* Navigation */

.navigation {
    display: flex;
    flex-wrap: wrap;
    background: var(--niu-black);
    padding: 0 5%;
}

.navigation a {
    color: white;
    text-decoration: none;
    padding: 17px 22px;
    font-size: 14px;
    transition: 0.2s;
}

.navigation a:hover,
.navigation a.active {
    background: var(--niu-red);
}

/* Main Content */

.container {
    max-width: 1500px;
    margin: auto;
    padding: 35px 5%;
}

.welcome {
    background: white;
    border-left: 6px solid var(--niu-red);
    border-radius: 6px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px #0000000A;
}

.section-label {
    color: var(--niu-red);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.welcome h2 {
    font-size: 34px;
    margin: 8px 0;
}

.welcome p {
    color: var(--muted);
    max-width: 850px;
}

.status {
    display: inline-block;
    background: #F3F4F6;
    color: #555555;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    padding: 5px 12px;
    margin-top: 18px;
}

/* Dashboard Metric Cards */

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

.metric-card {
    background: white;
    padding: 24px;
    border-radius: 7px;
    border-top: 4px solid var(--niu-red);
    box-shadow: 0 2px 8px #0000000A;
}

.metric-card h3 {
    font-size: 14px;
    color: var(--muted);
}

.metric-value {
    font-size: 34px;
    font-weight: bold;
    color: var(--niu-red);
    margin: 10px 0;
}

.metric-card p {
    font-size: 12px;
    color: var(--muted);
}

/* Content Sections */

.content-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 25px;
    margin-bottom: 22px;
}

.content-card h2 {
    font-size: 22px;
    border-bottom: 2px solid var(--niu-red);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.content-card p {
    color: var(--muted);
}

/* Footer */

footer {
    background: var(--niu-black);
    color: white;
    padding: 30px 5%;
    text-align: center;
}

footer p {
    color: #BBBBBB;
    font-size: 12px;
    margin-top: 5px;
}

/* Responsive Layout */

@media (max-width: 1000px) {
    .metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-label {
        display: none;
    }
}

@media (max-width: 600px) {
    .metrics {
        grid-template-columns: 1fr;
    }

    .niu-logo {
        width: 70px;
        height: 70px;
    }

    .header-text h1 {
        font-size: 20px;
    }

    .welcome h2 {
        font-size: 25px;
    }

    .navigation a {
        padding: 12px;
        font-size: 12px;
    }
}


/* =========================================
   BUILDING CALCULATOR
   ========================================= */

.section-description {
    margin-bottom: 25px;
}

.form-heading {
    font-size: 17px;
    color: var(--niu-red);
    background: #F5F5F5;
    border-left: 4px solid var(--niu-red);
    padding: 12px 15px;
    margin: 25px 0 20px;
}

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

.input-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 10px;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #CCCCCC;
    border-radius: 5px;
    background: white;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--niu-red);
    box-shadow: 0 0 0 3px #BA0C2F15;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: #999999;
}

.input-group small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

.calculator-notice {
    background: #F5F5F5;
    border-left: 4px solid var(--niu-red);
    padding: 15px;
    margin: 25px 0;
    font-size: 13px;
    color: #555555;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

.primary-button,
.secondary-button {
    padding: 13px 25px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.primary-button {
    background: var(--niu-red);
    color: white;
    border: 1px solid var(--niu-red);
}

.primary-button:hover {
    background: var(--niu-dark-red);
}

.secondary-button {
    background: white;
    color: var(--text);
    border: 1px solid #CCCCCC;
}

.secondary-button:hover {
    background: #EEEEEE;
}

[hidden] {
    display: none !important;
}

@media (max-width: 700px) {
    .input-grid {
        grid-template-columns: 1fr;
    }

    .button-group button {
        width: 100%;
    }
}


/* =========================================
   ENGINEERING CALCULATION RESULTS
   ========================================= */

.results-panel {
    margin-top: 35px;
    border-top: 2px solid #BA0C2F;
    padding-top: 15px;
}

.results-panel h3 {
    margin-bottom: 12px;
}

#resultBuildingName {
    color: #BA0C2F;
    font-size: 20px;
}

#resultMethod {
    color: #666666;
    font-size: 13px;
    margin-bottom: 20px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.results-table th {
    background: #202020;
    color: white;
    text-align: left;
    padding: 14px;
}

.results-table td {
    padding: 14px;
    border-bottom: 1px solid #DDDDDD;
}

.results-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.results-table th:last-child {
    text-align: right;
}

.results-table tbody tr:nth-child(even) {
    background: #F5F5F5;
}

.results-table .total-row {
    background: #BA0C2F !important;
    color: white;
    font-weight: bold;
}

.calculation-breakdown {
    background: #F5F5F5;
    border: 1px solid #DDDDDD;
    border-left: 4px solid #BA0C2F;
    border-radius: 5px;
    padding: 20px;
    margin-top: 25px;
}

.calculation-breakdown h3 {
    font-size: 16px;
    color: #202020;
}

#formulaBreakdown {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: Consolas, monospace;
    font-size: 13px;
    line-height: 1.8;
    color: #333333;
}

@media (max-width: 700px) {

    .results-table {
        font-size: 12px;
    }

    .results-table td,
    .results-table th {
        padding: 10px;
    }

}

/* Cole Hall Building Presets */

.preset-panel {
    background: #f5f5f5;
    border-left: 3px solid #BA0C2F;
    padding: 16px;
    margin-bottom: 22px;
    border-radius: 4px;
}

.preset-panel p {
    font-size: 12px;
    color: #555;
    line-height: 1.6;
    margin-top: 10px;
    margin-bottom: 0;
}

.preset-panel button {
    margin: 0;
}

/* ==========================================
   STAGE 5 - BUILDING BENCHMARKING
   ========================================== */

.benchmark-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    margin-bottom: 20px;
}

.benchmark-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 850px;
}

.benchmark-table th {
    background: #BA0C2F;
    color: white;
    padding: 14px 10px;
    text-align: left;
    white-space: nowrap;
}

.benchmark-table td {
    padding: 14px 10px;
    border-bottom: 1px solid #dddddd;
    white-space: nowrap;
}

.benchmark-table tbody tr:nth-child(even) {
    background: #f5f5f5;
}

.benchmark-table tbody tr:hover {
    background: #eeeeee;
}

.empty-table {
    text-align: center;
    color: #777777;
    padding: 30px !important;
}

.remove-benchmark {
    background: transparent;
    border: 1px solid #BA0C2F;
    color: #BA0C2F;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.remove-benchmark:hover {
    background: #BA0C2F;
    color: white;
}


/* =========================================
   STAGE 5.2 - BENCHMARKING BUTTONS
   ========================================= */

.remove-building-btn {
    background-color: #ffffff;
    color: #ba0c2f;
    border: 1px solid #ba0c2f;
    padding: 7px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.remove-building-btn:hover {
    background-color: #ba0c2f;
    color: #ffffff;
}

#benchmarkTableBody tr:hover {
    background-color: #f5f5f5;
}

#benchmarkTableBody td {
    vertical-align: middle;
}

/* ========================================
   STAGE 6 - BENCHMARKING CHARTS
======================================== */

.benchmark-charts {
    margin-top: 30px;
    margin-bottom: 25px;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chart-card {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-top: 3px solid #C8102E;
    border-radius: 6px;
    padding: 20px;
    min-width: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.chart-card h4 {
    color: #222222;
    font-size: 15px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 260px;
}

.chart-full-width {
    grid-column: 1 / -1;
}

.chart-full-width .chart-container {
    height: 280px;
}

@media (max-width: 768px) {

    .chart-grid {
        grid-template-columns: 1fr;
    }

    .chart-full-width {
        grid-column: auto;
    }

    .chart-container {
        height: 240px;
    }

}

/* ========================================
   STAGE 7 - NIU CUSTOM MESSAGE WINDOW
======================================== */

.niu-modal {
    width: 480px;
    max-width: calc(100% - 32px);
    padding: 0;
    border: none;
    border-radius: 8px;
    background: #ffffff;
    color: #222222;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.35);
}

.niu-modal[open] {
    animation: niuModalAppear 0.2s ease-out;
}

.niu-modal::backdrop {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
}

.niu-modal-header {
    background: #C8102E;
    color: #ffffff;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 4px solid #222222;
}

.niu-modal-header img {
    width: 65px;
    height: 65px;
    object-fit: contain;
}

.niu-modal-header h3 {
    font-size: 17px;
    margin: 0 0 5px;
    color: #ffffff;
}

.niu-modal-header p {
    font-size: 11px;
    margin: 0;
    color: #ffffff;
}

.niu-modal-body {
    padding: 25px;
}

.niu-modal-body h2 {
    color: #C8102E;
    font-size: 21px;
    margin: 0 0 15px;
}

.niu-modal-body p {
    font-size: 14px;
    line-height: 1.7;
    color: #333333;
    margin: 0;
    white-space: pre-wrap;
}

.niu-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 25px;
    background: #f3f3f3;
    border-top: 1px solid #dddddd;
}

.niu-modal-footer button {
    min-width: 90px;
}

@keyframes niuModalAppear {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .niu-modal[open] {
        animation: none;
    }
}

/* =========================================
   STAGE 7 - CENTER NIU POP-UP
   ========================================= */

dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    margin: 0;
}

/* =========================================
   STAGE 7 - EXPORT AND PRINT REPORT
   ========================================= */

.button-group {
    flex-wrap: wrap;
}

#exportCalculationBtn,
#exportBenchmarkBtn,
#printReportBtn {
    border: 1px solid var(--niu-red);
    color: var(--niu-red);
    background: white;
    transition: 0.2s ease;
}

#exportCalculationBtn:hover,
#exportBenchmarkBtn:hover,
#printReportBtn:hover {
    background: var(--niu-red);
    color: white;
}

@media print {

    @page {
        size: A4;
        margin: 15mm;
    }

    body {
        background: white !important;
        color: black;
    }

    .navigation,
    .button-group,
    .remove-building-btn,
    dialog,
    button {
        display: none !important;
    }

    .content-card,
    .metric-card {
        box-shadow: none !important;
        break-inside: avoid;
    }

    .benchmark-table {
        width: 100%;
        font-size: 10px;
    }

    .benchmark-table th:last-child,
    .benchmark-table td:last-child {
        display: none;
    }

    canvas {
        max-width: 100% !important;
    }

    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

}
@media print {
 .benchmark-table { min-width: 0; }
 .benchmark-table th, .benchmark-table td { white-space: normal; padding: 5px; }
 .benchmark-table-wrapper { overflow: visible; }
 #benchmarking { break-inside: auto; }
 .chart-card { break-inside: avoid; }
}



/* =========================================
   STAGE 8.2 - SENSITIVITY ANALYSIS
   ========================================= */

.sensitivity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.sensitivity-card {
    background: white;
    border: 1px solid #dddddd;
    border-top: 4px solid var(--niu-red);
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px #0000000A;
}

.sensitivity-card h3 {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 15px;
}

.sensitivity-card div {
    font-size: 28px;
    font-weight: bold;
    color: var(--niu-red);
    overflow-wrap: anywhere;
}

.sensitivity-card p {
    font-size: 12px;
    color: var(--muted);
    margin-top: 10px;
}

.sensitivity-chart {
    position: relative;
    height: 320px;
    padding: 20px;
    border: 1px solid #dddddd;
    border-radius: 6px;
    margin-bottom: 25px;
}

#sensitivityResults[hidden] {
    display: none !important;
}

@media (max-width: 768px) {

    .sensitivity-grid {
        grid-template-columns: 1fr;
    }

    .sensitivity-chart {
        height: 280px;
    }

}


/* =========================================
   STAGE 8.2 - SENSITIVITY ANALYSIS
   ========================================= */

#sensitivityResults {
    margin-top: 25px;
}

#sensitivityResults[hidden] {
    display: none !important;
}

#sensitivityResults .chart-card {
    margin-top: 20px;
}

#sensitivityChart {
    max-height: 320px;
}

#sensitivityTableBody tr:nth-child(2) {
    background-color: #f3f4f6;
    font-weight: bold;
    color: #BA0C2F;
}

/* =========================================
   STAGE 9 - ENERGY CONSERVATION ANALYSIS
========================================= */

.conservation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 20px 0;
}

.conservation-card {
    background: white;
    border: 1px solid var(--border);
    border-top: 3px solid var(--niu-red);
    border-radius: 6px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 2px 6px #0000000A;
}

.conservation-card h3 {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 15px;
}

.conservation-card div {
    font-size: 28px;
    font-weight: bold;
    color: var(--niu-red);
    margin-bottom: 12px;
}

.conservation-card p {
    font-size: 12px;
    color: var(--muted);
}

.conservation-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
}

.conservation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.conservation-table th {
    background: var(--niu-red);
    color: white;
    padding: 14px 10px;
    text-align: left;
}

.conservation-table td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--border);
}

.conservation-table tbody tr:nth-child(even) {
    background: #F3F4F6;
}

.conservation-chart {
    height: 320px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin: 20px 0;
    background: white;
}

#conservationResults[hidden] {
    display: none !important;
}

@media (max-width: 650px) {

    .conservation-grid {
        grid-template-columns: 1fr;
    }

    .conservation-chart {
        height: 260px;
    }

}
/* ======================================== */
/* STAGE 10 - ENGINEERING METHODOLOGY */
/* ======================================== */

.methodology-container {
    margin-top: 20px;
    margin-bottom: 25px;
}

.methodology-item {
    border: 1px solid #dddddd;
    border-radius: 5px;
    margin-bottom: 12px;
    background: #ffffff;
    overflow: hidden;
}

.methodology-item summary {
    padding: 16px 18px;
    background: #f3f3f3;
    color: var(--niu-red);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-left: 3px solid var(--niu-red);
    transition: background 0.2s ease;
}

.methodology-item summary:hover {
    background: #e8e8e8;
}

.methodology-item[open] summary {
    border-bottom: 1px solid #dddddd;
}

.methodology-content {
    padding: 20px;
    font-size: 13px;
    line-height: 1.7;
    color: #333333;
}

.methodology-content p {
    margin-bottom: 12px;
}

.methodology-content h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #222222;
    font-size: 14px;
}

.methodology-content ul {
    padding-left: 22px;
}

.methodology-content li {
    margin-bottom: 8px;
}

.engineering-equation {
    background: #f5f5f5;
    border-left: 3px solid var(--niu-red);
    padding: 16px;
    margin: 15px 0;
    font-family: "Cambria Math", Georgia, serif;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    color: #222222;
    overflow-wrap: anywhere;
}

.methodology-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 13px;
}

.methodology-table th {
    background: var(--niu-red);
    color: white;
    padding: 12px;
    text-align: left;
}

.methodology-table td {
    padding: 12px;
    border-bottom: 1px solid #dddddd;
}

.methodology-table tbody tr:nth-child(even) {
    background: #f3f3f3;
}
/* ======================================== */
/* STAGE 10 - NAVIGATION IMPROVEMENTS */
/* ======================================== */

html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 25px;
}

.navigation a {
    transition: background-color 0.2s ease;
}
/* ========================================= */
/* STAGE 11 - STICKY NAVIGATION BAR           */
/* ========================================= */

.navigation {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #202020;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

section[id] {
    scroll-margin-top: 75px;
}

@media print {
    .navigation {
        display: none !important;
    }
}
/* ========================================= */
/* STAGE 11 - ACTIVE NAVIGATION STYLING       */
/* ========================================= */

.navigation a.active {
    background-color: #BA0C2F;
    color: #ffffff;
}

.navigation a:hover {
    background-color: #980A26;
    color: #ffffff;
}
/* ========================================== */
/* STAGE 11 - ENGINEERING REPORT GENERATOR    */
/* ========================================== */

#reports {
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 25px;
    box-sizing: border-box;
}

#reports h2 {
    color: #111111;
    font-size: 22px;
    border-bottom: 1px solid #BA0C2F;
    padding-bottom: 14px;
    margin-top: 0;
}

#reports .section-description {
    color: #555f6d;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 25px;
}

/* Report section headings */

#reports .section-heading {
    background: #f3f3f3;
    color: #BA0C2F;
    border-left: 3px solid #BA0C2F;
    padding: 15px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 20px;
}

/* Report information grid */

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

#reports .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#reports .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #222222;
}

/* Report input fields */

#reports input[type="text"],
#reports input[type="date"],
#reports textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background: #ffffff;
    font-family: inherit;
    font-size: 13px;
    box-sizing: border-box;
}

#reports input:focus,
#reports textarea:focus {
    outline: none;
    border-color: #BA0C2F;
    box-shadow: 0 0 0 2px rgba(186, 12, 47, 0.10);
}

#reports textarea {
    resize: vertical;
    min-height: 120px;
}

/* Report content selection */

.report-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.report-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: #f8f8f8;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.report-option:hover {
    background: #f0f0f0;
    border-color: #BA0C2F;
}

.report-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    accent-color: #BA0C2F;
}

/* Report action buttons */

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
    margin-bottom: 25px;
}

.report-primary-btn,
.report-secondary-btn {
    padding: 12px 20px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.report-primary-btn {
    background: #BA0C2F;
    color: #ffffff;
    border: 1px solid #BA0C2F;
}

.report-primary-btn:hover {
    background: #980a26;
}

.report-secondary-btn {
    background: #ffffff;
    color: #222222;
    border: 1px solid #cccccc;
}

.report-secondary-btn:hover:not(:disabled) {
    background: #f0f0f0;
}

.report-secondary-btn:disabled {
    background: #eeeeee;
    color: #999999;
    border-color: #dddddd;
    cursor: not-allowed;
}

/* Engineering notice */

.report-notice {
    background: #f3f3f3;
    border-left: 3px solid #BA0C2F;
    padding: 15px;
    font-size: 12px;
    line-height: 1.7;
    color: #444444;
}

/* Generated report preview */

#reportPreview {
    margin-top: 30px;
}

#reportPreview[hidden] {
    display: none !important;
}

#reportDocument {
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    padding: 35px;
    overflow-wrap: break-word;
}

/* Responsive report layout */

@media (max-width: 768px) {

    .report-input-grid,
    .report-options {
        grid-template-columns: 1fr;
    }

    .report-actions {
        flex-direction: column;
    }

    .report-actions button {
        width: 100%;
    }

    #reports {
        padding: 16px;
    }

    #reportDocument {
        padding: 18px;
    }

}

/* ========================================== */
/* STAGE 11 - GENERATED REPORT DOCUMENT       */
/* ========================================== */

.engineering-report-header {
    border-bottom: 3px solid #BA0C2F;
    padding-bottom: 25px;
    margin-bottom: 25px;
}

.report-university {
    color: #BA0C2F;
    font-size: 22px;
    font-weight: 700;
}

.report-department {
    font-size: 12px;
    color: #555555;
    margin-top: 5px;
}

.engineering-report-header h1 {
    font-size: 26px;
    color: #222222;
    margin-top: 30px;
    margin-bottom: 10px;
}

.engineering-report-header p {
    font-size: 13px;
    color: #666666;
}

.generated-report-section {
    margin-top: 30px;
    margin-bottom: 30px;
}

.generated-report-section h3 {
    background: #f3f3f3;
    color: #BA0C2F;
    border-left: 3px solid #BA0C2F;
    padding: 12px;
    font-size: 15px;
}

.generated-report-section p {
    font-size: 13px;
    line-height: 1.8;
    color: #333333;
}

.engineering-report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 13px;
}

.engineering-report-table th {
    background: #BA0C2F;
    color: #ffffff;
    padding: 12px;
    text-align: left;
}

.engineering-report-table td {
    padding: 12px;
    border-bottom: 1px solid #dddddd;
    overflow-wrap: anywhere;
}

.engineering-report-table tr:nth-child(even) {
    background: #f3f3f3;
}

.engineering-report-table td:first-child {
    width: 55%;
    font-weight: 500;
}

.engineering-report-footer {
    background: #f3f3f3;
    border-left: 3px solid #BA0C2F;
    padding: 15px;
    margin-top: 35px;
    font-size: 12px;
    line-height: 1.7;
}

#reportPreview {
    scroll-margin-top: 80px;
}

/* ========================================= */
/* STAGE 11 - REPORT BENCHMARKING TABLE       */
/* ========================================= */

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 12px;
}

.report-table thead th {
    background-color: #BA0C2F;
    color: #ffffff;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
}

.report-table tbody td {
    padding: 12px 8px;
    border-bottom: 1px solid #d9d9d9;
    text-align: left;
}

.report-table tbody tr:nth-child(even) {
    background-color: #f1f1f1;
}

.report-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

@media print {
    .report-table {
        font-size: 10px;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .report-table thead {
        display: table-header-group;
    }

    .report-table tr {
        break-inside: avoid;
    }
}
/* ========================================= */
/* STAGE 11 - ENGINEERING REPORT CHARTS       */
/* ========================================= */

.report-chart {
    width: 100%;
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #ffffff;
    box-sizing: border-box;
    text-align: center;
}

.report-chart img {
    display: block;
    width: 100%;
    max-width: 750px;
    height: auto;
    margin: 0 auto;
}

.report-chart-caption {
    font-size: 11px;
    color: #666666;
    margin-top: 12px;
    text-align: center;
}

@media print {

    .report-chart {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .report-chart img {
        max-width: 100%;
    }

}

/* ============================================
   ENGINEERING REPORT METHODOLOGY
   ============================================ */

.report-methodology-heading {
    font-size: 15px;
    font-weight: 700;
    color: #BA0C2F;
    margin-top: 24px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dddddd;
}

.report-methodology-content {
    margin-bottom: 20px;
    line-height: 1.6;
}

.report-methodology-content p {
    margin: 8px 0;
}

.report-methodology-content h4 {
    font-size: 13px;
    color: #333333;
    margin-top: 16px;
    margin-bottom: 8px;
}

.report-methodology-content .engineering-equation {
    background: #f5f5f5;
    border-left: 3px solid #BA0C2F;
    padding: 16px;
    margin: 14px 0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    break-inside: avoid;
}

.report-methodology-content ul {
    padding-left: 24px;
    margin: 12px 0;
}

.report-methodology-content li {
    margin-bottom: 6px;
}

.report-methodology-heading {
    break-after: avoid;
}

/* MathJax Engineering Equation Formatting */

.engineering-equation mjx-container {
    font-size: 125% !important;
    margin: 12px 0 !important;
}

.engineering-equation {
    overflow-x: auto;
}

@media print {
    .engineering-equation {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* V2 workspace */
body{min-height:100vh;display:flex;flex-direction:column}.niu-header{padding:16px max(24px,calc((100vw - 1320px)/2));gap:18px;border-bottom:3px solid #900925}.niu-logo{width:82px;height:82px}.header-text h1{font-size:26px}.header-text p{font-size:13px}.project-label{font-size:12px;white-space:nowrap}.navigation{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:0 max(16px,calc((100vw - 1320px)/2));z-index:30}.navigation a{white-space:nowrap;flex:0 0 auto;padding:16px 17px;font-size:13px;border-bottom:3px solid transparent}.navigation a.active{border-bottom-color:#f9a3b3;background:#BA0C2F}.navigation a:focus-visible,button:focus-visible{outline:3px solid #5087c6;outline-offset:-3px}.container{width:100%;max-width:1360px;padding:28px 24px 90px;flex:1;min-width:0}.workspace-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.eyebrow{font-size:11px!important;font-weight:700;letter-spacing:1.5px;color:var(--niu-red)!important}.workspace-top h2{font-size:28px;letter-spacing:-.65px;line-height:1.25;margin:5px 0}.workspace-top p:not(.eyebrow){font-size:14px;color:var(--muted)}.workspace-meta{display:flex;flex-direction:column;align-items:flex-end;gap:5px;font-size:13px;white-space:nowrap}#stepCount{font-weight:700}#baselineStatus{font-size:12px;color:#596271;white-space:normal;text-align:right}#baselineStatus.ready{color:#216345}.step-progress{height:5px;background:#e0e3e8;border-radius:8px;overflow:hidden;margin:16px 0 25px}#stepProgress{height:100%;background:var(--niu-red);transition:width .25s ease;border-radius:8px}.wizard-page{min-width:0}.slide-forward{animation:slideForward .24s ease-out}.slide-back{animation:slideBack .24s ease-out}@keyframes slideForward{from{opacity:.2;transform:translateX(24px)}to{opacity:1;transform:translateX(0)}}@keyframes slideBack{from{opacity:.2;transform:translateX(-24px)}to{opacity:1;transform:translateX(0)}}.wizard-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0;border-top:1px solid var(--border)}#wizardHint{font-size:12px;text-align:center;color:var(--muted)}button:disabled{opacity:.5;cursor:not-allowed}.start-panel{display:flex;align-items:center;justify-content:space-between;gap:18px;background:white;border:1px solid var(--border);border-radius:9px;padding:25px;margin:16px 0 24px}.start-panel h3{font-size:21px;margin:6px 0}.start-panel p:not(.eyebrow){font-size:14px;color:var(--muted)}.start-panel button{flex-shrink:0}.welcome{border-radius:10px;padding:32px}.content-card,#reports{border-radius:10px;box-shadow:0 3px 14px #182b4510}.metric-card{min-width:0}.metric-value{font-size:clamp(22px,2.5vw,34px);overflow-wrap:anywhere}.input-group,.form-group,.chart-card{min-width:0}.input-group input,.input-group select,.input-group textarea,#reports input[type=text],#reports input[type=date],#reports textarea{min-width:0;min-height:44px;font-size:16px}.input-group label,.form-group label{line-height:1.4}.input-group label:has(+ [required])::after,.form-group label:has(+ [required])::after{content:' *';color:var(--niu-red)}.preset-panel{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.preset-panel p{width:100%;margin:0}.field-error{color:#a10c25!important;font-weight:600;font-size:12px!important;margin-top:2px}.invalid-field{border:2px solid #b00020!important;background:#fff5f6!important;box-shadow:0 0 0 2px #ba0c2f12}.validation-summary{padding:12px 15px;border:1px solid #e4a1ae;background:#fff3f5;color:#9e1029;border-radius:6px;font-size:13px;margin:0 0 16px}.conservation-card div{overflow-wrap:anywhere}.conservation-table{min-width:570px}.benchmark-table-wrapper,.conservation-table-wrapper{overscroll-behavior-x:contain}.engineering-equation{max-width:100%;overflow:auto}.report-methodology-content table{max-width:100%}#reportDocument{overflow-x:auto;min-width:0}#reportDocument td,#reportDocument th{overflow-wrap:anywhere}.report-table th,.report-table td{white-space:normal}.chart-container,.sensitivity-chart,.conservation-chart{overflow:hidden}.chart-container canvas,.sensitivity-chart canvas,.conservation-chart canvas{display:block;max-width:100%;max-height:100%}.report-chart img{height:auto}.generated-report-section h3{margin-bottom:10px}.generated-report-section p{margin:7px 0}.niu-modal{max-height:calc(100dvh - 28px);overflow-y:auto}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Victor */
.victor-launch{position:fixed;right:22px;bottom:20px;z-index:40;border:none;border-radius:60px;background:#202020;color:white;padding:7px 20px 7px 8px;display:flex;gap:10px;align-items:center;box-shadow:0 6px 22px #0004;cursor:pointer;font-size:14px;font-weight:700;text-align:left}.victor-launch img{width:50px;height:50px;object-fit:contain;background:white;border-radius:50%}.victor-launch-sub{display:block;font-size:11px;font-weight:400;color:#e0e0e0}.victor-panel{position:fixed;right:22px;bottom:94px;width:400px;max-width:calc(100vw - 24px);height:min(620px,calc(100dvh - 116px));z-index:41;background:white;border:1px solid #d8dce1;border-radius:14px;overflow:hidden;box-shadow:0 15px 55px #0004;display:flex;flex-direction:column}.victor-header{display:flex;align-items:center;gap:10px;background:var(--niu-red);color:white;padding:13px}.victor-header img{width:58px;height:58px;object-fit:contain;background:white;border-radius:9px}.victor-header strong{font-size:17px}.victor-header span{display:block;font-size:11px;color:#fff}.victor-header button{margin-left:auto;background:transparent;color:white;border:none;font-size:26px;min-width:36px;min-height:36px;cursor:pointer}.victor-context{font-size:12px;padding:9px 14px;background:#f0f2f5;border-bottom:1px solid #e0e3e8;color:#404858}.victor-messages{padding:14px;flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.victor-message{font-size:13px;line-height:1.5;padding:10px 12px;border-radius:10px;max-width:92%;white-space:pre-wrap;overflow-wrap:anywhere}.victor-message.assistant{background:#f0f2f5;align-self:flex-start}.victor-message.user{background:var(--niu-red);color:white;align-self:flex-end}.victor-prompts{padding:8px 12px;display:flex;flex-wrap:wrap;gap:6px}.victor-prompts button{font-size:11px;color:var(--niu-red);border:1px solid #dcc0c7;border-radius:18px;background:white;padding:6px 9px;cursor:pointer;min-height:32px}.victor-panel form{display:flex;gap:8px;padding:8px 12px}.victor-panel form input{flex:1;min-width:0;border:1px solid #c9cdd4;border-radius:6px;padding:10px;font-size:16px}.victor-panel form button{padding:10px 14px}.victor-settings{padding:6px 12px 12px;font-size:11px;color:#596271}.victor-settings label{display:flex;align-items:center;gap:6px;margin:4px 0}.victor-settings p{margin-top:5px}.victor-settings input{accent-color:var(--niu-red)}
@media(max-width:768px){.niu-header{padding:12px 16px;gap:10px}.niu-logo{width:60px;height:60px}.header-text h1{font-size:19px}.header-text p{font-size:11px}.navigation{padding:0 8px}.navigation a{font-size:12px;padding:13px 12px}.container{padding:20px 12px 88px}.workspace-top{align-items:flex-start}.workspace-top h2{font-size:22px}.workspace-top p:not(.eyebrow){font-size:12px}.workspace-meta{font-size:12px;max-width:40%}.content-card,#reports{padding:16px}.welcome{padding:20px}.welcome h2{font-size:25px}.welcome p{font-size:14px}.start-panel{flex-direction:column;align-items:stretch;padding:18px}.start-panel button{width:100%}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric-card{padding:13px}.metric-card h3{font-size:12px}.metric-card p{font-size:11px}.metric-value{font-size:21px}.wizard-controls{gap:8px;flex-wrap:wrap}.wizard-controls button{flex:1;padding:11px 12px;min-height:44px}#wizardHint{order:3;width:100%}.preset-panel button{width:100%}.form-heading{font-size:15px}.input-grid{gap:12px}.report-table{font-size:11px}.report-table th,.report-table td{padding:7px 4px}.engineering-report-table th,.engineering-report-table td{padding:8px;font-size:12px}#reportDocument{padding:12px}.engineering-report-header h1{font-size:22px}.methodology-content{padding:12px}.engineering-equation{padding:10px;font-size:13px}.victor-launch{bottom:12px;right:12px;padding:6px 12px 6px 6px}.victor-launch img{width:40px;height:40px}.victor-panel{right:12px;bottom:74px;height:min(600px,calc(100dvh - 90px))}.button-group button,.report-actions button{min-height:44px}}
@media(max-width:390px){.workspace-top{flex-wrap:wrap}.workspace-meta{flex-direction:row;align-items:center;max-width:100%;white-space:normal}.metric-card h3{min-height:36px}.metric-value{font-size:19px}.victor-panel{left:8px;right:8px;width:auto;max-width:none}.report-table{font-size:10px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.slide-forward,.slide-back{animation:none}#stepProgress{transition:none}}
@media print{@page{size:letter portrait;margin:.5in}body{display:block!important;background:white!important;color:black!important}.victor-panel,.victor-launch,.workspace-top,.step-progress,.wizard-controls,.validation-summary,.field-error,.navigation,button,footer{display:none!important}.container{padding:0!important;width:100%!important;max-width:none!important;margin:0!important}.wizard-page{animation:none!important;transform:none!important}.content-card,#reports{padding:0!important;border:0!important;box-shadow:none!important;break-inside:auto!important}.chart-card,.report-chart,.engineering-equation,tr{break-inside:avoid}.benchmark-table-wrapper,.conservation-table-wrapper,#reportDocument{overflow:visible!important}.conservation-table,.benchmark-table{min-width:0!important}.benchmark-table th,.benchmark-table td{white-space:normal!important}.report-table th,.report-table td{font-size:9pt!important}.engineering-report-table th,.engineering-report-table td{font-size:10pt!important}.generated-report-section h3,h4{break-after:avoid}.report-table thead,.engineering-report-table thead{display:table-header-group}.engineering-equation mjx-container{font-size:100%!important}.niu-header{padding:12px 16px!important}.niu-logo{width:60px;height:60px}.project-label{display:none}body[data-print-mode=report] .niu-header,body[data-print-mode=report] .wizard-page:not([data-page=reports]){display:none!important}body[data-print-mode=report] [data-page=reports]{display:block!important}body[data-print-mode=report] #reports > :not(#reportPreview),body[data-print-mode=report] #reportPreview > :not(#reportDocument){display:none!important}body[data-print-mode=report] #reportPreview{margin:0!important}body[data-print-mode=report] #reportDocument{padding:0!important;margin:0!important;border:0!important;width:100%!important}body[data-print-mode=benchmark] .wizard-page:not([data-page=benchmarking]){display:none!important}body[data-print-mode=benchmark] [data-page=benchmarking]{display:block!important}#sensitivity .benchmark-table th:last-child,#sensitivity .benchmark-table td:last-child{display:table-cell!important}}

html{scroll-padding-bottom:90px}.victor-message{flex-shrink:0}@media(min-width:769px){.start-panel{padding-right:190px}}
@media print{html{scroll-padding-bottom:0}}
