*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:'Poppins',sans-serif;
    background:#f4f7fc;
    color:#444;
}

.wrapper{
    display:flex;
}

.sidebar{
    width:250px;
    height:100vh;
    position:fixed;
    left:0;
    top:0;
    background:#ffffff;
    box-shadow:0 0 25px rgba(0,0,0,.08);
    padding:30px 20px;
}

.logo-area{
    text-align:center;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    margin-bottom:40px;
}

.logo-area h4{
    margin-top:15px;
    margin-bottom:5px;
    font-weight:600;
    text-align:center;
    color:#333;
}

.logo-area small{
    color:#888;
    display:block;
    text-align:center;
}

.logo-icon{
    width:70px;
    height:70px;
    border-radius:50%;
    background:#0d6efd;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:30px;
    margin:auto;
}

.logo-icon svg{
    width:38px;
    height:38px;
}

.menu{
    list-style:none;
    margin:35px 0 0;
    padding:0;
}

.menu li{
    margin:10px 0;
}

.menu li a{
    display:flex;
    align-items:center;
    gap:12px;
    padding:15px 20px;
    color:#333;
    text-decoration:none;
    border-radius:10px;
    font-size:17px;
    font-weight:500;
    transition:.2s;
}

.menu li a i{
    font-size:20px;
    color:#555;
}

.menu li.active a{
    background:transparent;
    color:#333;
}

.menu li.active a i{
    color:#555;
}

.menu li a:hover{
    background:#f1f5ff;
    color:#0d6efd;
}

.menu li a:hover i{
    color:#0d6efd;
}

.menu li a:active{
    background:#0d6efd;
    color:#fff;
}

.menu li a:active i{
    color:#fff;
}

.content{
    margin-left:250px;
    width:100%;
    padding:30px;
}

.topbar{
    background:white;
    border-radius:20px;
    padding:20px 30px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    box-shadow:0 10px 30px rgba(0,0,0,.05);
}

.top-right{
    display:flex;
    align-items:center;
    gap:20px;
}

.card-dashboard{
    border-radius:20px;
    color:white;
    padding:25px;
    box-shadow:0 12px 30px rgba(0,0,0,.08);
    transition:.3s;
    overflow:hidden;
    position:relative;
}

.card-dashboard:hover{
    transform:translateY(-8px);
}

.card-dashboard h6{
    font-size:15px;
    margin-top:20px;
    opacity:.9;
}

.card-dashboard h3{
    margin-top:10px;
    font-size:32px;
    font-weight:700;
}

.purple{
    background:linear-gradient(135deg,#6C63FF,#8A7FFF);
}

.blue{
    background:linear-gradient(135deg,#2196F3,#42A5F5);
}

.pink{
    background:linear-gradient(135deg,#EC407A,#F06292);
}

.orange{
    background:linear-gradient(135deg,#FF9800,#FFB74D);
}

.cyan{
    background:linear-gradient(135deg,#00BCD4,#4DD0E1);
}

.card-icon{
    width:60px;
    height:60px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.2);
    font-size:26px;
}

.card{
    border:none!important;
    border-radius:20px!important;
    box-shadow:0 10px 30px rgba(0,0,0,.05);
}

.card-header{
    background:white!important;
    border:none!important;
    padding:20px;
    font-weight:600;
}

.card-body{
    padding:25px;
}

.status-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 0;
    border-bottom:1px solid #ececec;
}

.status-row:last-child{
    border:none;
}

.badge{
    border-radius:20px;
    padding:8px 16px;
}

.table{
    margin-top:10px;
}

.table thead th{
    border:none;
    color:#777;
    font-weight:600;
}

.table tbody tr{
    background:#f9faff;
    transition:.3s;
}

.table tbody tr:hover{
    background:#eef3ff;
}

.table td{
    border:none;
    padding:16px;
}

.btn-danger{
    border-radius:12px;
    padding:10px 18px;
}

canvas{
    width:100%!important;
    height:350px!important;
}

body.page-login{
    min-height:100vh;
    background:#f8fafc;
    display:flex;
    justify-content:center;
    align-items:center;
}

.login-card{
    width:360px;
    background:#fff;
    border-radius:18px;
    padding:35px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
    animation:fade .5s ease;
}

@keyframes fade{

    from{
        opacity:0;
        transform:translateY(40px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }

}

.login-card .logo{
    width:70px;
    height:70px;
    font-size:30px;
    background:#0d6efd;
    border-radius:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    color:white;
    margin:auto;
}

.login-card .logo svg{
    width:34px;
    height:34px;
}

.login-card .title{
    font-size:24px;
    font-weight:600;
    margin-top:15px;
    text-align:center;
}

.login-card .subtitle{
    font-size:13px;
    color:#777;
    margin-bottom:25px;
    text-align:center;
}

.login-card .input-group{
    margin-bottom:20px;
}

.login-card .input-group-text{
    background:#f5f6fb;
    border:none;
    border-radius:12px 0 0 12px;
}

.login-card .form-control{
    height:45px;
    font-size:14px;
}

.login-card .form-control:focus{
    box-shadow:none;
    background:#f5f6fb;
}

.login-card .password-box{
    position:relative;
}

.login-card #togglePassword{
    position:absolute;
    right:18px;
    top:50%;
    transform:translateY(-50%);
    cursor:pointer;
    font-size:20px;
    color:#777;
    z-index:100;
}

.login-card .btn-login{
    width:100%;
    height:45px;
    border:none;
    border-radius:10px;
    background:#0d6efd;
    color:white;
    font-size:15px;
    font-weight:600;
    transition:.3s;
}

.login-card .btn-login:hover{
    background:#0b5ed7;
    transform:translateY(-3px);
    box-shadow:0 15px 30px rgba(79,142,247,.35);
}

.login-card .footer{
    margin-top:25px;
    text-align:center;
    font-size:13px;
    color:#888;
}

body.page-riwayat{
    background:#f4f6f9;
    font-family:'Poppins',sans-serif;
}

body.page-riwayat .card{
    border:none;
    border-radius:15px;
}

body.page-riwayat .table th{
    background:#0d6efd;
    color:white;
}

@media (max-width:992px){

    .sidebar{
        width:220px;
        padding:20px 15px;
    }

    .content{
        margin-left:220px;
        padding:20px;
    }

    .card-dashboard h3{
        font-size:26px;
    }

    canvas{
        height:300px !important;
    }

}

@media (max-width:768px){

    body{
        overflow-x:hidden;
    }

    .wrapper{
        display:block;
    }

    .sidebar{
        width:100%;
        height:auto;
        position:relative;
        left:auto;
        top:auto;
        padding:15px;
        box-shadow:none;
    }

    .logo-area{
        margin-bottom:20px;
    }

    .logo-icon{
        width:55px;
        height:55px;
        font-size:24px;
    }

    .logo-area h4{
        font-size:18px;
    }

    .logo-area small{
        font-size:12px;
    }

    .menu{
        display:flex;
        justify-content:center;
        flex-wrap:wrap;
        gap:10px;
        margin-top:15px;
    }

    .menu li{
        margin:0;
    }

    .menu li a{
        padding:10px 14px;
        font-size:14px;
    }

    .content{
        margin-left:0;
        padding:15px;
    }

    .topbar{
        flex-direction:column;
        gap:10px;
        text-align:center;
        padding:15px;
    }

    .top-right{
        flex-direction:column;
        gap:10px;
    }

    .card-dashboard{
        padding:20px;
        margin-bottom:15px;
    }

    .card-dashboard h3{
        font-size:22px;
    }

    .card-dashboard h6{
        font-size:13px;
    }

    .card-icon{
        width:50px;
        height:50px;
        font-size:20px;
    }

    .status-row{
        flex-direction:column;
        align-items:flex-start;
        gap:8px;
    }

    .card-header{
        padding:15px;
        font-size:15px;
    }

    .card-body{
        padding:15px;
    }

    .table-responsive{
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
    }

    .table{
        min-width:900px;
        font-size:13px;
    }

    .table td,
    .table th{
        white-space:nowrap;
        padding:10px;
    }

    canvas{
        height:240px !important;
    }

    .btn{
        width:100%;
    }

}

@media (max-width:768px){

    body{
        overflow-x:hidden;
    }

    .wrapper{
        display:block;
    }

    .sidebar{
        width:100%;
        height:auto;
        position:relative;
        left:auto;
        top:auto;
        padding:15px;
        box-shadow:none;
    }

    .logo-area{
        margin-bottom:20px;
    }

    .logo-icon{
        width:55px;
        height:55px;
        font-size:24px;
    }

    .logo-area h4{
        font-size:18px;
    }

    .logo-area small{
        font-size:12px;
    }

    .menu{
        display:flex;
        justify-content:center;
        flex-wrap:wrap;
        gap:10px;
        margin-top:15px;
    }

    .menu li{
        margin:0;
    }

    .menu li a{
        padding:10px 14px;
        font-size:14px;
    }

    .content{
        margin-left:0;
        padding:15px;
    }

    .topbar{
        flex-direction:column;
        gap:10px;
        text-align:center;
        padding:15px;
    }

    .top-right{
        flex-direction:column;
        gap:10px;
    }

    .card-dashboard{
        padding:20px;
        margin-bottom:15px;
    }

    .card-dashboard h3{
        font-size:22px;
    }

    .card-dashboard h6{
        font-size:13px;
    }

    .card-icon{
        width:50px;
        height:50px;
        font-size:20px;
    }

    .status-row{
        flex-direction:column;
        align-items:flex-start;
        gap:8px;
    }

    .card-header{
        padding:15px;
        font-size:15px;
    }

    .card-body{
        padding:15px;
    }

    /* ========================= */
    /* TABEL RIWAYAT MOBILE */
    /* ========================= */

    .table-responsive{
        overflow:visible;
    }

    .table{
        width:100%;
        min-width:100%;
        border:0;
        font-size:13px;
    }

    .table thead{
        display:none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td{
        display:block;
        width:100%;
    }

    .table tr{
        background:#fff;
        margin-bottom:15px;
        border-radius:12px;
        padding:10px;
        box-shadow:0 3px 10px rgba(0,0,0,.08);
        border:none;
    }

    .table td{
        border:none;
        position:relative;
        text-align:right;
        padding:8px 10px;
        padding-left:50%;
        white-space:normal;
        word-break:break-word;
    }

    .table td::before{
        position:absolute;
        left:10px;
        top:8px;
        font-weight:600;
        color:#333;
        text-align:left;
    }

    .table td:nth-child(1)::before{
        content:"No";
    }

    .table td:nth-child(2)::before{
        content:"Waktu";
    }

    .table td:nth-child(3)::before{
        content:"Status";
    }

    .table td:nth-child(4)::before{
        content:"Tegangan";
    }

    .table td:nth-child(5)::before{
        content:"Arus";
    }

    .table td:nth-child(6)::before{
        content:"Daya";
    }

    .table td:nth-child(7)::before{
        content:"Energi";
    }

    .table td:nth-child(8)::before{
        content:"Sumber";
    }

    .btn{
        width:100%;
        margin-bottom:8px;
    }

    canvas{
        height:240px !important;
    }

}

@media (max-width:480px){

    .content{
        padding:10px;
    }

    .topbar{
        padding:12px;
    }

    .topbar h3{
        font-size:18px;
    }

    .card-dashboard{
        padding:15px;
    }

    .card-dashboard h3{
        font-size:20px;
    }

    .card-dashboard h6{
        font-size:12px;
    }

    .card-icon{
        width:45px;
        height:45px;
        font-size:18px;
    }

    .badge{
        padding:5px 10px;
        font-size:11px;
    }

    .table td{
        font-size:12px;
        padding-left:45%;
    }

    canvas{
        height:220px !important;
    }

}