/* ======================================================
   RESET
====================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial, Helvetica, sans-serif;
}

body{
    background:#eef3f7;
    color:#333;
}

/* ======================================================
   HEADER
====================================================== */

header{

    background:#0d6efd;

    color:white;

    padding:35px 20px;

    text-align:center;

    box-shadow:0 3px 10px rgba(0,0,0,.15);

}

header h1{

    font-size:36px;

    margin-bottom:10px;

}

header p{

    font-size:18px;

    opacity:.9;

}

/* ======================================================
   MAIN
====================================================== */

main{

    width:90%;

    max-width:1200px;

    margin:40px auto;

}

/* ======================================================
   STATUS
====================================================== */

.status-section{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:20px;

    margin-bottom:35px;

}

.status-card{

    background:white;

    border-radius:15px;

    padding:25px;

    text-align:center;

    box-shadow:0 5px 15px rgba(0,0,0,.08);

}

.status-card h3{

    color:#0d6efd;

    margin-bottom:15px;

}

.status-card p{

    font-size:22px;

    font-weight:bold;

}

/* ======================================================
   SENSOR
====================================================== */

.sensor-section{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:25px;

    margin-bottom:40px;

}

.sensor-card{

    position:relative;

    background:white;

    border-radius:18px;

    padding:30px;

    text-align:center;

    box-shadow:0 6px 15px rgba(0,0,0,.08);

    transition:.3s;

    cursor:pointer;

}

.sensor-card:hover{

    transform:translateY(-6px);

}

.sensor-card h2{

    color:#0d6efd;

    margin-bottom:20px;

}

.temperature{

    font-size:38px;

    font-weight:bold;

    margin-bottom:20px;

}

.sensor-card p{

    font-size:20px;

    font-weight:bold;

}

/* ======================================================
   TOOLTIP
====================================================== */

.tooltip{

    position:absolute;

    left:50%;

    top:105%;

    transform:translateX(-50%) translateY(10px);

    width:280px;

    background:#1f2937;

    color:white;

    padding:16px;

    border-radius:12px;

    font-size:14px;

    line-height:1.6;

    text-align:left;

    box-shadow:0 10px 25px rgba(0,0,0,.25);

    opacity:0;

    visibility:hidden;

    transition:all .25s ease;

    z-index:1000;

}

/* Panah tooltip */

.tooltip::before{

    content:"";

    position:absolute;

    top:-8px;

    left:50%;

    transform:translateX(-50%);

    border-left:8px solid transparent;

    border-right:8px solid transparent;

    border-bottom:8px solid #1f2937;

}

.sensor-card:hover .tooltip{

    opacity:1;

    visibility:visible;

    transform:translateX(-50%) translateY(0);

}

/* ======================================================
   CHART
====================================================== */

.chart-section{

    background:white;

    border-radius:18px;

    padding:20px;

    margin-bottom:30px;

    box-shadow:0 5px 15px rgba(0,0,0,.08);

}

.chart-section h2{

    margin-bottom:20px;

}

#historyChart{

    width:100% !important;

    height:300px !important;

}

/* ======================================================
   HISTORY
====================================================== */

.history-section{

    background:white;

    border-radius:18px;

    padding:30px;

    margin-bottom:40px;

    box-shadow:0 5px 15px rgba(0,0,0,.08);

}

.history-section h2{

    margin-bottom:20px;

}

table{

    width:100%;

    border-collapse:collapse;

}

th{

    background:#0d6efd;

    color:white;

    padding:14px;

}

td{

    padding:14px;

    text-align:center;

    border-bottom:1px solid #ddd;

}

/* ======================================================
   FOOTER
====================================================== */

footer{

    background:#0d6efd;

    color:white;

    text-align:center;

    padding:20px;

}

/* ======================================================
   RESPONSIVE
====================================================== */

@media(max-width:900px){

    .status-section{

        grid-template-columns:1fr;

    }

    .sensor-section{

        grid-template-columns:1fr;

    }

    .tooltip{

        width:240px;

        font-size:13px;

    }

}

/* ===============================
   Tanggal & Jam
================================ */

.tanggal-tabs,
.jam-tabs{

    display:flex;

    gap:12px;

    overflow-x:auto;

    margin:15px 0 25px;

    padding-bottom:8px;

    scroll-behavior:smooth;

}

.tanggal-tabs::-webkit-scrollbar,
.jam-tabs::-webkit-scrollbar{

    height:6px;

}

.tanggal-tabs::-webkit-scrollbar-thumb,
.jam-tabs::-webkit-scrollbar-thumb{

    background:#bdbdbd;

    border-radius:20px;

}

.tanggal-tab,
.jam-tab{

    flex:0 0 auto;

    padding:10px 18px;

    border-radius:25px;

    border:2px solid #ddd;

    background:white;

    cursor:pointer;

    font-weight:bold;

    transition:.25s;

}

.tanggal-tab:hover,
.jam-tab:hover{

    background:#0d6efd;

    color:white;

}

.active-tab{

    background:#0d6efd;

    color:white;

    border-color:#0d6efd;

}

/* ===============================
   Judul Monitoring
================================ */

.judul-monitoring{

    background:#0d6efd;

    color:white;

    padding:12px;

    font-weight:bold;

    font-size:17px;

}

/* ===============================
   Animasi Scroll
================================ */

html{

    scroll-behavior:smooth;

}
