/* =====================================================
   RESET
===================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial,sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{
    min-height:100vh;
    background-image:
        linear-gradient(
            rgba(255,255,255,.2),
            rgba(255,255,255,.2)
        ),
        url("background.png");
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    background-attachment:fixed;
}

/* =====================================================
   SIDEBAR
===================================================== */

.sidebar{
    position:fixed;
    top:0;
    left:0;
    width:250px;
    height:100vh;
    background:linear-gradient(180deg,#0d2f8d,#123fbb);
    display:flex;
    flex-direction:column;
    overflow:hidden;
    transition:.35s ease;
    z-index:1000;
}

.sidebar::before{
    content:"";
    position:absolute;
    inset:0;
    background:url("sidebar.png") center bottom no-repeat;
    background-size:100% auto;
    opacity:.15;
}

.sidebar>*{
    position:relative;
    z-index:2;
}

/* =====================================================
   LOGO
===================================================== */

.logo{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    color:#fff;
    padding:28px 20px;
    border-bottom:1px solid rgba(255,255,255,.15);
}

.logo i{
    font-size:24px;
}

.logo h2{
    font-size:22px;
    font-weight:bold;
}

/* =====================================================
   MENU
===================================================== */

.sidebar ul{
    list-style:none;
    padding:20px 15px;
}

.sidebar ul li{
    margin-bottom:10px;
}

.sidebar ul li a{
    display:flex;
    align-items:center;
    gap:14px;
    color:#fff;
    text-decoration:none;
    padding:14px 18px;
    border-radius:14px;
    transition:.3s;
    font-size:16px;
}

.sidebar ul li a:hover{
    background:rgba(255,255,255,.12);
    transform:translateX(5px);
}

.sidebar ul li a.active{
    background:#1d63da;
    box-shadow:0 8px 20px rgba(0,0,0,.25);
}

.sidebar ul li a i{
    width:20px;
    text-align:center;
}

/* =====================================================
   MAIN CONTENT
===================================================== */

.main-content{
    margin-left:250px;
    padding:35px;
    min-height:100vh;
    transition:.35s;
}

.container{
    max-width:1200px;
    margin:auto;
}

/* =====================================================
   OVERLAY
===================================================== */

.overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    opacity:0;
    visibility:hidden;
    transition:.3s;
    z-index:999;
}

.overlay.show{
    opacity:1;
    visibility:visible;
}

/* =====================================================
   HAMBURGER
===================================================== */

.menu-toggle{
    display:none;
    position:fixed;
    top:15px;
    left:15px;
    width:45px;
    height:45px;
    border:none;
    border-radius:10px;
    background:#1e3a8a;
    color:#fff;
    cursor:pointer;
    font-size:20px;
    z-index:1001;
}

/* =====================================================
   DATA BOX
===================================================== */

.data-box{
    background:#fff;
    padding:35px;
    border-radius:20px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

h1{
    text-align:center;
    color:#1e3a8a;
    margin-bottom:35px;
    font-size:36px;
}

/* =====================================================
   FORM BOX
===================================================== */

.form-box{
    background:#f8fbff;
    padding:30px;
    border-radius:18px;
    margin-bottom:35px;
    border:1px solid #e5edf9;
}

.form-box h2,
.table-box h2{
    color:#1e3a8a;
    margin-bottom:25px;
    font-size:26px;
}

/* =====================================================
   FORM
===================================================== */

form{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:20px;
}

.form-group{
    display:flex;
    flex-direction:column;
}

.form-group:last-of-type{
    grid-column:1 / -1;
}

label{
    font-weight:600;
    margin-bottom:8px;
    color:#374151;
    font-size:15px;
}

/* =====================================================
   INPUT
===================================================== */

input,
select,
textarea{
    width:100%;
    padding:13px 15px;
    border:1px solid #d1d5db;
    border-radius:10px;
    font-size:15px;
    transition:.25s;
    outline:none;
    background:#fff;
}

input:focus,
select:focus,
textarea:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

textarea{
    min-height:110px;
    resize:vertical;
}

/* =====================================================
   BUTTON
===================================================== */

.button-group{
    grid-column:1 / -1;

    display:inline-flex;
    gap:15px;

    justify-content:flex-start;
    align-items:center;

    width:auto;
}

.simpan-btn,
.batal-btn{

    display:inline-flex;
    justify-content:center;
    align-items:center;

    width:200px;
    height:48px;

    border:none;
    border-radius:10px;

    font-size:15px;
    font-weight:600;

    text-decoration:none;

    cursor:pointer;
}

.simpan-btn{
    background:#1e3a8a;
    color:#fff;
}
.simpan-btn:hover{
    background:#2563eb;
    transform:translateY(-2px);
    box-shadow:0 8px 20px rgba(37,99,235,.25);
}

.batal-btn{
    background:#dc2626;
    color:#fff;
}

.batal-btn:hover{
    background:#b91c1c;
    transform:translateY(-2px);
    box-shadow:0 8px 20px rgba(220,38,38,.25);
}
/* =====================================================
   TABLE BOX
===================================================== */

.table-box{
    background:#fff;
}

.table-box h2{
    margin-bottom:20px;
}

/* =====================================================
   RESPONSIVE TABLE
===================================================== */

.table-responsive{
    width:100%;
    overflow-x:auto;
    border-radius:15px;
}

.table-responsive::-webkit-scrollbar{
    height:8px;
}

.table-responsive::-webkit-scrollbar-thumb{
    background:#b5c7f3;
    border-radius:20px;
}

/* =====================================================
   TABLE
===================================================== */

table{
    width:100%;
    min-width:850px;
    border-collapse:collapse;
    background:#fff;
}

thead th{
    background:#1e3a8a;
    color:#fff;
    padding:16px;
    font-size:15px;
    text-align:center;
    white-space:nowrap;
}

tbody td{
    padding:15px;
    border-bottom:1px solid #ececec;
    text-align:center;
    font-size:14px;
    color:#444;
    vertical-align:middle;
}

tbody tr{
    transition:.25s;
}

tbody tr:hover{
    background:#eef5ff;
}

/* =====================================================
   ACTION BUTTON
===================================================== */

td:last-child{
    white-space:nowrap;
}

.edit-btn,
.hapus-btn{
    display:inline-block;
    text-decoration:none;
    padding:9px 16px;
    border-radius:8px;
    font-size:14px;
    font-weight:600;
    transition:.25s;
}

.edit-btn{
    background:#f59e0b;
    color:#fff;
    margin-right:6px;
}

.edit-btn:hover{
    background:#d97706;
    transform:translateY(-2px);
}

.hapus-btn{
    background:#dc2626;
    color:#fff;
}

.hapus-btn:hover{
    background:#b91c1c;
    transform:translateY(-2px);
}

/* =====================================================
   EMPTY DATA
===================================================== */

tbody td[colspan]{
    padding:30px;
    color:#666;
    font-style:italic;
}

/* =====================================================
   TABLET
===================================================== */

@media (max-width:992px){

    .main-content{
        padding:25px;
    }

    form{
        grid-template-columns:1fr;
    }

    .form-group:last-of-type{
        grid-column:auto;
    }

   .button-group{
    flex-direction:column;
}

.simpan-btn,
.batal-btn{
    width:100%;
}

}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width:768px){

    /* Hamburger */

    .menu-toggle{
        display:flex;
        justify-content:center;
        align-items:center;
    }

    /* Sidebar */

    .sidebar{
        transform:translateX(-100%);
        width:260px;
        box-shadow:5px 0 20px rgba(0,0,0,.2);
    }

    .sidebar.show{
        transform:translateX(0);
    }

    /* Main */

    .main-content{
        margin-left:0;
        padding:75px 15px 20px;
    }

    .data-box{
        padding:20px;
        border-radius:15px;
    }

    h1{
        font-size:28px;
        margin-bottom:25px;
    }

    .form-box{
        padding:20px;
    }

    .form-box h2,
    .table-box h2{
        font-size:22px;
    }

    form{
        grid-template-columns:1fr;
        gap:16px;
    }
.button-group{
    flex-direction:column;
}

.simpan-btn,
.batal-btn{
    width:100%;
}

    table{
        min-width:700px;
    }

}

/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width:480px){

    .main-content{
        padding:70px 12px 15px;
    }

    .data-box{
        padding:15px;
    }

    h1{
        font-size:24px;
    }

    .form-box{
        padding:15px;
    }

    .form-box h2,
    .table-box h2{
        font-size:20px;
    }

    label{
        font-size:14px;
    }

    input,
    select,
    textarea{
        font-size:14px;
        padding:12px;
    }

    .edit-btn,
    .hapus-btn{
        padding:8px 12px;
        font-size:13px;
    }

    table{
        min-width:650px;
    }

}
