/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
    background-color: #f8f9fa;
    color: #20b2aa;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border: 1px solid #e6e6e6;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-radius: 8px;
}

/* Header Section */
.header-section {
    background: linear-gradient(135deg, #e8f9f8 0%, #d4f4f1 100%);
    color: #000000;
    padding: 15px 20px;
    border-bottom: 3px solid #5fd3d0;
}

.header-section h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000000;
}

.header-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-group label {
    font-weight: bold;
    font-size: 12px;
    color: #000000;
    text-transform: uppercase;
}

.info-group input {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    background: white;
    color: #000000;
}

/* Remove spinners from header number inputs */
.info-group input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.info-group input[type="number"]::-webkit-outer-spin-button,
.info-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Section Styling */
.section {
    border: 1px solid #d1ecf1;
    margin: 0;
    background: white;
}

.section-title {
    background: #b3e0dd;
    border-bottom: 2px solid #5fd3d0;
    padding: 10px 15px;
    font-weight: bold;
    font-size: 16px;
    color: #2d5a58;
    text-transform: none;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-bottom: 1px solid #d1ecf1;
}

.form-group {
    border-right: 1px solid #d1ecf1;
    border-bottom: 1px solid #d1ecf1;
    display: flex;
    align-items: center;
    min-height: 40px;
}

.form-group:nth-child(2n) {
    border-right: none;
}

.form-group label {
    background: #f8f9fa;
    border-right: 1px solid #d1ecf1;
    padding: 10px 12px;
    font-weight: bold;
    font-size: 12px;
    color: #000000;
    min-width: 180px;
    height: 100%;
    display: flex;
    align-items: center;
}

.form-group input,
.form-group select {
    flex: 1;
    border: none;
    padding: 10px 12px;
    font-size: 14px;
    background: white;
    color: #000000;
    height: 100%;
    outline: none;
}

/* Remove spinners from form group number inputs */
.form-group input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.form-group input:focus,
.form-group select:focus {
    background: #f0f8ff;
}

/* Time Point Controls */
.timepoint-controls {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 12px 15px;
    margin-bottom: 0;
    border-bottom: none;
}

.control-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.control-label {
    font-weight: bold;
    color: #495057;
    font-size: 14px;
}

.btn-timepoint {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-timepoint:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.control-note {
    font-size: 11px;
    color: #6c757d;
    font-style: italic;
}

/* Sample Data Section */
.sample-data-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.sample-data-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn-sample {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-sample:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-sample:active {
    transform: translateY(0);
}

/* Data Section */
.data-section {
    margin: 0;
    border-top: 1px solid #d1ecf1;
}

.data-title {
    background: linear-gradient(135deg, #5fd3d0 0%, #4fc3d7 100%);
    color: white;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    text-transform: uppercase;
}

.table-wrapper {
    overflow-x: auto; /* Always allow horizontal scroll if needed */
    border-bottom: 1px solid #d1ecf1;
    width: 100%;
    min-width: fit-content;
}

/* Table Styling */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: white;
    table-layout: auto; /* Changed from fixed to auto to allow proper width calculation */
    min-width: fit-content;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e6e6e6;
}

.data-table th {
    background: #b3e0dd;
    border: 1px solid #d1ecf1;
    padding: 10px 6px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: #000000;
    white-space: nowrap;
}

.data-table td {
    border: 1px solid #d1ecf1;
    padding: 4px;
    text-align: center;
    background: white;
    height: 35px;
}

.data-table tr:nth-child(even) td {
    background: #f8f9fa;
}

/* Column Widths - Responsive based on number of units */
.time-header,
.time-cell {
    width: 80px !important;
    min-width: 80px !important;
}

/* Time column styling */
.time-cell {
    text-align: center;
    vertical-align: middle;
}

.time-input {
    width: 100%;
    max-width: 50px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    padding: 4px 2px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
}

/* Selection column styling */
.selection-header,
.selection-cell {
    width: 50px !important;
    min-width: 50px !important;
    text-align: center;
    vertical-align: middle;
}

.time-selection-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #20b2aa;
    margin: 0;
}

/* Visual indicators for included/excluded time points */
.timepoint-included {
    background-color: rgba(32, 178, 170, 0.05) !important;
}

.timepoint-excluded {
    background-color: rgba(220, 53, 69, 0.05) !important;
}

.timepoint-excluded .data-input,
.timepoint-excluded .calculated-field {
    color: #000000 !important;
    font-style: normal;
}

.data-header,
.data-cell {
    width: 80px !important;
    min-width: 80px !important;
}

.stats-header,
.stats-cell {
    width: 60px !important;
    min-width: 60px !important;
}

/* Responsive table classes for different unit counts */
.table-6-units .data-header,
.table-6-units .data-cell {
    width: 80px !important;
    min-width: 80px !important;
}

.table-6-units .stats-header,
.table-6-units .stats-cell {
    width: 60px !important;
    min-width: 60px !important;
}

.table-6-units .time-header,
.table-6-units .time-cell {
    width: 60px !important;
    min-width: 60px !important;
}

.table-6-units .selection-header,
.table-6-units .selection-cell {
    width: 40px !important;
    min-width: 40px !important;
}

.table-12-units .data-header,
.table-12-units .data-cell {
    width: 55px !important;
    min-width: 55px !important;
}

.table-12-units .stats-header,
.table-12-units .stats-cell {
    width: 45px !important;
    min-width: 45px !important;
}

.table-12-units .time-header,
.table-12-units .time-cell {
    width: 70px !important;
    min-width: 70px !important;
}

.table-18-units .data-header,
.table-18-units .data-cell {
    width: 40px !important;
    min-width: 40px !important;
}

.table-18-units .stats-header,
.table-18-units .stats-cell {
    width: 35px !important;
    min-width: 35px !important;
}

.table-18-units .time-header,
.table-18-units .time-cell {
    width: 60px !important;
    min-width: 60px !important;
}

.table-24-units .data-header,
.table-24-units .data-cell {
    width: 35px !important;
    min-width: 35px !important;
}

.table-24-units .stats-header,
.table-24-units .stats-cell {
    width: 30px !important;
    min-width: 30px !important;
}

.table-24-units .time-header,
.table-24-units .time-cell {
    width: 55px !important;
    min-width: 55px !important;
}

/* Input Styling in Tables */
.data-table input {
    width: 100%;
    border: none;
    padding: 4px 6px;
    text-align: center;
    font-size: 13px;
    background: white;
    color: black;
    height: 30px;
    outline: none;
}

/* Responsive font sizes for different unit counts */
.table-6-units input {
    font-size: 12px;
    padding: 4px 5px;
    height: 32px;
}

.table-6-units th,
.table-6-units td {
    padding: 8px 4px;
    font-size: 12px;
}

.table-12-units input {
    font-size: 11px;
    padding: 3px 4px;
    height: 28px;
}

.table-12-units th,
.table-12-units td {
    padding: 6px 2px;
    font-size: 11px;
}

.table-18-units input {
    font-size: 10px;
    padding: 2px 3px;
    height: 26px;
}

.table-18-units th,
.table-18-units td {
    padding: 4px 1px;
    font-size: 10px;
}

.table-24-units input {
    font-size: 9px;
    padding: 2px 2px;
    height: 24px;
}

.table-24-units th,
.table-24-units td {
    padding: 3px 1px;
    font-size: 9px;
}

/* Remove number input spinners/arrows */
.data-table input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
    appearance: textfield; /* Standard */
}

.data-table input[type="number"]::-webkit-outer-spin-button,
.data-table input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Chrome, Safari, Edge */
    appearance: none; /* Standard */
    margin: 0;
}

.data-table input:focus {
    background: white;
    color: black;
    border: 2px solid #5fd3d0;
    border-radius: 2px;
}

.data-table input.time-input {
    background: white;
    font-weight: bold;
    color: black;
}

.data-table input.calculated-field {
    background: white;
    color: black;
    font-weight: bold;
    cursor: default;
}

.data-table input.calculated-field:focus {
    background: white;
    color: black;
    border: none;
}

/* Results Section */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-bottom: 1px solid #d1ecf1;
}

.result-card {
    border-right: 1px solid #d1ecf1;
    padding: 20px;
    text-align: center;
    background: white;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-card:last-child {
    border-right: none;
}

.result-label {
    font-weight: bold;
    font-size: 14px;
    color: #20b2aa;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.result-value {
    font-size: 32px;
    font-weight: bold;
    color: #20b2aa;
    margin-bottom: 8px;
}

.result-status {
    font-size: 14px;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 15px;
    margin-bottom: 8px;
    display: inline-block;
}

.result-status.pass {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-status.fail {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.result-criteria {
    font-size: 11px;
    color: #20b2aa;
    font-style: italic;
}

.result-note {
    font-size: 10px;
    color: #888;
    margin-top: 5px;
    font-style: italic;
}

.result-card input {
    width: 100px;
    margin: 0 auto;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #000000;
}

/* Remove spinners from result card number inputs */
.result-card input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.result-card input[type="number"]::-webkit-outer-spin-button,
.result-card input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Validation Section */
.validation-grid {
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.validation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.validation-item.pass {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.validation-item.fail {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.validation-icon {
    font-weight: bold;
    font-size: 16px;
}

/* Action Section */
.action-section {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #d1ecf1;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, #20b2aa 0%, #17a2b8 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(32, 178, 170, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.4);
    background: linear-gradient(135deg, #1a9b94 0%, #138a9a 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Footer Section */
.footer-section {
    background: #f8f9fa;
    border-top: 1px solid #d1ecf1;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.formula-info,
.legend-info {
    background: white;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.formula-title,
.legend-title {
    font-weight: bold;
    font-size: 14px;
    color: #5fd3d0;
    margin-bottom: 10px;
    text-transform: uppercase;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.formula-item,
.legend-item {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.formula-item {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 3px;
    border-left: 3px solid #5fd3d0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .header-info {
        grid-template-columns: 1fr 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .header-info {
        grid-template-columns: 1fr;
    }
    
    .footer-section {
        grid-template-columns: 1fr;
    }
    
    .action-section {
        flex-direction: column;
    }
    
    .action-section button {
        width: 100%;
    }
    
    .data-table {
        font-size: 11px;
    }
    
    .time-header, .time-cell {
        width: 50px !important;
    }
    
    .data-header, .data-cell {
        width: 80px !important;
    }
    
    .stats-header, .stats-cell {
        width: 60px !important;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        font-size: 12px;
    }
    
    .main-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .action-section {
        display: none;
    }
    
    .header-section {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
    
    .data-title {
        background: #5fd3d0 !important;
        color: white !important;
    }
}

/* Animation for results */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card.updated {
    animation: fadeInUp 0.5s ease-out;
}

/* Focus and interaction states */
.data-table tr:hover {
    background: #f0f8ff;
}

.data-table td:hover {
    background: #e8f4fd;
}

/* Excel-like selection styles */
.selected-cell {
    background: #4472c4 !important;
    color: white !important;
    box-shadow: 0 0 0 2px #4472c4 !important;
}

.selected-cell input {
    background: white !important;
    color: black !important;
    border: 2px solid #5fd3d0 !important;
}

.selected-row {
    background: rgba(68, 114, 196, 0.1) !important;
}

.selected-column {
    background: rgba(68, 114, 196, 0.1) !important;
}

/* Excel-like cell highlighting on focus */
.data-input:focus {
    background: white !important;
    color: black !important;
    border: 2px solid #5fd3d0 !important;
    outline: none !important;
}

/* Selection indicators */
.data-table {
    user-select: none;
}

.data-input {
    cursor: cell;
    transition: all 0.2s ease;
}

/* Navigation help styling */
.navigation-help {
    background: #e6f7f6;
    border: 1px solid #5fd3d0;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 12px;
    color: #2d5a58;
}

.help-icon {
    margin-right: 8px;
    font-size: 14px;
}

.navigation-help kbd {
    background: #5fd3d0;
    color: white;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    margin: 0 2px;
    border: 1px solid #4fc3d7;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #5fd3d0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Regulatory Comprehensive Validation Styles */
.validation-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.validation-pass {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
}

.validation-errors {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin-bottom: 15px;
    padding: 0;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
    animation: errorPulse 2s ease-in-out;
}

.validation-warnings {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    margin-bottom: 15px;
    padding: 0;
}

.validation-section-title {
    background: rgba(0,0,0,0.05);
    padding: 10px 15px;
    margin: 0;
    font-weight: bold;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px 6px 0 0;
}

.validation-errors .validation-section-title {
    color: #721c24;
    background: rgba(220, 53, 69, 0.1);
}

.validation-warnings .validation-section-title {
    color: #856404;
    background: rgba(255, 193, 7, 0.1);
}

.validation-error-item {
    padding: 8px 15px;
    color: #721c24;
    border-bottom: 1px solid rgba(245, 198, 203, 0.5);
    font-size: 13px;
    line-height: 1.4;
}

.validation-error-item:last-child {
    border-bottom: none;
}

.validation-warning-item {
    padding: 8px 15px;
    color: #856404;
    border-bottom: 1px solid rgba(255, 234, 167, 0.5);
    font-size: 13px;
    line-height: 1.4;
}

.validation-warning-item:last-child {
    border-bottom: none;
}

.validation-summary {
    background: #e2e3e5;
    border: 1px solid #d6d8db;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 10px;
    text-align: center;
}

.validation-summary strong {
    font-size: 14px;
}

@keyframes errorPulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2); }
    50% { box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.3); }
}

/* Regulatory Calculation Notes */
.calculation-notes {
    background: #e6f7f6;
    border: 1px solid #5fd3d0;
    border-radius: 6px;
    margin: 15px 0;
    padding: 0;
    font-size: 13px;
}

.notes-title {
    background: rgba(95, 211, 208, 0.1);
    padding: 10px 15px;
    margin: 0;
    font-weight: 600;
    color: #5fd3d0;
    border-bottom: 1px solid rgba(95, 211, 208, 0.2);
    border-radius: 6px 6px 0 0;
}

.notes-item {
    padding: 8px 15px;
    color: #5fd3d0;
    border-bottom: 1px solid rgba(95, 211, 208, 0.1);
    line-height: 1.5;
}

.notes-item:last-child {
    border-bottom: none;
}

/* Chart Section Styling */
.chart-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-chart {
    background: #5fd3d0;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(95, 211, 208, 0.2);
}

.btn-chart:hover {
    background: #4cbbb7;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(95, 211, 208, 0.3);
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 20px;
}

.chart-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #5fd3d0;
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #5fd3d0;
}

.chart-wrapper {
    position: relative;
    height: 400px;
    margin: 0 auto;
}

.chart-wrapper canvas {
    max-width: 100%;
    height: auto;
}

/* Chart Legend Styling */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Responsive Charts */
@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .chart-wrapper {
        height: 300px;
    }
    
    .chart-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-chart {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* Chart Loading State */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #5fd3d0;
    font-style: italic;
}

.chart-loading::before {
    content: "📊 ";
    margin-right: 8px;
    font-size: 18px;
}

/* Chart Error State */
.chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #dc3545;
    font-weight: bold;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
}

.chart-error::before {
    content: "⚠️ ";
    margin-right: 8px;
    font-size: 18px;
}