/*==================================================
    GOOGLE FONT
==================================================*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/*==================================================
    RESET
==================================================*/

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

:root{
    --primary:#2563eb;
    --primary-dark:#1d4ed8;
    --success:#22c55e;
    --warning:#f59e0b;
    --danger:#ef4444;

    --bg:#f5f7fb;
    --white:#ffffff;

    --text:#222;
    --text-light:#777;

    --border:#e7eaf3;

    --shadow:0 8px 30px rgba(0,0,0,.06);

    --radius:18px;

    --transition:.30s;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Poppins',sans-serif;
    background:var(--bg);
    color:var(--text);
    overflow-x:hidden;
}

/*==================================================
    WRAPPER
==================================================*/

.wrapper{
    display:flex;
    min-height:100vh;
}

/*==================================================
    SIDEBAR
==================================================*/

.sidebar{
    width:270px;
    background:#fff;
    border-right:1px solid var(--border);
    display:flex;
    flex-direction:column;
    padding:22px;
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    overflow-y:auto;
    transition:all .3s;
}

/*==================================================
    LOGO
==================================================*/

.logo{
    display:flex;
    align-items:center;
    gap:15px;
    margin-bottom:35px;
}

.logo-icon{
    width:52px;
    height:52px;
    border-radius:14px;
    background:linear-gradient(135deg,#3b82f6,#2563eb);
    color:#fff;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:22px;
    box-shadow:0 12px 25px rgba(37,99,235,.30);
}

.logo h3{
    font-size:18px;
    font-weight:700;
}

.logo span{
    font-size:13px;
    color:#888;
}

/*==================================================
    MENU
==================================================*/
.menu{
    list-style:none;
    padding:0;
}

.menu li{
    margin-bottom:2px;
}

.menu li a{
    display:flex;
    align-items:center;
    justify-content:start;
    text-decoration:none;
    color:#444;
    padding:8px;
    border-radius:14px 16px;
    transition:var(--transition);
    font-size:12px;
    font-weight:500;
}

/* Icon pada kiri menu */
.menu li a i:first-child{
    width:10%;
    margin-right:10px;
    text-align: center;
}

/* Tulisan pada menu */
.menu li a .menu-left{
    width:80%;
    margin-right:10px;
}

/* Icon pada kanan menu */
.menu li a i:last-child{
    width:10%;
}

.menu li a:hover{
    background:#edf4ff;
    color:blue;
}

.menu li.active a{
    background:linear-gradient(135deg,#2563eb,#3b82f6);
    color:#fff;
    box-shadow:0 10px 25px rgba(37,99,235,.35);
}

.menu li.active a:hover{
    color:blue;
}

.menu li a .fa-angle-down{
    margin-left:auto;
    font-size:12px;
    opacity:.7;
}

/*=========================================
    SUBMENU
=========================================*/
.submenu{
    list-style:none;
    max-height:0;
    overflow:hidden;
    transition:max-height .35s ease;
    margin-left:18px;
    padding:0;
}

.submenu li{
    margin:3px 0;
}

.submenu li a{
    display:block;
    text-decoration:none;
    color:#777;
    padding:6px 15px;
    border-radius:10px;
    font-size:14px;
    transition:.3s;
}

.submenu li a:hover{
    background:#edf4ff;
    color:#2563eb;
}

.has-submenu.active .submenu{
    max-height:500px;
}

.submenu li.active a{
    background:#2563eb;
    color:#fff;
}

.menu li.active>a i{
    color:#fff;
}

.has-submenu.active>.menu-toggle{
    color:#2563eb;
    background:#edf4ff;
}

.has-submenu{
    overflow:hidden;
}

.menu-toggle{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.menu-toggle span{
    display:flex;
    align-items:center;
    gap:12px;
}

.arrow{
    transition:.3s;
    font-size:12px;
}

.has-submenu.active .arrow{
    transform:rotate(180deg);
}

.has-submenu.active > .menu-toggle{
    background:linear-gradient(135deg,#2563eb,#3b82f6);
    color:#fff !important;
}

.has-submenu.active > .menu-toggle i,
.has-submenu.active > .menu-toggle span{
    color:#fff !important;
}

/*==================================================
    SIDEBAR CARD
==================================================*/
.sidebar-card{
    margin-top:30px;
    background:linear-gradient(135deg,#2563eb,#3b82f6);
    border-radius:22px;
    padding:15px;
    text-align:center;
    color:#fff;
    box-shadow:0 20px 40px rgba(37,99,235,.30);
}

.sidebar-card img{
    width:100%;
    margin-bottom:20px;
}

.sidebar-card h3{
    font-size:20px;
    margin-bottom:6px;
}

.sidebar-card p{
    font-size:14px;
    opacity:.85;
}

/*==================================================
    LOGOUT
==================================================*/
.logout{
    margin-top:auto;
    padding-top:30px;
}

.logout a{
    display:flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
    color:#666;
    padding:15px;
    border-radius:14px;
    transition:.3s;
    font-weight:500;
}

.logout a:hover{
    background:#fff2f2;
    color:#ef4444;
}

/*==================================================
    SIDEBAR SCROLLBAR
==================================================*/
.sidebar::-webkit-scrollbar{
    width:8px;
}

.sidebar::-webkit-scrollbar-thumb{
    background:#d8d8d8;
    border-radius:20px;
}

.sidebar::-webkit-scrollbar-track{
    background:transparent;
}

/*==================================================
    CONTENT
==================================================*/
.content{
    margin-left:270px;
    width:calc(100% - 270px);
    min-height:100vh;
    padding:30px;
}

/*==================================================
    SIDEBAR COLLAPSE (dipakai JS nanti)
==================================================*/
.sidebar.hide{
    width:90px;
}
.sidebar.hide .logo h3,
.sidebar.hide .logo span,
.sidebar.hide .menu span,
.sidebar.hide .sidebar-card,
.sidebar.hide .logout span{
    display:none;
}

.sidebar.hide + .content{
    margin-left:90px;
    width:calc(100% - 90px);
}

/*==================================================
    RESPONSIVE
==================================================*/
@media(max-width:992px){
    .sidebar{
        left:-280px;
        z-index:999;
    }

    .sidebar.show{
        left:0;
    }

    .content{
        margin-left:0;
        width:100%;
        padding:20px;
    }
}

@media(max-width:576px){
    .sidebar{
        width:250px;
    }

    .content{
        padding:15px;
    }
}

/*=========================================
    PAGE HEADER
=========================================*/
.page-header{
    grid-area:header;
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
    padding:25px 30px;
    background:#ffffff;
    border-radius:18px;
    box-shadow:0 8px 20px rgba(0,0,0,.06);
}

.page-header-left h2{
    display:flex;
    align-items:center;
    gap:12px;
    font-size:28px;
    color:#1e293b;
    margin-bottom:10px;
}

.page-header-left h2 i{
    color:#2563eb;
}

.page-header-left p{
    color:#64748b;
    font-size:12px;
    margin-bottom:15px;
}

.breadcrumb{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:12px;
}

.breadcrumb a{
    text-decoration:none;
    color:#2563eb;
    transition:.3s;
}

.breadcrumb a:hover{
    color:#1d4ed8;
}

.breadcrumb span{
    color:#94a3b8;
}

.breadcrumb .active{
    color:#475569;
    font-weight:600;
}

.page-header-right{
    display:flex;
    gap:10px;
}

.btn-secondary{
    padding:12px 22px;
    border:none;
    border-radius:10px;
    background:#2563eb;
    color:#fff;
    cursor:pointer;
    font-weight:600;
    transition:.3s;
}

.btn-secondary:hover{
    background:#1d4ed8;
    transform:translateY(-2px);
}

@media(max-width:768px){
    .page-header{
        flex-direction:column;
        align-items:flex-start;
        gap:15px;
    }
}
