/* General Styles */
body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

h1 {
    text-align: center;
    color: #343a40;
    margin-top: 20px;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    background-color: #ffffff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.controls > div {
    margin: 10px 0;
}

.filters, .time-scales, .update-interval, .last-update, .sensor-status {
    flex: 1 1 100%;
}

.filters label, .time-scales label, .update-interval label {
    margin-right: 10px;
    font-weight: bold;
}

select, input[type="datetime-local"] {
    padding: 5px;
    margin-right: 10px;
    border-radius: 4px;
    border: 1px solid #ced4da;
}

button {
    padding: 6px 12px;
    background-color: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

#toggleTable {
    margin-top: 20px;
}

.last-update {
    font-size: 1em;
    color: #6c757d;
    text-align: right;
}

.sensor-status {
    display: flex;
    align-items: center;
}

.status-item {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.status-light {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    background-color: #6c757d;
}

.status-item span:last-child {
    font-size: 0.9em;
    color: #343a40;
}

/* Data Table */
#dataTableContainer {
    margin-top: 20px;
    overflow-x: auto;
}

#dataTable {
    width: 100%;
    border-collapse: collapse;
}

#dataTable th, #dataTable td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: center;
}

#dataTable th {
    background-color: #e9ecef;
    color: #495057;
}

#dataTable tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .controls > div {
        flex: 1 1 100%;
        margin-bottom: 15px;
    }

    .last-update {
        text-align: left;
    }
}
