:root { 
    --sidebar-bg: #1e293b;       
    --active-color: #3b82f6;     
    --sidebar-text: #e2e8f0;     
    --body-bg: #f8fafc;        
    --accent-color: #f59e0b;     
}
@font-face {
    font-family: 'FontModern';
    src: url('../font/Montserrat-Regular.otf') format('opentype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'FontModern';
    src: url('../font/Montserrat-Bold.otf') format('opentype');
    font-weight: 700;
    font-display: swap;
}

body { background-color: var(--body-bg); font-family: 'FontModern', sans-serif; font-size: 15px; color: #1e293b; }
.form-control, 
.form-select, 
.select2{
    font-size: 0.95rem !important;
}
.form-label, 
label {
    color: #1e293b !important;
    font-weight: 500 !important; /* Standar ketebalan semi-bold */
    margin-bottom: 0.20rem; 
    display: block;    
}
textarea::placeholder,
input::placeholder {
    color: #b0b0b0 !important; 
    font-weight: 100 !important; 
    opacity: 1; 
	font-size: 12px;
}
.header-fixed {
	position: fixed;
	top: 0;
	right: 0;
	left: 260px;
	height: 60px;
	background: #ffffff;
	z-index: 999;
	display: flex;
	align-items: center;
	padding: 0 20px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.sidebar { 
	min-height: 100vh; 
	background: var(--sidebar-bg); 
	color: var(--sidebar-text); 
	width: 260px; 
}

.nav-link { 
    display: flex; 
    align-items: center;
    color: #94a3b8; 
    transition: all 0.3s ease-in-out; 
    padding: 12px 15px; 
    margin: 0 10px 8px 10px; 
    border-radius: 12px;
    white-space: nowrap; 
}

.nav-link:hover { 
    color: #ffffff !important; 
    background: rgba(59, 130, 246, 0.2); 
}

.nav-link:hover, .nav-link:focus {
    color: #bae6fd !important; 
    background: rgba(59, 130, 246, 0.3);
}

.nav-link.active { 
    color: #ffffff; 
    background: var(--active-color); 
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3); 
}

.collapse .nav-link {
    margin-left: 30px; 
    font-size: 0.9rem;
    border-left: 2px solid #334155;
    border-radius: 0 12px 12px 0;
}

.arrow-icon {
	margin-left: auto; 
	transition: transform 0.3s ease;
}

.nav-link[aria-expanded="true"] .arrow-icon {
	transform: rotate(180deg);
}



.sidebar {
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden; /* Mencegah body ikut scroll */
}

.sidebar-nav {
   flex-grow: 1;
    height: 0;
    overflow-y: auto;
    padding-bottom: 20px;
    scroll-behavior: smooth;
}

.sidebar-header {
	flex-shrink: 0;
	padding: 20px;
	text-align: center;
	border-bottom: 1px solid #065f46;
	font-weight: bold;
	color: #ffffff;
}
.profile-img-sidebar {
    width: 40px;        
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ffffff; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}




.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb {
	background-color: #475569;
	border-radius: 10px;
}

main { 
    margin-left: 260px; 
    min-height: calc(100vh - 80px);
    margin-top: 80px;
    height: auto;
}

@media (max-width: 767px) { 
    .sidebar { 
        display: flex;
    } 
    main { margin-left: 0; }
}
@media (max-width: 768px) {
    #sidebar {
        position: fixed !important;
        top: 0;
        left: -260px;
        width: 260px;
        height: 100%;
        z-index: 9999;
        transition: 0.3s;
    }

    #sidebar.show {
        left: 0;
    }
}
.card-modern {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.profile-img {
    width: 150px;       
    height: 150px;      
    object-fit: cover;  
    border-radius: 50%;  
    border: 4px solid var(--sidebar-bg); 
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2); 
}

.navbar-ponpes { background-color: var(--sidebar-bg) !important; }
.offcanvas-ponpes { background-color: var(--sidebar-bg) !important; color: white; }
.icon-box {
display: flex;
align-items: center;
justify-content: center;
border-radius: 12px; 
font-size: 1.5rem;   
width: 50px;
height: 50px;
transition: all 0.3s ease;
}

.icon-box-success {
    background-color: #e0f2fe; 
    color: #1e40af;           
    border: 1px solid #bae6fd;
}

.icon-box-success:hover {
    background-color: #3b82f6;
    color: #ffffff;
    border-color: #2563eb;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(80px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

#myTable thead tr th {
    background-color: #f8fafc !important; 
    color: #334155 !important;          
    border-bottom: 2px solid #e2e8f0 !important; 
    vertical-align: middle;
    text-transform: uppercase;  
    font-size: 0.85rem !important;        
}

#myTable thead tr th:hover {
    background-color: #e2e8f0 !important; 
    color: #000000 !important;          
    cursor: pointer;
}

#myTable tbody tr td {
    background-color: transparent !important;
    font-size: 0.85rem !important; 
    vertical-align: middle;
}

 .typewriter { 
        overflow: hidden; 
        border-right: .15em solid var(--smk-accent); 
        white-space: nowrap; 
        margin: 0 auto; 
        
        animation: typing 3.5s steps(40, end) forwards, blink-caret 0.75s step-end 5 forwards; 
    }
    @keyframes typing { from { width: 0 } to { width: 100% } }
    @keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--smk-accent) } }
	
.header-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    z-index: 9999;
}

@media (max-width: 768px) {
    main {
        margin-top: 80px;   
        margin-left: 0;
        width: 100%;
        min-height: 100vh;
        
    }
}
#sidebar {
    z-index: 10000;
}
@media (max-width: 768px) {
    /* FONT GLOBAL */
    body {
        font-size: 13px;
    }

    /* FORM */
    .form-control,
    .form-select {
        font-size: 0.8rem !important;
        padding: 6px 8px;
    }

    /* LABEL */
    label {
        font-size: 0.8rem;
    }

    /* TABEL */
    table {
        font-size: 0.75rem;
    }

#myTable thead tr th {
    background-color: #f8fafc !important; 
    color: #334155 !important;          
    border-bottom: 2px solid #e2e8f0 !important; 
    vertical-align: middle;
    text-transform: uppercase;  
    font-size: 0.65rem !important;        
}

#myTable thead tr th:hover {
    background-color: #e2e8f0 !important; 
    color: #000000 !important;          
    cursor: pointer;
}

#myTable tbody tr td {
    background-color: transparent !important;
    font-size: 0.65rem !important; 
    vertical-align: middle;
}
@media (max-width: 768px) {
    .hidden-mobile {
        display: none !important;
    }
}
    /* BUTTON */
    .btn {
        font-size: 0.75rem;
        padding: 5px 8px;
    }

    /* CARD */
    .card-modern {
        padding: 12px;
    }

    /* ICON */
    .icon-box {
        font-size: 1.2rem;
    }
}
@media (max-width: 768px) {
    .icon-box {
        font-size: 1rem;     
        border-radius: 8px;  /* biar proporsional */
        padding: 8px;        /* optional biar tidak terlalu besar */
		width: 40px;
height: 40px;
    }
}
@media (max-width: 768px) {
    .typewriter {
        font-size: 0.85rem;     /* kecilin font */
        border-right: .1em solid var(--smk-accent); /* kursor lebih tipis */
        letter-spacing: 0;      /* biar lebih rapat */
        animation: typing 2.5s steps(30, end) forwards, 
                   blink-caret 0.6s step-end 4 forwards;
    }
}
#live-clock {
    display: inline-block;
    min-width: 85px; 
    text-align: center;
	font-size: 20px;
    font-variant-numeric: tabular-nums; 
}
 .avatar-circle {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #4318FF 0%, #1e3a8a 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #ffffff; font-weight: 700; font-size: 14px; text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(67, 24, 255, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}
.menu-grid-container {
    display: grid;
    /* Menggunakan minmax agar kolom tetap terjaga 2 buah dan tidak turun ke bawah */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 5px 0;
}

.menu-grid-item {
    background-color: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
    text-decoration: none;
    color: #212529;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
	cursor: pointer;
}

.menu-grid-item:hover {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.25);
}

.menu-grid-item i {
    font-size: 20px;
    margin-bottom: 6px;
    color: #0d6efd;
    transition: color 0.3s ease;
}

.menu-grid-item:hover i {
    color: #ffffff;
}

/* Pengaturan teks untuk menu biasa dan teks judul dalam child */
.menu-grid-item span:not(.menu-badge),
.menu-grid-item .menu-title {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

/* === PENGATURAN ELEMEN CHILD === */

.menu-grid-item .menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px; /* Jarak antara judul menu dan badge "Baru!" */
}

.menu-grid-item .menu-badge {
    font-size: 10px;
    font-weight: 600;
    color: #0d6efd;
    background-color: #cfe2ff;
    padding: 1px 6px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Efek saat kartu di-hover agar warna badge ikut menyesuaikan */
.menu-grid-item:hover .menu-badge {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
}
/* Tampilan awal child-grid disembunyikan */
.parent-menu .child-grid-view {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 6px;
    margin-top: 5px;
}

/* Ketika menu utama diklik (menjadi active) */
.parent-menu.active .default-view {
    display: none; /* Sembunyikan judul utama */
}

.parent-menu.active .child-grid-view {
    display: flex; /* Munculkan box-box child */
}

/* Styling untuk masing-masing box menu child */
.child-box {
    background-color: #f8f9fa;
    border: 1px solid #0d6efd;
    border-radius: 6px;
    padding: 8px;
    text-align: center;
    text-decoration: none;
    color: #0d6efd;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.child-box:hover {
    background-color: #0d6efd;
    color: #ffffff;
}
.sidebar-footer-menu {
    display: flex;
    flex-direction: row;      
    justify-content: space-around; 
    align-items: center;
    width: 100%;
}
.menu-item {
    display: flex;
    flex-direction: column;   
    align-items: center;     
    text-align: center;
    text-decoration: none;
    color: #ffffff;           
    transition: 0.2s;
}

.menu-item i {
    font-size: 1.2rem;        
    margin-bottom: 3px;      
}

.menu-item span {
    font-size: 11px;          
    line-height: 1;
}

.menu-item:hover {
    color: #0d6efd;          
}
.img-custom-shadow {
    height: 80px;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}
.icon-box-sm {
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.1); 
    color: #ffffff;                            
    border-radius: 8px;                        
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;                          
    margin-bottom: 4px;                        
    transition: all 0.2s ease-in-out;
}

.menu-item:hover .icon-box-sm {
    background-color: var(--primary-smk, #0d6efd);
    color: #ffffff;
}
.swal2-icon {
    width: 30px !important;
    height: 30px !important;
}

.swal2-icon .swal2-icon-content {
    font-size: 30px !important;
}
.swal2-title {
    font-size: 16px !important;
}

.swal2-html-container {
    font-size: 13px !important;
}
.swal2-confirm,
.swal2-cancel {
    font-size: 12px !important;
    padding: 6px 20px !important;
    border-radius: 20px !important;
}
