body {
    background: #f8f9fa;
}

/* ===== HEADER (from Header.jsx / dashboard.css) ===== */
.dashboard-header {
    background: linear-gradient(90deg, #363636 0%, #7693c4 100%);
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #0a58ca;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-header .dashboard-title {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.dashboard-header .dashboard-icon {
    width: 28px;
    height: 28px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* ===== FOOTER (from Footer.jsx / footer.css) ===== */
.dashboard-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #313030;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-top: 2px solid #0a58ca;
    z-index: 1000;
}

.dashboard-footer .footer-left {
    font-weight: 500;
}

.dashboard-footer .footer-right {
    font-weight: 400;
    font-size: 0.9rem;
}

.footer-time {
    font-weight: 600;
}

/* Ensure page content not hidden by fixed footer */
body {
    padding-bottom: 3rem;
}

/* ===== PAGE HEADER (existing) ===== */
.page-header {
    background: #ffffff;
    border-radius: .75rem;
    padding: 1.25rem 1.5rem;
    margin: 1rem 0 1.25rem;
    border: 1px solid #e9ecef;
}

.meters-bar .btn {
    margin: .25rem .35rem .25rem 0;
}

.meters-bar .btn.active {
    pointer-events: none;
}

.meter-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.map-link {
    font-size: .95rem;
}

.table thead th {
    white-space: nowrap;
}

.empty-note {
    border: 1px dashed #e0a800;
    background: #fff3cd;
    color: #664d03;
    padding: .85rem 1rem;
    border-radius: .5rem;
}

/* Right-align numeric columns */
.table td:nth-child(3),
.table td:nth-child(4),
.table td:nth-child(5),
.table td:nth-child(6),
.table td:nth-child(7) {
    text-align: right;
}

.table th:nth-child(3),
.table th:nth-child(4),
.table th:nth-child(5),
.table th:nth-child(6),
.table th:nth-child(7) {
    text-align: right;
}

/* ===== Average Box ===== */
.avg-box {
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: .75rem;
    padding: 1.2rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.avg-title {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: .4rem;
    font-weight: 500;
}

.avg-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: #0d6efd; /* Bootstrap primary blue */
}

/* ===== Average Box legend ===== */
.avg-legend {
    font-size: 0.9375rem;
    color: #495057;
}

.avg-legend .legend-item + .legend-item {
    margin-top: .25rem;
}

.legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: .5rem;
    border: 1px solid transparent;
    vertical-align: middle;
}

.avg-legend-title {
    font-weight: 600;
    margin-bottom: .35rem;
    color: #343a40;
}

/* tighter title/number stack */
.avg-title { margin-bottom: 0 !important; line-height: 1.2; }
.avg-value { margin-top: 0 !important; line-height: 1.1; }

/* slightly slimmer box padding */
.avg-box { padding-top: .6rem; padding-bottom: .6rem; }

/* Match Bootstrap table contextual colors */
.legend-high   { background: #f8d7da; border-color: #f5c2c7; } /* table-danger */
.legend-low    { background: #BFE2E9; border-color: #a5c6cc; } /* table-success */
.legend-normal { background: #f8f9fa; border-color: #ced4da; } /* neutral */

/* Tighter layout for title + value */
#avgBox {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

#avgBox .avg-title {
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

#avgBox .avg-value {
    margin-top: 0;
}

#avgBox .row {
    align-items: center;
}

.avg-dates {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.2;
    font-weight: normal;
}
