/* ==========================================================
   IoT Monitoring System
   assets/css/style.css
========================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    font-family:Arial, Helvetica, sans-serif;
    background:#f4f6f9;
    color:#333;
    height:100%;
}

/* ==========================================================
   NAVBAR
========================================================== */

.navbar{
    height:65px;
    background:#0d6efd;
    color:#fff;
    box-shadow:0 2px 10px rgba(0,0,0,.15);
}

.navbar-brand{
    color:#fff !important;
    font-weight:bold;
}

.navbar .user-name{
    color:#fff;
    font-size:14px;
}

/* ==========================================================
   SIDEBAR
========================================================== */

.sidebar{

    position:fixed;

    top:65px;

    left:0;

    width:240px;

    height:100%;

    background:#212529;

    overflow:auto;

    z-index:1000;

}

.sidebar ul{

    list-style:none;

    margin:0;

    padding:0;

}

.sidebar ul li{

    border-bottom:1px solid #2f343a;

}

.sidebar ul li a{

    display:block;

    color:#ffffff;

    padding:15px;

    text-decoration:none;

    transition:.3s;

}

.sidebar ul li a:hover{

    background:#0d6efd;

    padding-left:25px;

}

.sidebar ul li.active{

    background:#0d6efd;

}

/* ==========================================================
   CONTENT
========================================================== */

.content{

    margin-left:240px;

    margin-top:65px;

    padding:20px;

}

/* ==========================================================
   PAGE TITLE
========================================================== */

.page-title{

    font-size:24px;

    font-weight:bold;

    margin-bottom:20px;

}

/* ==========================================================
   CARD DEVICE
========================================================== */

.device-card{

    border:none;

    border-radius:15px;

    background:#ffffff;

    box-shadow:0 5px 15px rgba(0,0,0,.08);

    transition:.3s;

    margin-bottom:20px;

}

.device-card:hover{

    transform:translateY(-5px);

}

.device-header{

    background:#0d6efd;

    color:#ffffff;

    border-radius:15px 15px 0 0;

    padding:12px;

    font-weight:bold;

    text-align:center;

}

/* ==========================================================
   SENSOR VALUE
========================================================== */

.sensor-title{

    font-size:14px;

    color:#777;

}

.sensor-value{

    font-size:28px;

    font-weight:bold;

    color:#0d6efd;

}

.sensor-unit{

    font-size:13px;

    color:#888;

}

/* ==========================================================
   STATUS
========================================================== */

.status-online{

    background:#198754;

    color:white;

    padding:6px 15px;

    border-radius:20px;

    font-size:13px;

}

.status-offline{

    background:#dc3545;

    color:white;

    padding:6px 15px;

    border-radius:20px;

    font-size:13px;

}

/* ==========================================================
   RELAY
========================================================== */

.relay-on{

    background:#198754;

    color:#fff;

    border:none;

}

.relay-off{

    background:#dc3545;

    color:#fff;

    border:none;

}

.btn-relay{

    width:100%;

    height:45px;

    border-radius:8px;

    font-weight:bold;

}

/* ==========================================================
   TABLE
========================================================== */

.table{

    background:white;

}

.table th{

    background:#0d6efd;

    color:white;

}

.table td{

    vertical-align:middle;

}

/* ==========================================================
   LOGIN
========================================================== */

.login-page{

    height:100vh;

    display:flex;

    justify-content:center;

    align-items:center;

    background:#0d6efd;

}

.login-card{

    width:400px;

    background:white;

    border-radius:15px;

    padding:30px;

    box-shadow:0 10px 30px rgba(0,0,0,.2);

}

.login-title{

    text-align:center;

    font-size:28px;

    font-weight:bold;

    margin-bottom:25px;

}

.login-logo{

    width:90px;

    display:block;

    margin:auto;

    margin-bottom:20px;

}

/* ==========================================================
   FORM
========================================================== */

.form-control{

    border-radius:8px;

}

.form-control:focus{

    box-shadow:none;

    border-color:#0d6efd;

}

.btn-primary{

    border-radius:8px;

}

/* ==========================================================
   CHART
========================================================== */

.chart-card{

    background:white;

    border-radius:15px;

    padding:20px;

    box-shadow:0 5px 15px rgba(0,0,0,.08);

}

/* ==========================================================
   FOOTER
========================================================== */

.footer{

    text-align:center;

    margin-top:30px;

    color:#777;

    font-size:14px;

}

/* ==========================================================
   LOADING
========================================================== */

.loading{

    text-align:center;

    padding:30px;

}

.loading img{

    width:60px;

}

/* ==========================================================
   BADGE DEVICE
========================================================== */

.badge-device{

    font-size:13px;

    padding:8px 15px;

}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media(max-width:992px){

.sidebar{

    width:70px;

}

.sidebar ul li a{

    text-align:center;

    padding:18px 5px;

}

.content{

    margin-left:70px;

}

}

@media(max-width:768px){

.content{

    margin-left:0;

}

.sidebar{

    display:none;

}

.navbar{

    position:fixed;

    width:100%;

    z-index:9999;

}

.device-card{

    margin-bottom:15px;

}

.sensor-value{

    font-size:22px;

}

.login-card{

    width:95%;

}

}

@media(max-width:576px){

.page-title{

    font-size:20px;

}

.sensor-value{

    font-size:18px;

}

.btn-relay{

    height:40px;

}

}