
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
/* ==================================
   RESET
================================== */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

body{
    background:linear-gradient(135deg,#ffe6f0,#e6f7ff);
    overflow:hidden;
}

/* ==================================
   LAYOUT
================================== */
.container{
    display:flex;
    height:100vh;
}

/* ==================================
   SIDEBAR
================================== */
.sidebar{
    width:170px;
    background:#efacb8;
    padding:15px;
    color:white;
    box-shadow:2px 0 10px rgba(0,0,0,.08);
}

.sidebar h2{
    text-align:center;
    font-size:22px;
    font-weight:700;
    margin-bottom:20px;
}

.sidebar a{
    display:block;
    text-decoration:none;
    text-align:center;
    color:white;
    padding:12px;
    margin-bottom:10px;
    border-radius:12px;
    background:rgba(255,255,255,.25);
    transition:.3s;
    font-size:15px;
    font-weight:500;
}

.sidebar a:hover{
    background:white;
    color:#ff69b4;
}

/* ==================================
   MAIN
================================== */
.main{
    flex:1;
    padding:8px;
    display:flex;
    flex-direction:column;
    height:100vh;
}

/* ==================================
   HEADER
================================== */
.header{
    background:white;
    border-radius:18px;
    padding:14px 20px;
    margin-bottom:10px;
    text-align:center;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
}

.header h1{
    font-size:30px;
    font-weight:700;
    color:#ff5c9a;
    margin-bottom:4px;
}

.subtitle{
    font-size:15px;
    color:#666;
    font-weight:500;
}

/* ==================================
   GRID DASHBOARD
================================== */
.grid{
    flex:1;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    grid-template-rows:90px 90px 1fr;
    gap:10px;
    min-height:0;
}

/* ==================================
   CARD
================================== */
.card{
    border-radius:16px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:8px;
    box-shadow:0 3px 10px rgba(0,0,0,.08);
}

.card h3{
    font-size:16px;
    font-weight:600;
    color:#222;
    margin-bottom:6px;
}

#avgHumidity,
#avgTemp,
#pumpStatus{
    font-size:22px;
    font-weight:700;
    color:#1e293b;
}

#clock{
    font-size:20px;
    font-weight:700;
    color:#1e293b;
}

.card small{
    font-size:14px;
    line-height:1.7;
    color:#333;
}

/* ==================================
   WARNA CARD
================================== */
.pink{background:#efd0dc;}
.purple{background:#d7c1eb;}
.blue{background:#c8d8ec;}
.yellow{background:#ece2b5;}

/* ==================================
   CHART
================================== */
.chart{
    grid-column:1/4;
    background:white;
    border-radius:18px;
    padding:12px;
    box-shadow:0 3px 10px rgba(0,0,0,.08);
    display:flex;
    flex-direction:column;
    min-height:0;
}

.chart-title{
    text-align:center;
    font-size:16px;
    font-weight:600;
    margin-bottom:8px;
}

.chart canvas{
    width:100%!important;
    height:100%!important;
}

/* ==================================
   TABLE
================================== */
.table-container{
    background:white;
    border-radius:16px;
    overflow:auto;
}

table{
    width:100%;
    border-collapse:collapse;
}

th{
    background:#efacb8;
    color:white;
}

th,td{
    padding:10px;
    border:1px solid #ddd;
    text-align:center;
}

/* ==================================
   PENGATURAN
================================== */
.settings-container{
    flex:1;
    display:flex;
    justify-content:center;
    align-items:center;
    width:100%;
}

/* ==================================
   FORM PASSWORD
================================== */
.form-box{
    width:100%;
    max-width:480px;

    background:white;

    padding:24px;

    border-radius:20px;

    box-shadow:0 4px 15px rgba(0,0,0,.08);
}

.form-box h2{
    text-align:center;
    font-size:21px;
    font-weight:700;
    margin-bottom:16px;
}

.form-box label{
    display:block;
    margin-bottom:6px;
    font-size:15px;
    font-weight:600;
}

.form-box input{
    width:100%;
    padding:11px 14px;
    margin-bottom:12px;

    border:1px solid #ddd;
    border-radius:10px;

    font-size:15px;
    outline:none;
}

.form-box input:focus{
    border-color:#ff69b4;
    box-shadow:0 0 8px rgba(255,105,180,.25);
}

.form-box button{
    width:100%;
    padding:11px;

    border:none;
    border-radius:10px;

    background:#ff69b4;
    color:white;

    font-size:15px;
    font-weight:600;

    cursor:pointer;

    transition:.3s;
}

.form-box button:hover{
    background:#ff4ea1;
}

/* ==================================
   RESPONSIVE
================================== */
@media(max-width:900px){

    body{
        overflow:auto;
    }

    .container{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
        height:auto;
    }

    .grid{
        grid-template-columns:1fr;
        grid-template-rows:auto;
    }

    .chart{
        grid-column:auto;
        height:350px;
    }

    .header h1{
        font-size:22px;
    }

    .form-box{
        max-width:95%;
        padding:20px;
    }
}