/* -----------------------------
   GENERAL
------------------------------ */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    background:#0f172a;
    color:#ffffff;
    font-family:Arial, sans-serif;
    padding:20px;
}

/* -----------------------------
   HEADER
------------------------------ */

header{
    background:#1e293b;
    border:1px solid #334155;
    border-radius:15px;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:20px;
    margin-bottom:20px;
}

.logo{
    width:70px;
}

.header-center h1{
    font-size:28px;
    color:#ffffff;
}

.header-right{
    text-align:right;
}

.connected{
    color:#10b981;
    margin-top:10px;
    font-weight:bold;
}

/* -----------------------------
   KPI CARDS
------------------------------ */

.kpi-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:20px;

    margin-bottom:25px;
}

.card{
    background:#1e293b;
    border:1px solid #334155;
    border-radius:15px;

    padding:20px;
    text-align:center;

    transition:0.3s;
}

.card:hover{
    transform:translateY(-5px);
    box-shadow:0 0 15px rgba(0,255,255,0.25);
}

.card h3{
    color:#94a3b8;
    margin-bottom:15px;
}

.card h2{
    color:#10b981;
    font-size:34px;
}

/* -----------------------------
   CHART SECTION
------------------------------ */

.chart-section{
    background:#1e293b;
    border:1px solid #334155;
    border-radius:15px;

    padding:20px;

    margin-bottom:25px;
}

.chart-section h2{
    margin-bottom:20px;
}

#energyChart{
    width:100%;
    height:400px;
}

/* -----------------------------
   PARAMETER SECTIONS
------------------------------ */

.parameter-section{
    background:#1e293b;
    border:1px solid #334155;
    border-radius:15px;

    padding:20px;

    margin-bottom:25px;
}

.parameter-section h2{
    margin-bottom:20px;
}

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

/* -----------------------------
   ALARM PANEL
------------------------------ */

.alarm-section{
    background:#1e293b;
    border:1px solid #334155;
    border-radius:15px;

    padding:20px;

    margin-bottom:25px;
}

.alarm-card{
    background:#064e3b;
    border-radius:15px;
    padding:25px;
    text-align:center;
}

.alarm-card h3{
    color:#10b981;
    margin-bottom:15px;
}

/* -----------------------------
   DEVICE STATUS
------------------------------ */

.device-section{
    background:#1e293b;
    border:1px solid #334155;
    border-radius:15px;

    padding:20px;

    margin-bottom:20px;
}

.device-section h2{
    margin-bottom:20px;
}

/* -----------------------------
   RESPONSIVE
------------------------------ */

@media(max-width:768px){

    header{
        flex-direction:column;
        gap:20px;
        text-align:center;
    }

    .header-right{
        text-align:center;
    }

    .header-center h1{
        font-size:20px;
    }

    .card h2{
        font-size:28px;
    }

}