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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-text {
    flex: 1;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.page-nav {
    display: flex;
    gap: 15px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.upload-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.upload-area:hover {
    border-color: #5a6fd8;
    background: #f0f2ff;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #4c63d2;
    background: #e8ebff;
    transform: scale(1.02);
}

.upload-content i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.upload-content p {
    color: #666;
    font-size: 1.1rem;
}

.upload-link {
    color: #667eea;
    text-decoration: underline;
    cursor: pointer;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: #e8f5e8;
    border-radius: 10px;
    border: 2px solid #4caf50;
}

.file-info i {
    font-size: 1.5rem;
    color: #4caf50;
}

.file-info span {
    font-weight: 600;
    color: #2e7d32;
}

.remove-file {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.remove-file:hover {
    background: #cc0000;
}

.loading {
    text-align: center;
    padding: 60px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dashboard {
    display: none;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.card-content h3 {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.card-content p {
    color: #666;
    font-size: 0.9rem;
}

.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    position: relative;
    height: 400px;
}

.chart-container canvas {
    max-height: 300px !important;
}

.chart-container h3 {
    margin-bottom: 10px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-container h3 i {
    color: #667eea;
}

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

.back-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-button:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.back-button i {
    font-size: 0.8rem;
}

.chart-subtitle {
    margin-bottom: 20px;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    background: #f8f9ff;
    padding: 5px 10px;
    border-radius: 5px;
    border-left: 3px solid #667eea;
}

.comparison-section, .quarterly-comparison-section, .weekly-comparison-section, .monthly-summary {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.comparison-section h3, .quarterly-comparison-section h3, .weekly-comparison-section h3, .monthly-summary h3 {
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comparison-section h3 i, .quarterly-comparison-section h3 i, .weekly-comparison-section h3 i, .monthly-summary h3 i {
    color: #667eea;
}

.quarterly-comparison-controls, .weekly-comparison-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 10px;
    border: 1px solid #e0e6ff;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.control-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.control-select {
    padding: 10px 12px;
    border: 2px solid #e0e6ff;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.control-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.control-select:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.compare-btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    justify-content: center;
}

.compare-btn:hover:not(:disabled) {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.compare-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.quarterly-comparison-table-container, .weekly-comparison-table-container {
    overflow-x: auto;
}

.comparison-table-container, .summary-table-container {
    overflow-x: auto;
}

.quarterly-section {
    margin-bottom: 40px;
    clear: both;
    overflow: hidden;
}

.quarterly-section h3 {
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
}

.quarterly-charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    clear: both;
}

.quarterly-chart {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.quarterly-chart h4 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.quarterly-chart canvas {
    max-height: 200px !important;
    flex-shrink: 0;
}

.quarterly-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
    flex-shrink: 0;
}

.quarterly-metric {
    text-align: center;
    padding: 10px;
    background: #f8f9ff;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.quarterly-metric .metric-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.quarterly-metric .metric-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .quarterly-charts-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .quarterly-chart {
        min-height: 250px;
        padding: 15px;
    }
    
    .quarterly-chart canvas {
        max-height: 150px !important;
    }
    
    .quarterly-summary {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .quarterly-metric {
        padding: 8px;
    }
    
    .quarterly-metric .metric-value {
        font-size: 1rem;
    }
    
    .quarterly-metric .metric-label {
        font-size: 0.8rem;
    }
}

.comparison-table, .summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.comparison-table th, .summary-table th {
    background: #f8f9ff;
    color: #333;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #667eea;
}

.comparison-table td, .summary-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.comparison-table tr:hover, .summary-table tr:hover {
    background: #f8f9ff;
}

.trend-up {
    color: #4caf50;
    font-weight: bold;
}

.trend-down {
    color: #f44336;
    font-weight: bold;
}

.trend-neutral {
    color: #ff9800;
    font-weight: bold;
}

.trend-icon {
    font-size: 1.2rem;
    margin-right: 5px;
}

.export-section {
    text-align: center;
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.export-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.print-btn {
    background: linear-gradient(135deg, #4caf50, #45a049) !important;
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #f44336;
    text-align: center;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.error i {
    font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .charts-section {
        grid-template-columns: 1fr 1fr;
    }
    
    .chart-container {
        height: 350px;
    }
    
    .chart-container canvas {
        max-height: 250px !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .header-text {
        text-align: center;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .chart-container canvas {
        max-height: 200px !important;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .upload-content i {
        font-size: 2rem;
    }
    
    .upload-content h3 {
        font-size: 1.2rem;
    }
    
    .card {
        flex-direction: column;
        text-align: center;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Print Styles */
@media print {
    /* Hide elements that shouldn't be printed */
    .upload-section,
    .export-section,
    .error,
    #loading,
    .file-info button,
    .print-btn,
    #exportBtn {
        display: none !important;
    }
    
    /* Optimize layout for print */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        background: white !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }
    
    .header {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border-bottom: 2px solid #333 !important;
        margin-bottom: 20px !important;
        padding: 10px 0 !important;
    }
    
    .header h1 {
        color: black !important;
        font-size: 24pt !important;
    }
    
    .file-info {
        background: white !important;
        border: 1px solid #ccc !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid;
    }
    
    .card {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        margin-bottom: 15px !important;
        page-break-inside: avoid;
    }
    
    .card h3 {
        color: black !important;
        font-size: 14pt !important;
        border-bottom: 1px solid #ccc !important;
        padding-bottom: 5px !important;
    }
    
    /* Chart containers - hide charts as they don't print well */
    .charts-section {
        display: none !important;
    }
    
    /* Table styling for print */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-bottom: 15px !important;
        page-break-inside: auto;
    }
    
    th, td {
        border: 1px solid #333 !important;
        padding: 8px 6px !important;
        text-align: left !important;
        font-size: 10pt !important;
    }
    
    th {
        background: #f5f5f5 !important;
        font-weight: bold !important;
        color: black !important;
    }
    
    /* Summary cards layout */
    .summary-cards {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        margin-bottom: 20px !important;
    }
    
    .summary-card {
        background: white !important;
        border: 1px solid #ccc !important;
        padding: 10px !important;
        page-break-inside: avoid;
    }
    
    .summary-card h4 {
        color: black !important;
        font-size: 12pt !important;
        margin-bottom: 5px !important;
    }
    
    .summary-card .value {
        color: black !important;
        font-size: 16pt !important;
        font-weight: bold !important;
    }
    
    /* Page breaks */
    .comparison-section {
        page-break-before: auto;
        page-break-inside: avoid;
    }
    
    /* Ensure good contrast for all text */
    * {
        color: black !important;
    }
    
    /* Print page margins */
    @page {
        margin: 1in;
        size: letter;
    }
}

/* Insights Control Panel Styles */
.insights-control-panel {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.insights-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
}

.insights-control-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.insights-control-header h4 i {
    margin-right: 8px;
    color: #007bff;
}

.btn-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-toggle:hover {
    background-color: #e9ecef;
}

.btn-toggle i {
    color: #666;
    transition: transform 0.2s;
}

.insights-control-content {
    padding: 20px;
}

.insights-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.control-group {
    display: flex;
    align-items: center;
}

.control-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
    margin: 0;
}

.control-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
    accent-color: #007bff;
}

.insights-control-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-secondary:active {
    transform: translateY(1px);
}

/* Quarterly Controls Styles */
.quarterly-controls {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.controls-header {
    text-align: center;
    margin-bottom: 20px;
}

.controls-header h4 {
    color: #495057;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.controls-header p {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.quarterly-controls .control-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    text-align: center;
    min-height: 50px;
}

.quarterly-controls .control-btn:hover {
    border-color: #007bff;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.15);
}

.quarterly-controls .control-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.quarterly-controls .control-btn i {
    font-size: 1.1rem;
}

/* Chart title improvements for quarterly views */
.chart-header h3 {
    margin-bottom: 10px;
}

.chart-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-style: italic;
}

/* Quarterly Data Cards Styles */
.quarterly-data-cards {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.quarterly-cards-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.quarterly-cards-header h4 {
    color: #495057;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.quarterly-cards-header p {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

.quarterly-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.quarter-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.quarter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.quarter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.quarter-header h5 {
    color: #495057;
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
}

.session-count {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.no-data {
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.quarter-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.metric-label {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.metric-value {
    color: #495057;
    font-size: 0.95rem;
    font-weight: 600;
}

.quarterly-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.quarterly-summary h5 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

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

.summary-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.summary-value {
    font-size: 1rem;
    font-weight: 600;
}

/* Monthly Quarterly Cards Styles */
.monthly-quarterly-cards {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.monthly-quarterly-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.monthly-quarterly-header h4 {
    color: #495057;
    margin-bottom: 8px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.monthly-quarterly-header p {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

/* Quarterly Charts Container */
#quarterlyChartsContainer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#quarterlyChartsContainer > * {
    flex-shrink: 0;
}

/* Quarterly Section Header */
.quarterly-section-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: auto;
    min-height: auto;
    flex-shrink: 0;
    flex-grow: 0;
    align-self: flex-start;
}

.quarterly-section-header h3 {
    color: #495057;
    margin-bottom: 5px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.2;
}

.quarterly-section-header .section-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
    line-height: 1.3;
}

/* Responsive design for insights control panel */
@media (max-width: 768px) {
    .insights-controls {
        grid-template-columns: 1fr;
    }
    
    .insights-control-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-secondary {
        width: 100%;
        max-width: 200px;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .quarterly-controls .control-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
        min-height: 45px;
    }
    
    .quarterly-cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .quarter-card {
        padding: 15px;
    }
    
    .summary-metrics {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}