@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; background-color: #f1f5f9; overflow-x: hidden; }

/* SIDEBAR: Default Tersembunyi di kiri */
.sidebar {
    width: 260px; height: 100vh; background: #064e3b; color: white;
    position: fixed; left: -260px; top: 0; display: flex; flex-direction: column;
    z-index: 1100; transition: 0.3s ease; box-shadow: 5px 0 15px rgba(0,0,0,0.2);
}
.sidebar.active { left: 0; }

.sidebar .brand { padding: 30px; text-align: center; background: #022c22; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar .brand img { max-width: 50px; margin-bottom: 10px; }

/* LINK MENU: Dikunci agar tetap hijau muda (TIDAK BIRU) */
.nav-links { 
    list-style: none; 
    padding: 20px 0; 
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin-right: -10px;
    padding-right: 10px;
}
.nav-links::-webkit-scrollbar {
    width: 6px;
}
.nav-links::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
.nav-links::-webkit-scrollbar-thumb {
    background: rgba(167, 243, 208, 0.3);
    border-radius: 3px;
}
.nav-links::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 243, 208, 0.5);
}
.nav-links li a {
    display: flex; align-items: center; gap: 15px; padding: 15px 25px;
    color: #a7f3d0 !important; text-decoration: none; font-size: 14px; transition: 0.3s;
}
.nav-links li a:hover, .nav-links li a.active { background: #065f46; color: white !important; border-left: 4px solid #10b981; }

/* DROPDOWN MENU STYLES */
.nav-item-with-dropdown {
    position: relative;
}

.nav-link-dropdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: #a7f3d0 !important;
    text-decoration: none;
}

.dropdown-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.nav-item-with-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

.nav-item-with-dropdown > .dropdown-menu {
    display: none;
    position: static;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border: 0;
    box-shadow: none;
}

.nav-item-with-dropdown.active > .dropdown-menu {
    display: block;
}

.nav-item-with-dropdown > .dropdown-menu li {
    margin: 0;
}

.nav-item-with-dropdown > .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px 10px 35px;
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.nav-item-with-dropdown > .dropdown-menu a:hover {
    background: rgba(167, 243, 208, 0.1);
    color: #a7f3d0 !important;
    padding-left: 40px;
}

.nav-item-with-dropdown > .dropdown-menu a.active {
    color: #a7f3d0 !important;
    border-left: 3px solid #a7f3d0;
    padding-left: 32px;
}

/* NAVBAR & KONTEN: Full screen saat sidebar hilang */
.top-navbar {
    position: fixed; top: 0; left: 0; right: 0; height: 65px;
    background: white; display: flex; justify-content: space-between; align-items: center;
    padding: 0 30px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); z-index: 1030;
}
#menu-toggle { font-size: 22px; color: #064e3b; cursor: pointer; padding: 5px; }

.main-content { margin-top: 65px; padding: 30px; width: 100%; min-height: calc(100vh - 65px); }

/* OVERLAY GELAP */
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; z-index: 1050; }
.overlay.active { display: block; }

/* KARTU & HERO */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../assets/bg-login-reg.jpg');
    background-size: cover; background-position: center;
    color: white; padding: 60px 40px; border-radius: 15px; margin-bottom: 30px; text-align: center;
}
.info-card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border-top: 5px solid #2563eb; }
/* DROPDOWN PENGAJUAN */
.nav-dropdown.active .nav-submenu{
    display:block !important;
}

.nav-submenu{
    display:none;
    list-style:none;
    padding-left:25px;
    margin-top:5px;
}

.nav-submenu li{
    margin:0;
}

.nav-submenu a{
    display:block !important;
    color:#cbd5e1 !important;
    padding:8px 15px !important;
    text-decoration:none;
}

.nav-submenu a:hover{
    color:#fff !important;
}

/* RESPONSIVE TABLES UNTUK SEMUA HALAMAN */
@media (max-width: 768px) {
    .table-responsive { border: 0; overflow-x: hidden; }
    .table-responsive .table thead { display: none; }
    .table-responsive .table tbody tr {
        display: block;
        margin-bottom: 15px;
        background: #fff;
        border-radius: 12px;
        padding: 15px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    }
    .table-responsive .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px dashed #e2e8f0;
        text-align: right;
        border-top: none;
        word-break: break-word;
    }
    .table-responsive .table tbody td:last-child { border-bottom: 0; }
    .table-responsive .table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #64748b;
        font-size: 13px;
        text-align: left;
        margin-right: 15px;
        flex-shrink: 0;
        max-width: 45%;
    }
    .table-responsive .table tbody td.ps-4, .table-responsive .table tbody td.pe-4 { padding-left: 0 !important; padding-right: 0 !important; }
    .dropdown-menu { position: absolute !important; } /* Fix dropdown in block table */
}


.sidebar i.ph { font-size: 20px; vertical-align: middle; margin-right: 12px; font-weight: normal; }
.sidebar .nav-link-dropdown i.ph { font-size: 20px; }
.dropdown-menu-sidebar a i.ph { font-size: 16px; margin-right: 10px; }
.sidebar a:hover i.ph, .sidebar a.active i.ph { font-weight: bold; color: #6ee7b7; transition: all 0.2s; }
