.chart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.chart-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 75vw;
    height: 75vh;
    max-width: 1400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: 1px solid var(--border-grey);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modal-close:hover {
    background: var(--danger-red);
    color: white;
    transform: rotate(90deg);
}

.modal-filters {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-grey);
    background: var(--light-grey);
    border-radius: 16px 16px 0 0;
}

.modal-filters .row {
    align-items: end;
}

.modal-filters label {
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-filters select,
.modal-filters input {
    border-radius: 8px;
    border: 1px solid var(--border-grey);
    padding: 0.625rem 0.875rem;
    transition: all 0.2s ease;
}

.modal-filters select:focus,
.modal-filters input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
    outline: none;
}

.modal-chart-container {
    flex: 1;
    padding: 2rem;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-chart-container canvas {
    max-width: 100%;
    max-height: 100%;
}

@media (max-width: 991px) {
    .modal-content {
        width: 90vw;
        height: 85vh;
    }
    
    .modal-chart-container {
        padding: 1rem;
    }
}

@media (max-width: 767px) {
    .modal-content {
        width: 95vw;
        height: 90vh;
    }
    
    .modal-filters {
        padding: 1rem;
    }
    
    .modal-chart-container {
        padding: 0.75rem;
    }
}
