body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
}

h1 {
    text-align: center;
    color: #0056b3;
}

nav {
    text-align: center;
    margin-bottom: 20px;
}

nav a {
    text-decoration: none;
    color: #0056b3;
    padding: 10px 20px;
    border: 1px solid #0056b3;
    border-radius: 5px;
    margin: 0 10px;
    transition: background-color 0.3s, color 0.3s;
}

nav a:hover {
    background-color: #0056b3;
    color: white;
}


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

.card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.card h2 {
    margin-top: 0;
    color: #0056b3;
}

.card .value {
    font-size: 2em;
    font-weight: bold;
    margin: 10px 0;
}

.card .status {
    font-size: 1.2em;
    padding: 5px 10px;
    border-radius: 5px;
    color: #fff;
}

.status.on {
    background-color: #28a745;
}

.status.off {
    background-color: #dc3545;
}

.alert-item {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
}

.alert-item p {
    margin: 0;
}

.alert-item .timestamp {
    font-size: 0.9em;
    color: #721c24;
    margin-top: 5px;
}