/* =========== LAYOUT GRID & CARD ================ */
        * { 
            -webkit-tap-highlight-color : transparent; 
            -webkit-tap-highlight-color : rgba ( 0 , 0 , 0 , 0 ); 
        } 
        .pejabat-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 15px;
            max-width: 100%;
            margin: 0 auto;
            padding: 0;
            font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        }

        .pejabat-card {
			display: flex;
			flex-direction: column; /* Mengatur elemen di dalam card secara vertikal */
            background: #f3f4f6;
            border-radius: 20px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            cursor: pointer;
            transition: transform 0.2s ease;
            height: auto; /* Agar card sama tinggi */
        }

        .pejabat-foto {
            width: 100%;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            background-color: #cedce7; /* Fallback color */
        }

        .pejabat-foto img {
            width: 100%;
            height: 200px !important;
            object-fit: contain;
            display: block;
        }

        .pejabat-info {
			padding: 15px;
			display: flex;
			flex-direction: column; /* Mengatur isi teks & sosmed secara vertikal */
			flex-grow: 1; /* Menginstruksikan info untuk mengambil sisa tinggi card */
		}

        .header-info {
			display: flex;
			align-items: center;
			flex-wrap: wrap;
			gap: 5px;
			margin-bottom: 10px;
			line-height: 1.4;
		}
        .nama { 
            font-size: 0.8rem; 
            font-weight: 700; 
            text-transform: uppercase;
        }
        .separator { 
            width: 1px; 
            height: 18px; 
            background: currentColor; 
            opacity: 0.3;
        }
        .jabatan { 
            font-size: 0.7rem; 
            opacity: 0.8;
        }
        .deskripsi {
			font-size: 0.85rem;
			line-height: 1.6;
			color: #4b5563;
			flex-grow: 1; /* INI KUNCINYA: Mengambil sisa ruang agar mendorong sosmed ke bawah */
			margin-bottom: 20px;
		}

		/* Container pembungkus utama */
		.pejabat-list-container {
			width: 100%;
			margin: 0 auto;
			padding: 20px 0;
		}

		/* Pengaturan baris per kelompok jabatan */
		.pejabat-row {
			justify-content: center;
			align-items: stretch; /* Memaksa semua card dalam 1 baris sama tinggi */
		}

		/* Garis pemisah antar tingkatan */
		.pejabat-list-container hr {
			border: 0;
			height: 1px;
			background: linear-gradient(to right, transparent, #dbdbdb, transparent);
			margin: 20px 0 40px 0;
		}

		/* Baris 1 (Kadin & Sekretaris) - Card sedikit lebih lebar */
		.row-top .pejabat-card {
			flex: 0 0 270px;
		}

		/* Baris lainnya - Card ukuran standar */
		.row-bidang .pejabat-card,
		.row-seksi .pejabat-card,
		.row-upt .pejabat-card,
		.row-pengawas .pejabat-card,
		.row-lainnya .pejabat-card {
			flex: 0 0 270px;
		}

		/* Field Kalender */
		#ui-datepicker-div {
			border: none !important;
			box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
			font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
			padding: 10px !important;
			background: #fff !important;
			border-radius: 8px !important;
			width: 280px !important;
		}

		.ui-datepicker-header {
			background: #fff !important;
			border: none !important;
			border-bottom: 1px solid #f0f0f0 !important;
			padding: 10px 0 !important;
		}

		.ui-datepicker-title select {
			border: 1px solid #ddd !important;
			border-radius: 4px !important;
			padding: 2px !important;
			margin: 0 2px !important;
			font-size: 13px !important;
		}

		.ui-datepicker th {
			color: #999 !important;
			font-weight: 600 !important;
			text-transform: uppercase;
			font-size: 11px !important;
			padding: 10px 0 !important;
		}

		.ui-datepicker td span, .ui-datepicker td a {
			text-align: center !important;
			border: none !important;
			background: none !important;
			color: #444 !important;
			padding: 8px !important;
			border-radius: 4px !important;
			transition: all 0.2s;
		}

		.ui-datepicker td a.ui-state-hover {
			background: #f0f6fb !important;
			color: #2271b1 !important;
		}

		.ui-datepicker td a.ui-state-active {
			background: #2271b1 !important;
			color: #fff !important;
		}

		.ui-datepicker-calendar .ui-state-highlight {
			background: #fff8e5 !important;
			border: 1px solid #ffde8a !important;
			color: #856404 !important;
		}

		/* Navigasi Panah */
		.ui-datepicker-prev, .ui-datepicker-next {
			cursor: pointer !important;
			top: 12px !important;
		}

		.ui-datepicker-prev-hover, .ui-datepicker-next-hover {
			background: #f5f5f5 !important;
			border: none !important;
			border-radius: 50% !important;
			top: 12px !important;
		}
		/* Responsive: Di HP card akan memenuhi lebar layar */
		@media (max-width: 600px) {
			.pejabat-card {
				flex: 0 0 100% !important;
			}
		}
		
		/* Button Tambah dan Hapus Jabatan*/
		button#add-jabatan-btn:hover, button#del-jabatan-btn:hover {
			opacity: .8;
			border: 1px solid #0164ce !important;
		}

		/* Merapikan Ikon di Dalam Tombol */
		.action-edit .dashicons, 
		a[href*="delete_pejabat"] .dashicons {
			width: 20px;
			height: 20px;
			font-size: 20px;
			display: flex;
			align-items: center;
			justify-content: center;
			margin: 0; /* Menghilangkan default margin dashicons */
		}

		/* Pastikan kolom aksi tidak terlalu lebar tapi cukup untuk 2 tombol */
		th[width="110"], td[width="110"] {
			width: 85px !important; 
		}

		/* Efek Hover untuk tombol hapus agar lebih tegas */
		a[href*="delete_pejabat"]:hover {
			background: #f8d7da !important;
			color: #721c24 !important;
			border-color: #f5c6cb !important;
		}

        /* =====================================================
            MODAL SYSTEM (STICKY HEADER & SCROLL)
        ===================================================== */
        #modalPejabat {
            display: none; 
            position: fixed; 
            z-index: 999999 !important;
            left: 0; top: 0; 
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.7); 
            backdrop-filter: blur(5px);
            padding: 15px; 
            box-sizing: border-box;
        }

        .modal-box {
            background: white;
            margin: auto;
            width: 100%;
            max-width: 1000px;
            max-height: 90vh;
            border-radius: 20px;
            position: relative;
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            overflow-y: auto; 
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none;  /* IE/Edge */
        }

        .modal-box::-webkit-scrollbar { 
            display: none; /* Chrome/Safari */
        } 

        .modal-header {
            position: sticky;
            top: 0;
            background-color: #0842A9;
            color: white;
            padding: 15px 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 1000;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }

		#modalJabatanHeader {
			margin:0; 
			font-size:1.2rem; 
			color:white;
			font-weight: 700;
			text-transform: uppercase
		}

        #modalNamaHeader {
            font-size: 1.2rem;
            font-weight: 700;
            margin: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 80%;
        }

        .modal-close {
            font-size: 35px;
            cursor: pointer;
            color: white;
            line-height: 1;
            transition: opacity 0.2s;
        }

        .modal-close:hover { opacity: 0.7; }

        .modal-body {
            padding: 30px;
            display: flex;
            flex-direction: row;
            gap: 30px;
        }

        .modal-left { 
            flex: 1; 
            min-width: 250px; 
            position: sticky;
            top: 120px; 
            align-self: flex-start;
        }

        .modal-left img { 
            width: 100%; 
            border-radius: 15px; 
            object-fit: cover;
		}
        
        .modal-right { flex: 2; }
        
        #modalDeskripsi {
            white-space: pre-line; /* Ini akan mengubah enter di teks menjadi baris baru di layar */
            line-height: 1.7;
            color: #4b5563;
            text-align: justify;
        }

        .btn-lhkpn {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 15px;
            border: 1px solid #E5E7EB;
            border-radius: 10px;
            text-decoration: none;
            background: #fff;
            font-weight: 600;
            color: #585858 !important;
            line-height: 1.3;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-lhkpn:hover {
            border-color: #ccc;
            color:#374151;
        }

        .btn-lhkpn img {
            width: 70px;
            height: auto;
            object-fit: contain;
        }
        
        .pejabat-card.highlight .pejabat-foto {
            background-color: #E2E8F0; /* Background khusus Kadis */
        }
        
        .sosmed-container {
			margin-top: auto; /* Pengaman tambahan agar tetap di dasar */
			display: flex;
			gap: 10px;
			padding-top: 15px;
			border-top: 1px solid rgba(0,0,0,0.05);
		}
        
        .sosmed-icon {
            width: 32px;
            height: 32px;
            background: #fff;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: #4b5563 !important;
            text-decoration: none;
            transition: all 0.3s ease;
            border: 1px solid #e5e7eb;
        }
        
        .sosmed-icon:hover {
            transform: translateY(-3px);
            color: #fff !important;
        }
        
        /* Warna saat hover sesuai brand */
        .sosmed-icon.fb:hover { background: #1877F2; border-color: #1877F2; }
        .sosmed-icon.ig:hover { background: #E4405F; border-color: #E4405F; }
        .sosmed-icon.tt:hover { background: #000000; border-color: #000000; }
        .sosmed-icon.wa:hover { background: #25D366; border-color: #25D366; }

        /* RESPONSIVE UNTUK HP - Versi Perbaikan */
        @media (max-width: 768px) {
            .modal-box { 
                max-height: 85vh; 
                top: 50%;
            }
			.modal-header {
				padding: 10px 25px !important;
			}
			#modalJabatanHeader {
				font-size: 1rem;
			}
            .modal-body { 
                flex-direction: column; 
                padding: 20px; 
                overflow-y: auto; /* Scroll dilakukan di body jika konten panjang */
            }
            .modal-left { 
                position: relative; 
                top: 0; 
                min-width: 100%; 
                margin-bottom: 20px;
            }
            .modal-left img {
                max-height: 300px;
                object-fit: contain;
            }
            #modalJabatan { 
                font-size: 1rem; /* Ukuran font judul diperkecil sedikit agar tidak overflow */
            }
			.nama, .jabatan, .deskripsi {
				font-size: 0.9rem !important;
			}
        }