/* Grading Report Styles */
.grading-report {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.grading-report h2 {
    color: #333;
    border-bottom: 3px solid #007cba;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.grading-report h3 {
    color: #555;
    background-color: #f8f9fa;
    padding: 15px;
    margin: 20px 0 15px 0;
    border-left: 4px solid #007cba;
}

.grading-report h4 {
    color: #666;
    margin: 15px 0 10px 0;
    font-size: 1.1em;
}

.grading-report h5 {
    color: #777;
    margin: 10px 0 8px 0;
    font-size: 1em;
}

/* Summary Section */
.grading-summary {
    background-color: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.summary-grid, .data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.summary-item, .data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.summary-item label, .data-item label {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.summary-item span, .data-item span {
    color: #666;
    text-align: right;
}

/* Year Analysis Sections */
.year-analysis {
    background-color: #fafafa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.pro-forma-section, .year-tab-section {
    margin-bottom: 20px;
}

.cash-flow-section {
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

/* Delta Analysis */
.delta-analysis {
    background-color: #fff8f0;
    border: 2px solid #ffcc80;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.delta-analysis h3 {
    background-color: #fff3e0;
    border-left-color: #ff9800;
}

.pro-forma-delta, .year-tab-delta {
    margin-bottom: 20px;
}

/* Error Message */
.error-message {
    background-color: #fff0f0;
    border: 2px solid #ff6b6b;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.error-message h3 {
    color: #d63031;
    margin-bottom: 15px;
}

.error-message p {
    color: #636e72;
    margin-bottom: 20px;
}

.error-message button {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.error-message button:hover {
    background-color: #005a87;
}

/* Responsive Design */
@media (max-width: 768px) {
    .grading-report {
        padding: 10px;
    }
    
    .summary-grid, .data-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-item, .data-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .summary-item span, .data-item span {
        text-align: left;
        margin-top: 5px;
    }
}

/* Highlight positive and negative changes in deltas */
.delta-analysis .data-item span {
    font-weight: bold;
}

.delta-analysis .data-item span:contains('-') {
    color: #e74c3c;
}

.delta-analysis .data-item span:not(:contains('-')) {
    color: #27ae60;
}
