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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #130e36;
    min-height: 100vh;
    padding: 0;
}

.container {
    width: 100%;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: none;
}

/* Header */
.header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 15px 30px;
    background: #130e36;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header> :first-child {
    justify-self: start;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    white-space: nowrap;
}

.header .header-buttons {
    justify-self: end;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.header .subtitle {
    font-size: 0.9em;
    opacity: 0.9;
    margin-top: 5px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: white;
    color: #130e36;
}

.btn-primary:hover {
    background: #e8e8e8;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-reset {
    background: #e2e8f0;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9em;
}

.btn-reset:hover {
    background: #cbd5e0;
}

.btn-export {
    background: #28a745;
    color: white;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9em;
}

.btn-export:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-print {
    background: #130e36;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9em;
}

.btn-print:hover {
    background: #423e5e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(19, 14, 54, 0.3);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 25px 30px;
    background: #162855;
    border-bottom: 2px solid #f8f9fa;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #130e36;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.summary-card .label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.summary-card .value {
    font-size: 28px;
    font-weight: 600;
    color: #130e36;
}

.summary-card.total {
    border-left-color: #4CAF50;
    /* Green */
}

.summary-card.average {
    border-left-color: #2196F3;
    /* Blue */
}

.summary-card.peak {
    border-left-color: #FF9800;
    /* Orange */
}

.summary-card.current {
    border-left-color: #9C27B0;
    /* Purple */
}

/* Filters Section */
.filters-section {
    padding: 20px 30px;
    background: #162855;
    border-bottom: 2px solid #f8f9fa;
    display: none;
    /* Hidden by default */
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filters-section.show {
    display: flex;
}

.filters-toggle {
    padding: 10px 30px;
    background: #162855;
    border-bottom: 2px solid #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
}

.filters-toggle-btn {
    padding: 10px 20px;
    background: #130e36;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-toggle-btn:hover {
    background: #423e5e;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.85em;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    min-width: 180px;
    padding: 12px;
    height: 45px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 0.95em;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-select:hover {
    border-color: #130e36;
}

.filter-select:focus {
    outline: none;
    border-color: #130e36;
    box-shadow: 0 0 0 3px rgba(19, 14, 54, 0.2);
}

/* Info Section */
.info-section {
    padding: 20px 30px;
    background: #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.info-text {
    color: #4a5568;
    font-size: 0.9em;
}

.info-text strong {
    color: #2d3748;
}

/* Chart Sections */
.main-chart-section {
    padding: 30px;
    background: #162855;
}

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

.pie-charts-section {
    padding: 30px;
    background: #162855;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.pie-chart-container {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.pie-chart-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.pie-chart-container h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: 600;
}

.chart-canvas {
    max-height: 250px;
}

/* Loading & Error States */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2em;
    color: #6c757d;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid #130e36;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error {
    background: #fed7d7;
    color: #c53030;
    padding: 20px;
    border-radius: 10px;
    margin: 20px;
    text-align: center;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    .filters-section,
    .btn-export,
    .btn-print,
    .btn-secondary {
        display: none;
    }

    .pie-charts-section {
        page-break-inside: avoid;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .header> :first-child,
    .header .header-buttons {
        justify-self: center;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    .btn-export,
    .btn-print {
        width: 100%;
        margin-left: 0;
    }
}