body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #eef2f7;
    color: #333;
}

header {
    text-align: center;
    padding: 30px;
}

h1 {
    color: #243447;
}


h2 {
    border-bottom:
        1px solid #ddd;
    padding-bottom: 10px;
}


.dashboard {
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px;
}

.sensor-card {
    background: white;
    color: #333;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transition: transform 0.2s ease,
                box-shadow 0.2s ease;
}

.reading {
    margin-top: 12px;
    font-size: 1.15rem;
}


.updated {
    margin-top: 25px;
    color: #777;
    font-size: .9rem;
}


.sensor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
}


.reading:first-of-type {
    font-size: 2rem;
    font-weight: bold;
}


.sensor-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.sensor-link:hover {
    text-decoration: none;
}

.stats-summary {
    margin-top: -8px;
    margin-bottom: 18px;

    color: #666;
    font-size: 0.95rem;
}


.chart-container {
    position: relative;
    height: 600px;
    margin-top: 30px;
}


#loading {
    display: none;
    position: absolute;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    z-index: 10;

    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
}


#stats-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 4px;
}


.chart-controls {
    margin: 20px 0;
}

.chart-controls button {
    padding: 10px 18px;
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.chart-controls button:hover {
    background: #dbeafe;
    border-color: #3b82f6;
}

.chart-controls button.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    font-weight: 600;
    transform: translateY(-1px);
}


