/* ==========================================================================
   ROOT VARIABLES
   ========================================================================== */
:root {
    /* Brand / primary */
    --primary: #40AE87;
    --primary-hover: #1baa80;
    --primary-light: rgba(32, 201, 151, 0.1);
    --primary-light-hover: rgba(32, 201, 151, 0.18);
    --primary-focus-ring: rgba(32, 201, 151, 0.15);

    /* Status colors */
    --success: #28a745;
    --success-light: rgba(40, 167, 69, 0.12);
    --success-light-hover: rgba(40, 167, 69, 0.2);

    --danger: #dc3545;
    --danger-light: rgba(220, 53, 69, 0.1);
    --danger-light-hover: rgba(220, 53, 69, 0.18);
    --danger-light-alt: rgba(220, 53, 69, 0.12);
    --danger-light-alt-hover: rgba(220, 53, 69, 0.2);

    --info: #17a2b8;
    --info-light: rgba(23, 162, 184, 0.12);
    --info-light-hover: rgba(23, 162, 184, 0.2);

    /* Neutral / text */
    --text-dark: #212529;
    --text-body: #343a40;
    --text-muted: #495057;
    --text-placeholder: #8f98a1;

    /* Borders / backgrounds */
    --border-light: #e4e6eb;
    --border-table: #e9ecef;
    --bg-table-head: #f8f9fa;
    --bg-hover-row: #f8f9fb;

    /* Avatar gradient */
    --avatar-gradient-start: #2fa86e;
    --avatar-gradient-end: #1d7350;
    --avatar-sm-gradient-start: #20c997;
    --avatar-sm-gradient-end: #17a589;

    /* Alert gradient */
    --alert-gradient-start: #86f479;
    --alert-gradient-end: #40ae86;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.06);
    --shadow-box: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-box-hover: 0 6px 16px rgba(0, 0, 0, 0.12);
    --shadow-widget-hover: 0 8px 20px rgba(0, 0, 0, 0.1);
    --shadow-avatar-lg: 0 2px 10px rgba(0, 0, 0, 0.15);
    --shadow-avatar-sm: 0 1px 4px rgba(0, 0, 0, 0.12);
    --shadow-btn-primary: 0 2px 6px rgba(32, 201, 151, 0.3);
}


/* ==========================================================================
   1. BASE / GLOBAL OVERRIDES
   ========================================================================== */
.card {
    border: none;
    border-radius: 10px;
}

.font-weight-600 {
    font-weight: 600;
    color: var(--text-dark);
}


/* ==========================================================================
   2. STAT BOX (kartu statistik warna solid: Jumlah Koleksi, Visitor, dll)
   ========================================================================== */
.stat-box {
    position: relative;
    border-radius: 12px;
    padding: 16px;
    overflow: hidden;
    min-height: 100px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-box);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-box-hover);
}

.stat-box-inner h3 {
    font-size: clamp(1rem, 1.6vw, 1.8rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-box-inner p {
    font-size: clamp(11px, 0.9vw, 14px);
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    white-space: nowrap;
}

.stat-box-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(1.5rem, 2.5vw, 3rem);
    color: rgba(255, 255, 255, 0.25);
}


/* ==========================================================================
   3. WIDGET USER (card unit kerja dengan avatar + gradient header)
   ========================================================================== */
.widget-user {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.widget-user:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-widget-hover) !important;
}

.widget-user .widget-user-image {
    top: 95px;
}

.widget-user .widget-user-image > img {
    width: 90px;
    height: 90px;
    border: 3px solid #fff;
    box-shadow: var(--shadow-avatar-lg);
    object-fit: cover;
    background: var(--text-body);
}

.avatar-fallback {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--avatar-gradient-start), var(--avatar-gradient-end));
    color: #fff;
    font-size: 34px;
    font-weight: 700;
    margin: 0 auto;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: var(--shadow-avatar-lg);
}

.description-header {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}


/* ==========================================================================
   4. USER AVATAR (avatar kecil di dalam tabel/list, bukan card widget)
   ========================================================================== */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--avatar-sm-gradient-start), var(--avatar-sm-gradient-end));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.user-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: var(--shadow-avatar-sm);
}


/* ==========================================================================
   5. TABLE
   ========================================================================== */
.table thead th {
    background-color: var(--bg-table-head);
    border-bottom: 2px solid var(--border-table);
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    padding: 14px 12px;
}

.table tbody td {
    padding: 12px;
    font-size: 14px;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: var(--bg-hover-row);
}


/* ==========================================================================
   6. STATUS BADGE (status koneksi & status aktif/nonaktif)
   ========================================================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
}

.status-connected,
.status-active {
    background-color: var(--success-light);
    color: var(--success);
}

.status-disconnected,
.status-inactive {
    background-color: var(--danger-light-alt);
    color: var(--danger);
}


/* ==========================================================================
   7. ACTION BUTTONS (icon button di kolom Aksi tabel)
   ========================================================================== */
.btn-action {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    transition: transform 0.1s ease;
}

.btn-action:hover {
    transform: translateY(-2px);
}

.btn-action-edit {
    background: var(--info-light);
    color: var(--info);
}

.btn-action-edit:hover {
    background: var(--info-light-hover);
    color: var(--info);
}

.btn-action-success {
    background: var(--success-light);
    color: var(--success);
}

.btn-action-success:hover {
    background: var(--success-light-hover);
}

.btn-action-danger {
    background: var(--danger-light-alt);
    color: var(--danger);
}

.btn-action-danger:hover {
    background: var(--danger-light-alt-hover);
}

.btn-clear-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--danger-light);
    color: var(--danger);
    font-size: 12px;
}

.btn-clear-filter:hover {
    background: var(--danger-light-hover);
    color: var(--danger);
}


/* ==========================================================================
   8. PRIMARY / SOLID BUTTONS (background hijau penuh)
   ========================================================================== */
.btn-add-user,
.btn-export {
    display: inline-flex;
    align-items: center;
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    border-radius: 6px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}

.btn-outline-export {
    color: var(--primary);
    background: #fff;
    border: 1px solid var(--primary);
}


.btn-add-user {
    box-shadow: var(--shadow-btn-primary);
}

.btn-add-user:hover,
.btn-export:hover {
    background: var(--primary-hover);
    color: #fff;
}

.btn-chart-search {
    background: var(--primary);
    border: none;
    color: #fff;
    border-radius: 6px;
    padding: 0 16px;
}

.btn-chart-search:hover {
    background: var(--primary-hover);
    color: #fff;
}

.btn-alert {
    background: #35957280;
    border: 1px solid #0000002e;
    color: black !important;
}


/* ==========================================================================
   9. GHOST / PILL BUTTONS (background tipis transparan)
   ========================================================================== */
.btn-see-more {
    display: inline-flex;
    align-items: center;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 7px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn-see-more:hover {
    background: var(--primary-light-hover);
    color: var(--primary-hover);
    transform: translateX(2px);
}

.btn-see-more i {
    font-size: 11px;
    transition: transform 0.15s ease;
}

.btn-see-more:hover i {
    transform: translateX(2px);
}


/* ==========================================================================
   10. FORM / SEARCH / FILTER INPUTS
   ========================================================================== */
.search-wrapper {
    position: relative;
    max-width: 500px;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-placeholder);
    font-size: 15px;
    pointer-events: none;
}

.search-input {
    padding: 12px 18px 12px 44px;
    border-radius: 30px;
    border: 1px solid var(--border-light);
    background: #fff;
    font-size: 14.5px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-focus-ring);
}

.search-input::placeholder {
    color: var(--text-placeholder);
}

.form-search:focus {
    border-color: var(--border-light) !important;
}

.filter-select {
    width: auto;
    min-width: 150px;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    font-size: 13px;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-focus-ring);
}


/* ==========================================================================
   11. CHART FILTER CARD
   ========================================================================== */
.chart-filter-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: var(--shadow-card);
}

.chart-filter-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-body);
    margin-bottom: 10px;
}

#visitorChart {
    width: 100%;
    height: 100%;
}


/* ==========================================================================
   12. LOADING SPINNER
   ========================================================================== */
.loading-spin {
    text-align: center;
    padding: 40px 0;
}

.loading-spin i {
    font-size: 2.5rem;
    color: var(--primary);
}


/* ==========================================================================
   13. ALERT
   ========================================================================== */
.alert-info {
    background: linear-gradient(136deg, var(--alert-gradient-start), var(--alert-gradient-end));
    border: 0;
    color: black;
}

.alert a {
    text-decoration: none;
}

/* ==========================================================================
   14. SEARCH CARD (collapsible search/filter panel)
   ========================================================================== */
.search-card {
    overflow: hidden;
}

.search-card-header {
    background: var(--primary);
    border: none;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-card-header .card-title {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

.btn-search-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn-search-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.search-card.collapsed-card .btn-search-toggle i {
    transform: rotate(0deg);
}

.search-card:not(.collapsed-card) .btn-search-toggle i {
    transform: rotate(45deg);
}

.search-card .card-body {
    padding: 22px 20px 18px;
}

.search-card .card-body label {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.search-card .card-body .form-control {
    border-radius: 8px;
    border: 1px solid var(--border-light);
    padding: 10px 14px;
    font-size: 14px;
}

.search-card .card-body .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-focus-ring);
}

.search-card-footer {
    background: var(--bg-table-head);
    border-top: 1px solid var(--border-table);
    padding: 14px 20px;
}

.btn-search-clear {
    display: inline-flex;
    align-items: center;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}

.btn-search-clear:hover {
    background: #c82333;
    color: #fff;
}

.btn-search-submit {
    display: inline-flex;
    align-items: center;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 600;
}

.btn-search-submit:hover {
    background: var(--primary-hover);
    color: #fff;
}
/* ==========================================================================
   15. CONFIG FORM (halaman Konfigurasi — form panjang dengan section)
   ========================================================================== */
.config-section {
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}

.config-section-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-table);
}

.config-section-header i {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.config-section-header h5 {
    margin: 0 0 2px 0;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text-dark);
}

.config-section-header p {
    margin: 0;
    font-size: 14px;
    color: var(--text-placeholder);
}

.config-section .form-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.config-section .form-control {
    border-radius: 8px;
    border: 1px solid var(--border-light);
    font-size: 14px;
}

.config-section .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-focus-ring);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-placeholder);
}

.config-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 4px 0 20px;
}

.btn-config-back {
    display: inline-flex;
    align-items: center;
    background: #fff;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-config-back:hover {
    background: var(--bg-table-head);
    color: var(--text-muted);
}

.btn-config-save {
    display: inline-flex;
    align-items: center;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: var(--shadow-btn-primary);
    transition: background 0.15s ease;
}

.btn-config-save:hover {
    background: var(--primary-hover);
    color: #fff;
}

/* ==========================================================================
   16. AUTHORITY TABLE (halaman Otoritas Fitur)
   ========================================================================== */
.authority-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.status-feature-count {
    background-color: var(--info-light);
    color: var(--info);
}

/* ==========================================================================
   17. USER ADMIN TABLE (halaman User Admin — reuse dari Pengguna Unit Kerja)
   ========================================================================== */
.user-id-tag {
    display: inline-block;
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--text-placeholder);
    background: none;
    padding: 0;
}

/* ==========================================================================
   18. TIPS CARD (halaman Informasi / Tips)
   ========================================================================== */
.tips-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tips-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-box-hover) !important;
}

.tips-card-footer {
    background: var(--bg-table-head);
    border-top: 1px solid var(--border-table);
    padding: 12px 16px;
}

/* ==========================================================================
   19. JOURNAL CARD (halaman Jurnal)
   ========================================================================== */
.journal-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* ==========================================================================
   20. POLTEKES CARD (halaman Unit Kerja)
   ========================================================================== */
.poltekes-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.poltekes-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-box-hover) !important;
}

.poltekes-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-avatar-sm);
}

.poltekes-img-fallback {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--avatar-sm-gradient-start), var(--avatar-sm-gradient-end));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.btn-check-oai {
    display: inline-flex;
    align-items: center;
    background: #fff;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.15s ease;
}

.btn-check-oai:hover {
    background: var(--bg-table-head);
}

/* ==========================================================================
   21. PROFILE PAGE
   ========================================================================== */
.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--avatar-sm-gradient-start), var(--avatar-sm-gradient-end));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: var(--shadow-avatar-sm);
}

/* ==========================================================================
   22. TOPBAR / NAVBAR USER DROPDOWN
   ========================================================================== */
.topbar-user-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px !important;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.topbar-user-toggle:hover {
    background: var(--bg-table-head);
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--avatar-sm-gradient-start), var(--avatar-sm-gradient-end));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.topbar-avatar-lg {
    width: 44px;
    height: 44px;
    font-size: 17px;
}

.topbar-user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.topbar-chevron {
    font-size: 10px;
    color: var(--text-placeholder);
    margin-left: 2px;
}

.topbar-dropdown {
    border: none;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    padding: 8px;
    min-width: 220px;
}

.topbar-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px 12px;
}

.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 6px;
    padding: 9px 10px;
    font-size: 14px;
    color: var(--text-body);
}

.topbar-dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--text-placeholder);
}

.topbar-dropdown-item:hover {
    background: var(--bg-table-head);
}

.topbar-dropdown-item-danger {
    color: var(--danger);
}

.topbar-dropdown-item-danger i {
    color: var(--danger);
}

.topbar-dropdown-item-danger:hover {
    background: var(--danger-light-alt);
}
/* ==========================================================================
   23. AUTOFILL OVERRIDE (biar warna biru bawaan browser nggak clash)
   ========================================================================== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: var(--text-dark);
    transition: background-color 5000s ease-in-out 0s;
}

/* ==========================================================================
   24. FORM SUBSECTION LABEL (pembagi sub-bagian dalam 1 form section)
   ========================================================================== */
.config-subsection-label {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-light);
}

/* ==========================================================================
   25. IMAGE PREVIEW (Gambar/Logo saat ini di form Edit)
   ========================================================================== */
.config-image-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: var(--bg-table-head);
    border-radius: 10px;
    border: 1px solid var(--border-table);
}

.config-image-preview img,
.config-image-preview .poltekes-img-fallback {
    width: 64px;
    height: 64px;
}

.config-image-preview-info strong {
    display: block;
    font-size: 13.5px;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.config-image-preview-info span {
    font-size: 12px;
    color: var(--text-placeholder);
}

/* ==========================================================================
   26. TOGGLE SWITCH (Tampilkan Unit Kerja?)
   ========================================================================== */
.config-toggle-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-table-head);
    border-radius: 10px;
    border: 1px solid var(--border-table);
}

.config-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.config-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.config-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ced4da;
    transition: 0.2s;
    border-radius: 24px;
}

.config-toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: var(--shadow-avatar-sm);
}

.config-toggle input:checked + .config-toggle-slider {
    background-color: var(--primary);
}

.config-toggle input:checked + .config-toggle-slider::before {
    transform: translateX(18px);
}

.config-toggle-label strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    display: block;
}

.config-toggle-label span {
    font-size: 12.5px;
    color: var(--text-muted);
}

/* ==========================================================================
   27. ALERT ERROR (mis. cURL error saat sync repositori/OPAC)
   ========================================================================== */
.config-alert-error {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fff5f5;
    border: 1px solid var(--danger-light-alt);
    border-left: 3px solid var(--danger);
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 8px;
}

.config-alert-error i {
    color: var(--danger);
    font-size: 15px;
    margin-top: 2px;
    flex-shrink: 0;
}

.config-alert-error-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-body);
    word-break: break-all;
}

.config-alert-error-text strong {
    display: block;
    color: var(--danger);
    font-size: 13px;
    margin-bottom: 3px;
    word-break: normal;
}

/* ==========================================================================
   28. CKEDITOR WRAPPER (biar konsisten sama style config-section)
   ========================================================================== */
.config-section .ck.ck-editor {
    border-radius: 8px;
    overflow: hidden;
}

.config-section .ck.ck-editor__top .ck-toolbar {
    border: 1px solid var(--border-light);
    border-bottom: none;
    background: var(--bg-table-head);
    border-radius: 8px 8px 0 0;
}

.config-section .ck.ck-editor__main .ck-content {
    border: 1px solid var(--border-light);
    border-radius: 0 0 8px 8px;
    min-height: 220px;
    font-size: 14px;
}

.config-section .ck.ck-editor__main .ck-content.ck-focused,
.config-section .ck.ck-toolbar.ck-focused {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-focus-ring) !important;
}

/* ==========================================================================
   29. FEATURE TOGGLE GRID (halaman Otoritas Fitur - x-rows.feature)
   ========================================================================== */
.feature-toggle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 24px;
    padding: 20px;
}

@media (max-width: 767px) {
    .feature-toggle-grid {
        grid-template-columns: 1fr;
    }
}

.feature-toggle-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-toggle-item label.config-toggle {
    margin-bottom: 0;
}

.feature-toggle-item span {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

/* ==========================================================================
   30. AUTH LAYOUT (halaman Login Unit Kerja)
   ========================================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: var(--bg-table-head);
}

.auth-visual {
    flex: 1.1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    background: linear-gradient(160deg, var(--avatar-gradient-start), var(--avatar-gradient-end));
    color: #fff;
    overflow: hidden;
}

.auth-visual::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    top: -140px;
    right: -140px;
}

.auth-visual::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    bottom: -100px;
    left: -80px;
}

.auth-visual-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.auth-visual-brand img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.auth-visual-brand span {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.2px;
}

.auth-visual-body {
    position: relative;
    z-index: 1;
    max-width: 440px;
}

.auth-visual-body h1 {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 14px 0;
    line-height: 1.3;
}

.auth-visual-body p {
    font-size: 14.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.auth-visual-footer {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.75);
}

.auth-visual-footer div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-visual-footer i {
    width: 16px;
    text-align: center;
}

.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.auth-form-box {
    width: 100%;
    max-width: 380px;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-form-header img {
    width: 200px;
    margin-bottom: 14px;
}

.auth-form-header h5 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px 0;
}

.auth-form-header p {
    font-size: 13.5px;
    color: var(--text-placeholder);
    margin: 0;
}

.auth-form-group {
    margin-bottom: 16px;
}

.auth-form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-placeholder);
    font-size: 14px;
}

.auth-input-wrapper input {
    width: calc(100% - 40px);
    padding: 10px 0px 10px 40px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    font-size: 14px;
    background: #fff;
    /* transition: border-color 0.15s ease, box-shadow 0.15s ease; */
}

.auth-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-focus-ring);
}

.auth-toggle-password {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-placeholder);
    font-size: 13px;
    cursor: pointer;
}

.auth-toggle-password:hover {
    color: var(--text-muted);
}

.btn-auth-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14.5px;
    font-weight: 600;
    box-shadow: var(--shadow-btn-primary);
    transition: background 0.15s ease;
    margin-top: 6px;
}

.btn-auth-submit:hover {
    background: var(--primary-hover);
    color: #fff;
}

.auth-form-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 12.5px;
    color: var(--text-placeholder);
}

@media (max-width: 991px) {
    .auth-visual {
        display: none;
    }

    .auth-form-panel {
        padding: 24px;
    }
}
/* ==========================================================================
   31. WELCOME CARD (identitas unit kerja di Dashboard)
   ========================================================================== */
.welcome-card {
    position: relative;
    border-radius: 14px;
    padding: 26px 28px;
    background: linear-gradient(135deg, var(--avatar-gradient-start), var(--avatar-gradient-end));
    color: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-box);
}

.welcome-card::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    top: -100px;
    right: -60px;
}

.welcome-card-avatar {
    position: relative;
    z-index: 1;
    width: 68px;
    height: 68px;
    border-radius: 14px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-avatar-lg);
    flex-shrink: 0;
}

.welcome-card-avatar-fallback {
    position: relative;
    z-index: 1;
    width: 68px;
    height: 68px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border: 3px solid rgba(255, 255, 255, 0.5);
    font-size: 26px;
    font-weight: 700;
    flex-shrink: 0;
}

.welcome-card-body {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 240px;
}

.welcome-card-eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 4px;
}

.welcome-card-body h2 {
    font-size: 21px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.welcome-card-body a.welcome-card-website {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.welcome-card-website:hover {
    text-decoration: underline;
    color: #fff;
}

.welcome-card-badges {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    backdrop-filter: blur(2px);
}

.welcome-badge i {
    font-size: 10px;
}

.welcome-badge.is-off {
    background: rgba(0, 0, 0, 0.18);
    color: rgba(255, 255, 255, 0.75);
}

/* ==========================================================================
   32. HARVEST CARD (status sinkronisasi OAI-PMH)
   ========================================================================== */
.harvest-card {
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    height: 100%;
}

.harvest-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--border-table);
}

.harvest-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14.5px;
    color: var(--text-dark);
}

.harvest-card-title i {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--primary-light);
    color: var(--primary);
}

.harvest-card-body {
    color: var(--text-dark);
    background: white;
    padding: 18px 20px 20px;
}

.harvest-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-table);
    font-size: 13.5px;
}

.harvest-card-row span:first-child {
    color: var(--text-placeholder);
}

.harvest-card-row b {
    color: var(--text-dark);
}

.harvest-card-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text-placeholder);
    margin-bottom: 4px;
}

.harvest-card-unit {
    font-weight: 700;
    font-size: 14.5px;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.harvest-card-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.6;
    border: 1px solid var(--border-table);
    background: var(--bg-table-head);
}

.harvest-card-note.is-success i {
    color: var(--success);
}

.harvest-card-note.is-error {
    background: #fff5f5;
    border-color: var(--danger-light-alt);
}

.harvest-card-note.is-error i {
    color: var(--danger);
}

.harvest-card-note.is-error span {
    color: var(--text-body);
}

/* ==========================================================================
   33. LAST UPDATE LIST (koleksi terakhir masuk dari $last_update)
   ========================================================================== */
.last-update-card {
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.last-update-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--border-table);
    font-weight: 700;
    font-size: 14.5px;
    color: var(--text-dark);
}

.last-update-header i {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--primary-light);
    color: var(--primary);
}

.last-update-body {
    background: white;
    padding: 8px 12px;
}

.last-update-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-table);
}

.last-update-item:last-child {
    border-bottom: none;
}

.last-update-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--info-light);
    color: var(--info);
    flex-shrink: 0;
}

.last-update-content {
    flex: 1;
    min-width: 0;
}

.last-update-source {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--primary);
    margin-bottom: 3px;
}

.last-update-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.last-update-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--text-placeholder);
}

.last-update-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.last-update-empty {
    padding: 24px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-placeholder);
}

.last-update-empty i {
    display: block;
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--border-light);
}

/* ==========================================================================
   34. PAGE INTRO TEXT (copywriting deskripsi halaman)
   ========================================================================== */
.page-intro-text {
    font-size: 13.5px;
    color: var(--text-muted);
    max-width: 720px;
    line-height: 1.6;
    margin: -4px 0 20px 0;
}
/* ==========================================================================
   35. SYNC SUMMARY CARD (ringkasan jumlah koleksi + waktu sinkron terakhir)
   ========================================================================== */
.sync-summary-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    padding: 18px 20px;
}

.sync-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.sync-summary-header h6 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.sync-summary-header h6 i {
    color: var(--primary);
}

.sync-summary-timestamp {
    font-size: 12px;
    color: var(--text-placeholder);
}

.sync-summary-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sync-summary-item {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg-table-head);
    border: 1px solid var(--border-table);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sync-summary-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.sync-summary-item i {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--primary-light);
    color: var(--primary);
    flex-shrink: 0;
}

.sync-summary-item strong {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.sync-summary-item span {
    font-size: 12px;
    color: var(--text-placeholder);
}

@media (max-width: 575px) {
    .sync-summary-list {
        flex-direction: column;
    }
}
/* ==========================================================================
   36. TOP COLLECTIONS (koleksi terpopuler berdasarkan jumlah klik)
   ========================================================================== */
.top-collection-card {
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.top-collection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--border-table);
}

.top-collection-header h6 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.top-collection-header h6 i {
    color: var(--primary);
}

.top-collection-header span {
    font-size: 12px;
    color: var(--text-placeholder);
}

.top-collection-body {
    background: white;
    padding: 6px 12px;
}

.top-collection-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 12px;
    border-bottom: 1px solid var(--border-table);
    text-decoration: none;
    transition: background 0.15s ease;
}

.top-collection-item:last-child {
    border-bottom: none;
}

.top-collection-item:hover {
    background: var(--bg-hover-row);
}

.top-collection-rank {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-table-head);
    border: 1px solid var(--border-table);
    flex-shrink: 0;
}

.top-collection-item:nth-child(1) .top-collection-rank {
    background: #fff4d6;
    border-color: #ffe29a;
    color: #b8860b;
}

.top-collection-item:nth-child(2) .top-collection-rank {
    background: #eef0f2;
    border-color: #d8dce1;
    color: #6c757d;
}

.top-collection-item:nth-child(3) .top-collection-rank {
    background: #fbe4d5;
    border-color: #f3c6a6;
    color: #a15c2c;
}

.top-collection-cover {
    width: 42px;
    height: 54px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-avatar-sm);
    background: var(--bg-table-head);
}

.top-collection-cover-fallback {
    width: 42px;
    height: 54px;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 15px;
}

.top-collection-content {
    flex: 1;
    min-width: 0;
}

.top-collection-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 3px;
}

.top-collection-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11.5px;
    color: var(--text-placeholder);
}

.top-collection-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.top-collection-clicks {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--info-light);
    color: var(--info);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
}

.top-collection-empty {
    padding: 26px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-placeholder);
}

.top-collection-empty i {
    display: block;
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--border-light);
}
/* ==========================================================================
   37. DASHBOARD SIDEBAR LAYOUT (grafik + widget samping)
   ========================================================================== */
.dashboard-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.top-collection-body {
    max-height: 320px;
    overflow-y: auto;
}

.top-collection-body::-webkit-scrollbar,
.last-update-body::-webkit-scrollbar {
    width: 5px;
}

.top-collection-body::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 10px;
}
/* ==========================================================================
   38. HARVEST WARNING BANNER (note_harvest - koleksi stagnan)
   ========================================================================== */
.harvest-warning-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #fff8e6, #fff3d6);
    border: 1px solid #ffe4a3;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.harvest-warning-banner::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #f0a500;
}

.harvest-warning-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffe9b3;
    color: #b8790a;
    font-size: 17px;
    flex-shrink: 0;
}

.harvest-warning-content {
    flex: 1;
    min-width: 0;
}

.harvest-warning-title {
    font-size: 14px;
    font-weight: 700;
    color: #8a5a00;
    margin-bottom: 3px;
}

.harvest-warning-text {
    font-size: 13px;
    color: #7a5200;
    line-height: 1.55;
    margin: 0;
}

.harvest-warning-close {
    background: none;
    border: none;
    color: #b8790a;
    font-size: 13px;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.harvest-warning-close:hover {
    opacity: 1;
}

@media (max-width: 575px) {
    .harvest-warning-banner {
        flex-wrap: wrap;
    }
}
