/* ==================== STYLING YANG SUDAH ADA (TIDAK DIUBAH) ==================== */

.kb-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}
.kb-card:active {
    transform: scale(0.98);
}
.badge-jenis {
    background: #dfcbff;
    color: #712ddf;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 70px;
    margin-top: -3px;
}
.badge-status-hadir {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.badge-hadir { background: #dfcbff; color: #712ddf; }
.badge-belum { background: #fff3cd; color: #856404; }
.badge-terlambat { background: #f8d7da; color: #721c24; }
.btn-add {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: var(--primary);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(46,125,100,0.4);
    border: none;
    z-index: 100;
}
.search-box {
    background: white;
    border-radius: 30px;
    padding: 8px 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.search-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}
.btn-search-icon {
    background: var(--primary);
    border: none;
    border-radius: 30px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-top: -15px;
}
.total-data {
    background: #dfcbff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
    display: inline-block;
}
.card-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}
.btn-edit { color: var(--primary); background: none; border: none; }
.btn-delete {
    background: white;
    border: none;
    border-radius: 30px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
}
.btn-delete:hover {
    background: #fee2e2;
}

/* ==================== STYLING TAMBAHAN UNTUK PAGINATION DAN SCROLL ==================== */

/* Container untuk list dengan scroll - HANYA DATA YANG SCROLL, PAGINATION TETAP */
.list-container {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    padding-right: 4px;
}

/* Scrollbar styling - TIPIS DAN BAGUS */
.list-container::-webkit-scrollbar {
    width: 4px;
}

.list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.list-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.list-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Pagination Container - STICKY DI BAWAH, TIDAK IKUT SCROLL */
.pagination-container {
    background: white;
    padding: 12px 0;
    margin-top: 16px;
    border-radius: 30px;
    position: sticky;
    bottom: 70px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 10;
}

/* Styling Pagination - SAMA DENGAN DATA PASIEN */
.pagination {
    margin: 0;
    gap: 4px;
}

.page-link {
    border-radius: 30px !important;
    border: none;
    padding: 8px 14px;
    color: var(--primary);
    background: #f0fdf4;
    cursor: pointer;
}

.page-link:hover {
    background: var(--primary);
    color: white;
}

.active .page-link {
    background: var(--primary);
    color: white;
}

/* Per Page Select - DROPDOWN JUMLAH DATA */
#perPageSelect {
    width: 70px;
    border-radius: 20px;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #e5e7eb;
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Content Container - AGAR PADDING SESUAI */
.content-container {
    background-color: var(--gray-bg);
    border-radius: 30px 30px 0 0;
    margin-top: -20px;
    position: relative;
    z-index: 2;
    padding: 0 16px 20px 16px;
}

/* App Container */
.app-container {
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--gray-bg);
    min-height: 100vh;
    position: relative;
    padding-bottom: 70px;
}

/* Header Gradient */
.header-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 0 0 30px 30px;
    padding: 16px 20px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 12px 20px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 20px 20px 0 0;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-gray);
    font-size: 12px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

/* Search Box Input */
.search-box input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    padding: 8px 0;
}




/* KB Form */
.form-section {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.form-label {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
}
.form-control-custom {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
}
.form-control-custom:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46,125,100,0.1);
}
.required:after {
    content: " *";
    color: #ef4444;
}
.searchable-select {
    position: relative;
}
.searchable-select input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
}
.searchable-select .dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.searchable-select .dropdown-list.show {
    display: block;
}
.searchable-select .dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}
.searchable-select .dropdown-item:hover {
    background: var(--primary-light);
}
.info-box {
    background: #dfcbff;
    border-radius: 12px;
    padding: 12px;
    margin-top: 12px;
}
.info-box small {
    color: #712ddf;
}
.jenis-lainnya-input {
    margin-top: 8px;
}