/* =========================================================
   GREEN METRICS DASHBOARD
   ========================================================= */


/* =========================
   GLOBAL
========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f4f7f6;

    color: #17211f;

    line-height: 1.5;
}


/* =========================
   HEADER
========================= */

.dashboard-header {

    background: #ffffff;

    border-bottom: 1px solid #e3e9e7;

    padding: 24px 40px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;
}

.dashboard-header h1 {

    font-size: 28px;

    font-weight: 700;

    letter-spacing: -0.5px;

}

.dashboard-header p {

    margin-top: 4px;

    color: #6c7975;

    font-size: 14px;

}


/* =========================
   SYSTEM STATUS
========================= */

.system-status {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 8px 14px;

    border-radius: 20px;

    background: #f1f5f3;

    font-size: 13px;

    font-weight: 600;

}

.status-dot {

    width: 9px;

    height: 9px;

    border-radius: 50%;

    background: #9ca8a4;

}

.status-dot.online {

    background: #2e9b67;

}

.status-dot.offline {

    background: #d65a5a;

}


/* =========================
   MAIN CONTAINER
========================= */

.dashboard-container {

    max-width: 1500px;

    margin: 0 auto;

    padding: 32px 40px 50px;

}


/* =========================
   SECTION
========================= */

.section {

    margin-bottom: 32px;

}

.section-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-end;

    margin-bottom: 18px;

    gap: 20px;

}

.section-title {

    margin-bottom: 18px;

}

.section h2 {

    font-size: 19px;

    font-weight: 650;

    letter-spacing: -0.2px;

}

.section-title p,
.section-header p {

    margin-top: 4px;

    font-size: 13px;

    color: #7a8581;

}

.last-update {

    font-size: 12px;

    color: #7a8581;

}


/* =========================
   KPI GRID
========================= */

.kpi-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;

}

.kpi-card {

    background: #ffffff;

    border: 1px solid #e2e9e6;

    border-radius: 12px;

    padding: 22px;

    min-height: 145px;

    box-shadow:
        0 2px 8px rgba(25, 45, 38, 0.04);

}

.kpi-label {

    color: #66736f;

    font-size: 13px;

    font-weight: 600;

    margin-bottom: 10px;

}

.kpi-value {

    font-size: 30px;

    font-weight: 700;

    letter-spacing: -0.7px;

    color: #18231f;

}

.kpi-unit {

    font-size: 14px;

    font-weight: 500;

    color: #66736f;

    margin-left: 3px;

}

.kpi-description {

    margin-top: 8px;

    font-size: 12px;

    color: #8a9591;

}


/* =========================
   SENSOR GRID
========================= */

.sensor-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 16px;

}

.sensor-card {

    background: #ffffff;

    border: 1px solid #e2e9e6;

    border-radius: 10px;

    padding: 18px 20px;

    display: flex;

    flex-direction: column;

    gap: 6px;

}

.sensor-label {

    font-size: 12px;

    color: #7b8783;

}

.sensor-card strong {

    font-size: 21px;

    font-weight: 650;

}


/* =========================
   ACTIVITY
========================= */

.activity-grid {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 16px;

}

.activity-card {

    background: #ffffff;

    border: 1px solid #e2e9e6;

    border-radius: 10px;

    padding: 18px 20px;

    display: flex;

    align-items: center;

    gap: 14px;

}

.activity-icon {

    width: 34px;

    height: 34px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: #eef4f1;

    color: #6c8178;

    font-size: 13px;

}

.activity-label {

    display: block;

    font-size: 12px;

    color: #7b8783;

}

.activity-card strong {

    display: block;

    margin-top: 2px;

    font-size: 16px;

}


/* =========================
   WEATHER
========================= */

.weather-grid {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 16px;

}

.weather-card {

    background: #ffffff;

    border: 1px solid #e2e9e6;

    border-radius: 10px;

    padding: 20px;

    display: flex;

    justify-content: space-between;

    align-items: center;

}

.weather-card span {

    font-size: 13px;

    color: #737f7b;

}

.weather-card strong {

    font-size: 24px;

    font-weight: 650;

}


/* =========================
   CHART
========================= */

.chart-container {

    background: #ffffff;

    border: 1px solid #e2e9e6;

    border-radius: 12px;

    padding: 24px;

    height: 360px;

}


/* =========================
   FOOTER
========================= */

.dashboard-footer {

    border-top: 1px solid #e1e7e4;

    padding-top: 24px;

    margin-top: 45px;

    display: flex;

    justify-content: space-between;

    color: #89938f;

    font-size: 12px;

}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    .kpi-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }

    .sensor-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }

}


@media (max-width: 700px) {

    .dashboard-header {

        padding: 20px;

        flex-direction: column;

        align-items: flex-start;

    }

    .dashboard-container {

        padding: 24px 18px 40px;

    }

    .kpi-grid {

        grid-template-columns: 1fr;

    }

    .sensor-grid {

        grid-template-columns: 1fr;

    }

    .activity-grid {

        grid-template-columns: 1fr;

    }

    .weather-grid {

        grid-template-columns: 1fr;

    }

    .section-header {

        flex-direction: column;

        align-items: flex-start;

    }

    .dashboard-footer {

        flex-direction: column;

        gap: 5px;

    }

}