body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    margin: 0;
    padding: 0;
}
.container {
    max-width: 900px;
    margin: 30px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 24px;
}
h1 {
    text-align: center;
    color: #333;
}
.panel {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}
.panel h2 {
    margin-top: 0;
    color: #444;
}
button {
    margin: 4px 6px 4px 0;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: #1976d2;
    color: #fff;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
}
button:hover {
    background: #1565c0;
}
input[type="number"] {
    width: 60px;
    padding: 4px;
    margin: 0 8px 0 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}
#messages {
    background: #222;
    color: #b9f6ca;
    padding: 12px;
    border-radius: 4px;
    min-height: 120px;
    max-height: 300px;
    overflow-y: auto;
    font-size: 1em;
}
#device-info {
    margin-top: 10px;
    color: #1976d2;
    font-weight: bold;
}

/* Status Dashboard Styles */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 10px;
}
.status-item {
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid #eee;
}
.status-item .label {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-item .value {
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
}
.status-item .unit {
    font-size: 0.8em;
    color: #888;
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 300px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.modal-content h3 {
    margin-top: 0;
    color: #d32f2f;
}