.monitoring-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.filter-section {
    background: #ffffff;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(45, 62, 93, 0.06);
}

.section-title {
    color: #2D3E5D;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.section-title i {
    color: #4a5d80;
}

.filter-card {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(45, 62, 93, 0.06);
    overflow: hidden;
}

.filter-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    align-items: flex-end;
    padding: 1.5rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.filter-group {
    min-width: unset;
    width: 100%;
}

.filter-group.full-width {
    width: 100%;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a5d80;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.filter-group i {
    color: #2D3E5D;
}

.custom-select,
.custom-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #e0e5ec;
    border-radius: 8px;
    background: #f8f9fa;
    color: #2D3E5D;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.custom-select:focus,
.custom-input:focus {
    border-color: #4a5d80;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 93, 128, 0.1);
}

.date-range {
    display: grid;
    /* Adjust columns to be more compact */
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
    gap: 1rem;
    justify-content: start;
    max-width: 900px;
    /* Limit maximum width */
}

.custom-input[type="datetime-local"] {
    width: 100%;
    min-width: 480px;
    max-width: 220px;
    /* Limit maximum width of date inputs */
}

.filter-action {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    /* Changed from flex-end to center */
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid #e0e5ec;
}

.filter-btn {
    background: #2D3E5D;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 2rem;
    /* Increased horizontal padding */
    min-width: 180px;
    /* Added minimum width */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Added to center icon and text */
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    background: #4a5d80;
    transform: translateY(-2px);
}

.chart-section {
    background: #ffffff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(45, 62, 93, 0.06);
}

.chart-container {
    width: 100% !important;
    height: 500px !important;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .monitoring-container {
        margin: 1rem;
        padding: 0 1rem;
    }

    .filter-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-content {
        padding: 1rem;
        gap: 1rem;
    }

    .filter-row {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        min-width: 100%;
        width: 100%;
    }

    .date-range {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-action {
        padding-top: 0.8rem;
    }

    .filter-btn {
        width: 100%;
        justify-content: center;
    }

    .chart-container {
        height: 400px !important;
    }
}

/* Adjust mobile breakpoint for better responsiveness */
@media (max-width: 992px) {

    .filter-controls,
    .filter-row,
    .date-range {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .filter-action {
        padding-top: 0.8rem;
    }

    .filter-btn {
        width: 100%;
        justify-content: center;
    }

    .date-range {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
        max-width: 100%;
    }

    .custom-input[type="datetime-local"] {
        max-width: 100%;
    }
}