/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Container Layout */
.container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}



.exit-report-btn:hover {
    background-color: #c0392b;
}

/* Sidebar */
.sidebar {
    width: 200px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    padding: 00px 0 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.logo {
    padding: 0 7px 0px 10px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
}

.logo img {
    width: 100%;
    height: auto;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 2px;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item a:hover {
    background-color: #f8f9fa;
    color: #333;
}

.nav-item.active a {
    background-color: #e3f2fd;
    color: #1976d2;
    border-left-color: #1976d2;
}

.nav-item .icon {
    margin-right: 8px;
    font-size: 12px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 200px;
    padding: 0px 10px 10px 10px;
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
    width:100%;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.page-header h1 .icon {
    margin-right: 12px;
    font-size: 24px;
}
.button {
    width:300px;
    text-align: center;
    padding:15px; 
    background-color: #0056b3;
    color:white;
    text-decoration:none;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    z-index: 900;
    transition: background-color 0.3s ease;
}
.button a {
    color: white;
}
.button:hover {
    width:310px;
    padding:15px; 
    background-color: #0096f3;
    color:white;
    text-decoration:none;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    z-index: 900;
    transition: background-color 0.3s ease;
}
/* Exit Report Button */
.exit-report-btn {
    position: relative;
    top: 0px; 
    margin-right: 0px;
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    z-index: 900;
    transition: background-color 0.3s ease;
}
.report-id {
    font-size: 14px;
    color: #666;
    font-family: 'Courier New', monospace;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Site Information Card */
.site-info-card {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.site-info-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.detail-row {
    display: flex;
    margin-bottom: 12px;
}

.detail-row .label {
    font-weight: 600;
    min-width: 120px;
    color: #555;
}

.detail-row .value {
    color: #333;
    word-break: break-all;
}

/* Timeline */
.timeline-section {
    margin-top: 20px;
}

.timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.timeline-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.timeline-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    margin-bottom: 8px;
    opacity: 100%;
}

.timeline-dot.active {
    background: #333;
    width: 30px;
    height: 30px;
}

.timeline-label {
    text-align: center;
    font-size: 12px;
}

.timeline-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.timeline-date {
    color: #666;
    margin-bottom: 2px;
}

.timeline-note {
    color: #999;
    font-style: italic;
}

/* Report Summary Card */
.report-summary-card {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-radius: 12px;
    padding: 14px;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.report-summary-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.summary-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px;
    backdrop-filter: blur(10px);
}

.summary-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.info-icon {
    margin-right: 8px;
    font-size: 12px;
}

.summary-title {
    font-weight: 600;
    font-size: 12px;
}

.summary-value {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.summary-value.large {
    font-size: 16px;
}

.summary-note {
    font-size: 8px;
    opacity: 0.9;
    line-height: 1.4;
}

.summary-metrics {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.metric {
    text-align: center;
    margin-left: 15px;
}

.metric-value {
    font-size: 14px;
    font-weight: 700;
}

.metric-label {
    font-size: 8px;
    opacity: 0.9;
}
/*
.conductivity-chart {
    margin-top: 8px;
}

.chart-placeholder {
    height: 60px;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 8px;
}

.chart-line {
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    margin: 20px 0;
    position: relative;
}
*/
        .charts-container {
            display: flex;
            flex-direction: column;
            gap: 30px;
        }
        .chart-section {
            background: white;
            border-radius: 8px;
            padding: 7px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);

            height: 200px;
            display: flex;
            flex-direction: column;
        }

        .chart-section h3 {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 20px;
            color: #333;
            text-align: center;
            flex-shrink: 0;
        }
        .chart-wrapper {
            position: relative;
            flex: 1;
            min-height: 0; /* Important for flex child */
            width: 100%;
            height: 200px; /* Fixed height */
            overflow: hidden; /* Prevent any overflow */
        }
        .chart-section canvas {
            max-width: 100%;
            height: 200px;
            width: 100%;
            height: 100%;
        }
.chart-values {
    display: flex;
    justify-content: space-between;
    font-size: 6px;
    margin-bottom: 4px;
}

.value-up {
    color: #4CAF50;
}

.value-down {
    color: #f44336;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 7px;
    opacity: 0.8;
}

.summary-footer {
    text-align: center;
    font-size: 12px;
    opacity: 0.9;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 16px;
}

/* Range Selector */
.range-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.range-selector span {
    font-weight: 600;
    color: #555;
}

.range-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.range-btn.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.range-btn:hover:not(.active) {
    background: #f5f5f5;
}

/* Chemistry Grid */
.chemistry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    z-index: 1;
}

.chemistry-section {
    background: lightgrey;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.chemistry-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #333;
}

/*
.data-table {
    width: 100%;
}

.table-header {
    
    padding: 8px 0;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.table-row:last-child {
    border-bottom: none;
}
.status-great {
    color: #4CAF50;
    font-weight: 600;
}

.status-ok {
    color: #2196F3;
    font-weight: 600;
}*/

.arrow-indicator {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #4a90e2;
    font-weight: bold;
}

/* Water Meters Grid */
.water-meters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.water-meter-card {
    background: lightgrey;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.meter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.meter-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.meter-icon {
    font-size: 24px;
}

.status-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.status-badge.not-installed {
    background: #ffebee;
    color: #c62828;
}

.status-badge.not-available {
    background: #fff3e0;
    color: #ef6c00;
}

.meter-details {
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 11px;
    color: #555;
}

.detail-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.detail-sublabel {
    font-size: 10px;
    color: #777;
    margin-top: 2px;
}

.chart-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.chart-area {
    height: 120px;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 8px 0;
}

.chart-axis {
    text-align: center;
    font-size: 12px;
    color: #666;
}

.axis-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Switch Section */
.switch-section {
    text-align: center;
    margin-bottom: 30px;
}

.switch-btn {
    padding: 12px 24px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.switch-btn:hover {
    background: #e0e0e0;
}

/* Evaporation Card */
.evaporation-card {
    background: lightgrey;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.evaporation-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.evaporation-formula {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.evaporation-calculation {
    font-size: 14px;
    color: #777;
}

/* Pressure Grid */
.pressure-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.pressure-item {
    background: lightgrey;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.pressure-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.pressure-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.pressure-readings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.reading-row:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-grid,
    .tube-grid,
    .tube-grid_before,
    .chemistry-grid,
    .water-meters-grid {
        grid-template-columns: 1fr;
    }
    
    .pressure-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 15px 30px 15px;
    }
    .chart-section {
        height: 350px;
    }
    
    .chart-wrapper {
        height: 250px;
    }
    .pressure-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-metrics {
        justify-content: center;
    }

    .tube-grid {

        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
    .tube-grid_before {

        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
}

/* Additional Pages Styles */
.corrosion-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.corrosion-item {
    background: lightgrey;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}
.status-indicators {
    background: white;
    border-radius: 12px;
    padding: 20px;
    width: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: left;
}
.corrosion-header {
    margin-bottom: 16px;
}

.corrosion-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

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

.tower-item {
    background: lightgrey;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tower-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tower-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.status-badge.installed {
    background: #e8f5e8;
    color: #2e7d32;
}

.before-after {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.before-after span {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.service-note {
    text-align: center;
    font-size: 12px;
    color: #ff6b35;
    margin-top: 8px;
    font-style: italic;
}

/* Bioanalysis Styles */
.bioanalysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.bioanalysis-card {
    background: #fafafa;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bioanalysis-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.visual-guide {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.guide-item {
    text-align: center;
    flex: 1;
}

.guide-sample {
    width: 40px;
    height: 60px;
    margin: 0 auto 8px;
    border-radius: 4px;
    background: linear-gradient(to bottom, #ffcdd2, #f8bbd9);
}

.guide-label {
    font-size: 10px;
    color: #666;
}

.dipslide-section {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 16px;
}

.dipslide-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.dipslide-action {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    text-decoration: underline;
}

.measurement-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.measurement-value {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #555;
}

.historic-chart {
    height: 120px;
    background: #f8f9fa;
    border-radius: 4px;
    position: relative;
    margin-top: 12px;
}

.chart-trend-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #1976d2;
}

.chart-range-area {
    position: absolute;
    top: 30%;
    left: 10%;
    right: 10%;
    height: 40%;
    background: rgba(25, 118, 210, 0.1);
    border-radius: 2px;
}

.chart-labels-bottom {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 10%;
    font-size: 10px;
    color: #666;
}

.chart-y-axis {
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 10px;
    color: #666;
}
/*
.skid-selection-section {
    
}

.tube-selector {

}

.tube-dropdown{

}
*/
.tube-grid {
    max-width: 300px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.tube-grid_before {
    max-width: 300px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.tube-number{
    max-width: 50px;
}
.tube-number_before {
    max-width: 50px;
}

.custom-upload-button {
        display: inline-block;
        padding: 10px 20px;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-family: sans-serif;
        text-align: center;
        text-decoration: none;
        transition: background-color 0.3s ease;
    }

.custom-upload-button:hover {
    background-color: #0056b3;
}
input[type="file"]::file-selector-button {
        background-color: #28a745;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 4px;
        cursor: pointer;
        transition: background-color 0.3s ease;
        height: 80px;
    }

input[type="file"]::file-selector-button:hover {
    background-color: #218838;
}

table {
    border-bottom: 1px solid grey;
    width: auto;
}
table td {
    min-width: 100px;
    padding:2px;
}
#notif_item{
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-radius: 12px;
    padding: 24px;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}
.menu_tab {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-radius: 12px;
    padding: 24px;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}
.menu_buttons{
    background: linear-gradient(135deg, #8a99e2 0%, #357abd 100%);
    border-radius: 12px;
    padding: 24px;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}
.menu_buttons:hover{
    background: linear-gradient(135deg, #9a99e2 0%, #357abd 100%);
}
.sub_menu_tab {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-radius: 12px;
    padding: 15px;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}
.sub_menu_buttons{
    background: linear-gradient(135deg, #8a99e2 0%, #357abd 100%);
    border-radius: 12px;
    padding: 12px;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}
.sub_menu_buttons:hover{
    background: linear-gradient(135deg, #9a99e2 0%, #357abd 100%);
}
