/* Toggle tema terang/gelap. Dimuat terakhir agar dapat menimpa gaya halaman lama. */
.theme-switch{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:5px 9px;border:1px solid #d3dde3;border-radius:999px;background:#fff;color:#17324d;font:inherit;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap;transition:background .2s,border-color .2s,color .2s,transform .2s}.theme-switch:hover{transform:translateY(-1px);border-color:#f26b21}.theme-switch-track{position:relative;display:inline-block;width:38px;height:22px;flex:0 0 38px;border-radius:999px;background:#a9bac5;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08);transition:background .2s}.theme-switch-thumb{position:absolute;left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(0,0,0,.28);transition:transform .2s}.theme-switch[aria-checked="true"] .theme-switch-track{background:#f26b21}.theme-switch[aria-checked="true"] .theme-switch-thumb{transform:translateX(16px)}.theme-switch-icon{font-size:14px;line-height:1}.main-nav>.theme-switch{margin-left:2px}.admin-theme-wrap{margin:14px 0 4px}.admin-theme-wrap .theme-switch{width:100%;justify-content:space-between;background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.3);color:#fff}.callbook-theme-switch{position:fixed;z-index:50;right:16px;top:16px;box-shadow:0 8px 24px rgba(0,0,0,.18)}

@media(max-width:900px){.main-nav>.theme-switch{box-sizing:border-box;width:100%;justify-content:space-between;margin:4px 0;padding:9px 14px}.theme-switch-label{font-size:13px}}
@media(max-width:560px){.callbook-theme-switch{right:10px;top:10px}.callbook-theme-switch .theme-switch-label{display:none}}

html[data-theme="dark"]{--orange:#ff7a32;--orange-dark:#ef6420;--navy:#e5edf4;--ink:#e7eef4;--muted:#aab9c5;--line:#334552;--soft:#111922;--white:#18232d;color-scheme:dark}
html[data-theme="dark"] body,html[data-theme="dark"] body.admin-body,html[data-theme="dark"] body.callbook-page{background:#0f171f!important;color:#dce6ed!important}
html[data-theme="dark"] a{color:#8fc8f0}html[data-theme="dark"] a:hover{color:#ff9a61}
html[data-theme="dark"] .top-strip{background:#0a1118!important;color:#bdc9d2!important}
html[data-theme="dark"] .site-header{background:#16222c!important;border-color:#30404c!important;box-shadow:0 7px 22px rgba(0,0,0,.28)!important}
html[data-theme="dark"] .site-header .brand,html[data-theme="dark"] .site-header .brand-copy strong{color:#f4f8fb!important}html[data-theme="dark"] .site-header .brand-copy small{color:#aebdca!important}
html[data-theme="dark"] .main-nav a,html[data-theme="dark"] .nav-callbook-toggle,html[data-theme="dark"] .nav-finance-toggle,html[data-theme="dark"] .nav-user{color:#dce6ed!important}
html[data-theme="dark"] .main-nav a:hover,html[data-theme="dark"] .main-nav a.is-active,html[data-theme="dark"] .nav-callbook-toggle:hover,html[data-theme="dark"] .nav-callbook-toggle.is-active,html[data-theme="dark"] .nav-finance-toggle:hover,html[data-theme="dark"] .nav-finance-menu.is-active>.nav-finance-toggle{background:#2a3540!important;color:#ff9a61!important}
html[data-theme="dark"] .nav-account-menu,html[data-theme="dark"] .nav-finance-dropdown{background:#1a2731!important;border-color:#3b4d5a!important;box-shadow:0 16px 35px rgba(0,0,0,.42)!important}
html[data-theme="dark"] .nav-account-menu a,html[data-theme="dark"] .nav-account-menu button,html[data-theme="dark"] .nav-finance-dropdown a{color:#dbe6ed!important}html[data-theme="dark"] .nav-account-menu a:hover,html[data-theme="dark"] .nav-account-menu button:hover,html[data-theme="dark"] .nav-finance-dropdown a:hover{background:#293945!important;color:#ff9a61!important}
html[data-theme="dark"] .nav-toggle{border-color:#53626e!important}html[data-theme="dark"] .nav-toggle span{background:#e4edf3!important}
html[data-theme="dark"] .main-content{background:#0f171f!important}
html[data-theme="dark"] .site-footer{background:#0a1219!important;color:#b6c4ce!important}html[data-theme="dark"] .footer-grid a{color:#c7d5df!important}
html[data-theme="dark"] .link-danger{color: #b42318 ! important}


html[data-theme="dark"] :is(.card,.panel,.form-card,.profile-card,.directory-card,.member-card,.settings-card,.dashboard-card,.stat-card,.manage-card,.admin-account-panel,.admin-type-panel,.privacy-matrix>section,.site-page,.finance-card,.finance-summary-card,.finance-panel,.callbook-modal-dialog,.member-profile-card,.legacy-member-row,.legacy-member-toolbar,.site-settings-preview,.admin-photo-grid .crop-upload-group,.image-crop-dialog,.candidate-card-modal-dialog,.sticky-edit-actions){background:#18232d!important;color:#dce6ed!important;border-color:#344652!important;box-shadow:0 8px 24px rgba(0,0,0,.22)!important}
html[data-theme="dark"] :is(.card,.panel,.form-card,.profile-card,.directory-card,.member-card,.settings-card,.dashboard-card,.stat-card,.manage-card,.admin-account-panel,.admin-type-panel,.privacy-matrix>section,.site-page,.finance-card,.finance-summary-card,.finance-panel,.member-profile-card,.legacy-member-row) :is(h1,h2,h3,h4,strong,dt){color:#eef5f9!important}
html[data-theme="dark"] :is(p,small,.muted,.field-help,.callbook-note,.admin-page-head p,.manage-card header p,.legacy-member-meta,.site-page-header p){color:#aebdca!important}
html[data-theme="dark"] :is(.manage-card>header,.card-header,.panel-header,.admin-section-head){background:#1c2a35!important;border-color:#344652!important}

html[data-theme="dark"] :is(input,select,textarea){background:#101a22!important;color:#edf4f8!important;border-color:#435662!important;caret-color:#ff8a4c!important}html[data-theme="dark"] :is(input,select,textarea)::placeholder{color:#8295a3!important}html[data-theme="dark"] :is(input,select,textarea):focus{border-color:#ff7a32!important;outline-color:rgba(255,122,50,.24)!important}html[data-theme="dark"] option{background:#101a22;color:#edf4f8}
html[data-theme="dark"] :is(button,.button){border-color:#40525f}html[data-theme="dark"] .button:not(.button-primary):not(.button-danger):not(.nav-logout-button),html[data-theme="dark"] .button-secondary{background:#263640!important;color:#e8eff4!important;border-color:#465965!important}html[data-theme="dark"] .button:not(.button-primary):not(.button-danger):hover,html[data-theme="dark"] .button-secondary:hover{background:#314552!important}
html[data-theme="dark"] .button-light{background:#e8eff4!important;color:#132d44!important}
html[data-theme="dark"] :is(table,.admin-table,.finance-table){color:#dbe5ec!important;border-color:#344652!important}html[data-theme="dark"] :is(th,.admin-table th,.finance-table th){background:#22323d!important;color:#f1f6f9!important;border-color:#3a4c58!important}html[data-theme="dark"] :is(td,.admin-table td,.finance-table td){border-color:#31434f!important}html[data-theme="dark"] tbody tr:nth-child(even){background:rgba(255,255,255,.018)}html[data-theme="dark"] tbody tr:hover{background:#1d2b35!important}
html[data-theme="dark"] hr{border-color:#344652!important}

html[data-theme="dark"] .admin-sidebar{background:#0c1822!important;border-color:#2d3f4b!important}html[data-theme="dark"] .admin-content{background:#0f171f!important}html[data-theme="dark"] .admin-nav-link:hover,html[data-theme="dark"] .admin-nav-link.is-active{background:#293b48!important;color:#fff!important}html[data-theme="dark"] .admin-account-tab{background:#17242e!important;color:#dce6ed!important;border-color:#3b4d59!important}html[data-theme="dark"] .admin-account-tab.is-active{background:#3a2a20!important;border-color:#ff7a32!important}html[data-theme="dark"] .admin-account-tab small{color:#aebdca!important}
html[data-theme="dark"] .member-action-menu,html[data-theme="dark"] .member-profile-avatar-menu{background:#1a2731!important;border-color:#40525f!important;box-shadow:0 14px 32px rgba(0,0,0,.45)!important}html[data-theme="dark"] .member-action-menu a,html[data-theme="dark"] .member-action-menu button,html[data-theme="dark"] .member-profile-avatar-menu button{color:#dce6ed!important}html[data-theme="dark"] .member-action-menu a:hover,html[data-theme="dark"] .member-action-menu button:hover,html[data-theme="dark"] .member-profile-avatar-menu button:hover{background:#293a46!important}
html[data-theme="dark"] .member-profile-avatar-edit-trigger{border-color:#18232d!important}

html[data-theme="dark"] .callbook-modal-backdrop{background:rgba(0,0,0,.76)!important}html[data-theme="dark"] .callbook-modal-dialog h2{color:#eef5f9!important}html[data-theme="dark"] .callbook-modal-dialog p{color:#aebdca!important}html[data-theme="dark"] .callbook-modal-close{color:#c9d5dd!important}html[data-theme="dark"] .callbook-modal-source,html[data-theme="dark"] .callbook-source{background:#203747!important;color:#dcecff!important}html[data-theme="dark"] .callbook-modal-result,html[data-theme="dark"] .callbook-result{border-color:#3b4d59!important}html[data-theme="dark"] .callbook-modal-row,html[data-theme="dark"] .callbook-row{border-color:#30424e!important}html[data-theme="dark"] .callbook-modal-row span,html[data-theme="dark"] .callbook-row dt{color:#a9bdcb!important}html[data-theme="dark"] .callbook-modal-loading{background:#20313d!important;color:#c5d5df!important}html[data-theme="dark"] .callbook-modal-error,html[data-theme="dark"] .callbook-error{background:#3a2022!important;border-color:#754044!important;color:#ffb3ae!important}
html[data-theme="dark"] body.callbook-page .callbook-card{background:#18232d!important;border-color:#3a4d59!important;box-shadow:0 12px 35px rgba(0,0,0,.35)!important}html[data-theme="dark"] body.callbook-page .callbook-body{background:#18232d!important}html[data-theme="dark"] body.callbook-page .callbook-head{background:#102b40!important}

html[data-theme="dark"] :is(.alert-success,.toast-notification.alert-success){background:#123626!important;border-color:#2c6c4d!important;color:#bcebd0!important}html[data-theme="dark"] :is(.alert-error,.toast-notification.alert-error){background:#3a2022!important;border-color:#754044!important;color:#ffb6b1!important}
html[data-theme="dark"] :is(.badge-status-approved){background:#173c2a!important;color:#bdebd0!important}html[data-theme="dark"] :is(.badge-status-awaiting_admin_review){background:#493b18!important;color:#ffe394!important}html[data-theme="dark"] :is(.badge-status-rejected,.badge-status-deactivated){background:#492326!important;color:#ffb7b2!important}html[data-theme="dark"] .badge-type-candidate{background:#493022!important;color:#ffd0b2!important}html[data-theme="dark"] .badge-type-amateur{background:#18384d!important;color:#b7ddf5!important}
html[data-theme="dark"] .photo-popup-dialog,html[data-theme="dark"] .cropper-modal-content{background:#18232d!important;color:#e8eff4!important}
html[data-theme="dark"] .floating-callbook{background:#1d425e!important;border-color:#506779!important}html[data-theme="dark"] .floating-to-header{background:#263b49!important;color:#fff!important}
html[data-theme="dark"] .theme-switch{background:#1e2c36;color:#e8eff4;border-color:#455864}

/* Penyempurnaan kontras tema gelap untuk komponen yang masih memakai warna tetap. */
html[data-theme="dark"]{
  --dark-bg:#0f171f;
  --dark-surface:#18232d;
  --dark-surface-2:#1d2a34;
  --dark-surface-3:#22323d;
  --dark-border:#3a4c58;
  --dark-text:#e7eef4;
  --dark-muted:#aebdca;
}
html[data-theme="dark"] :is(.panel-card,.admin-card,.dash-card,.finance-source-card,.finance-stat,.settings-section,.export-column-group,.export-filter-group,.column-order-box,.custom-columns-box,.maintenance-warning){
  background:var(--dark-surface)!important;
  color:var(--dark-text)!important;
  border-color:var(--dark-border)!important;
  box-shadow:0 8px 24px rgba(0,0,0,.22)!important;
}
html[data-theme="dark"] :is(.dash-card,.finance-source-card,.finance-stat,.admin-card,.settings-section) :is(h1,h2,h3,h4,strong,.dash-card-label,.dash-card-value){color:#eef5f9!important}
html[data-theme="dark"] .dash-card-value{color:#ff7a32!important}
html[data-theme="dark"] :is(.finance-source-card p,.finance-source-card dt,.finance-stat span,.finance-report-head p,.finance-lead,.form-help,.form-hint,.admin-card small,.export-column-group .check-row span,.column-order-item strong){color:var(--dark-muted)!important}
html[data-theme="dark"] .finance-mini-summary{background:#101a22!important;border:1px solid #324550!important}
html[data-theme="dark"] .finance-mini-summary dd{color:#eef5f9!important}
html[data-theme="dark"] .finance-filter{background:var(--dark-surface)!important;border:1px solid var(--dark-border)!important}
html[data-theme="dark"] .finance-filter label>span{color:#dce6ed!important}
html[data-theme="dark"] .finance-stat{border-left-color:var(--dark-border)!important;border-right-color:var(--dark-border)!important;border-bottom-color:var(--dark-border)!important}
html[data-theme="dark"] .finance-stat strong{color:#eef5f9!important}
html[data-theme="dark"] .finance-table-wrap{background:var(--dark-surface)!important;border-color:var(--dark-border)!important}
html[data-theme="dark"] .finance-pagination a{background:#1d2b35!important;color:#dce6ed!important;border-color:#425460!important}
html[data-theme="dark"] .finance-pagination a.is-current{background:#ff7a32!important;color:#fff!important;border-color:#ff7a32!important}

html[data-theme="dark"] .legacy-member-row:nth-child(even),
html[data-theme="dark"] .export-template-table tbody tr,
html[data-theme="dark"] .export-template-table tbody td{background:var(--dark-surface)!important;color:#dce6ed!important}
html[data-theme="dark"] .legacy-member-row:nth-child(odd){background:#15212a!important}
html[data-theme="dark"] .legacy-member-row :is(.legacy-member-filter-summary,.legacy-member-tag){background:#243541!important;color:#dce6ed!important;border-color:#40535f!important}
html[data-theme="dark"] .legacy-member-row :is(time,.legacy-member-meta){color:#9fb1be!important}

html[data-theme="dark"] .export-column-groups fieldset,
html[data-theme="dark"] .export-column-group,
html[data-theme="dark"] .export-filter-group{background:#17232d!important;border-color:#40515d!important;color:#dce6ed!important}
html[data-theme="dark"] .export-column-groups legend,
html[data-theme="dark"] .export-column-group legend,
html[data-theme="dark"] .export-filter-group legend{color:#edf4f8!important}
html[data-theme="dark"] :is(.column-order-box,.custom-columns-box,.export-logo-upload){background:#17232d!important;border-color:#40515d!important;color:#dce6ed!important}
html[data-theme="dark"] .column-order-item{background:#202f3a!important;border-color:#425561!important;color:#e8eff4!important}
html[data-theme="dark"] .column-order-item strong{color:#e8eff4!important}
html[data-theme="dark"] .sticky-form-actions{background:linear-gradient(to bottom,rgba(15,23,31,0),#0f171f 25%)!important}
html[data-theme="dark"] .export-logo-preview img{background:#f7f7f7!important}

html[data-theme="dark"] .permission-category td{background:#243540!important;color:#eef5f9!important}
html[data-theme="dark"] .permission-table td:first-child small{color:#9eafbc!important}
html[data-theme="dark"] .permission-table :is(th,td),
html[data-theme="dark"] .privacy-view-table :is(th,td){background-color:transparent;color:#dce6ed;border-color:#354955!important}
html[data-theme="dark"] .permission-table thead th,
html[data-theme="dark"] .privacy-view-table thead th{background:#22343f!important;color:#f2f6f9!important}
html[data-theme="dark"] .permission-table tbody tr:not(.permission-category):nth-child(even) td,
html[data-theme="dark"] .privacy-view-table tbody tr:not(.permission-category):nth-child(even) td{background:#142029!important}
html[data-theme="dark"] .permission-table tbody tr:not(.permission-category):nth-child(odd) td,
html[data-theme="dark"] .privacy-view-table tbody tr:not(.permission-category):nth-child(odd) td{background:#101a22!important}

html[data-theme="dark"] .maintenance-warning{background:#28231b!important;border-color:#69552d!important;color:#f3dfb0!important}
html[data-theme="dark"] .maintenance-warning :is(h2,strong){color:#ffe5a3!important}
html[data-theme="dark"] code{background:#101a22!important;color:#c9d8e2!important;border-color:#354955!important}
html[data-theme="dark"] .site-settings-preview,
html[data-theme="dark"] .crop-upload-group,
html[data-theme="dark"] .upload-preview,
html[data-theme="dark"] .site-logo-preview,
html[data-theme="dark"] .site-icon-preview{background:#17232d!important;color:#dce6ed!important;border-color:#40515d!important}
html[data-theme="dark"] :is(.site-logo-preview,.site-icon-preview,.crop-result-preview) img{background:#f7f7f7}

html[data-theme="dark"] .callbook-modal-row strong,
html[data-theme="dark"] .callbook-row dd{color:#dce6ed!important}
html[data-theme="dark"] .callbook-modal-row span,
html[data-theme="dark"] .callbook-row dt{color:#b5c5d0!important}

/* Jangan biarkan aturan tombol umum merusak tampilan toggle tema. */
html[data-theme="dark"] button.theme-switch,
html[data-theme="dark"] .theme-switch{display:inline-flex!important;width:auto;min-width:132px;min-height:38px;padding:6px 10px!important;border-radius:999px!important;background:#22313c!important;color:#eef5f9!important;border:1px solid #4a5e6b!important;box-shadow:none!important}
html[data-theme="dark"] .theme-switch:hover{background:#2b3d49!important;border-color:#ff7a32!important}
html[data-theme="dark"] .theme-switch-track{background:#657783!important}
html[data-theme="dark"] .theme-switch[aria-checked="true"] .theme-switch-track{background:#ff7a32!important}
html[data-theme="dark"] .theme-switch-thumb{background:#fff!important}
html[data-theme="dark"] .callbook-theme-switch{min-width:132px!important}
@media(max-width:560px){html[data-theme="dark"] .callbook-theme-switch{min-width:42px!important;width:42px!important;height:42px!important;padding:9px!important;justify-content:center}.callbook-theme-switch .theme-switch-track{display:none}.callbook-theme-switch .theme-switch-icon{font-size:18px}}

/* Revisi lanjutan: hilangkan area putih menyilaukan dan naikkan kontras teks. */
html[data-theme="dark"]{
  --dark-bg:#0d151c;
  --dark-surface:#18252f;
  --dark-surface-2:#202f3a;
  --dark-surface-3:#273945;
  --dark-border:#425865;
  --dark-text:#edf4f8;
  --dark-muted:#b6c5cf;
}

/* Label formulir dan nilai Callbook harus terbaca jelas. */
html[data-theme="dark"] :is(label,.field>span,.filter-field>span,.directory-filter label,.member-filter label,.form-grid label,.settings-grid label){color:#dce8ef!important}
html[data-theme="dark"] :is(.callbook-modal-row strong,.callbook-row dd,.callbook-result strong,.callbook-result dd){color:#eaf3f8!important;font-weight:700}
html[data-theme="dark"] :is(.callbook-modal-row span,.callbook-row dt){color:#bdcbd4!important}
html[data-theme="dark"] .callbook-modal-source{color:#dff0fb!important}

/* Kartu dokumen profil: latar gelap netral, bukan putih. */
html[data-theme="dark"] .member-documents-card,
html[data-theme="dark"] .member-document-grid{background:#16232c!important}
html[data-theme="dark"] .member-document-item,
html[data-theme="dark"] .member-document-private{background:#202f39!important;border-color:#425864!important;color:#eaf2f7!important}
html[data-theme="dark"] .member-document-item h3,
html[data-theme="dark"] .member-document-item h3 small,
html[data-theme="dark"] .generated-card-meta span{color:#e8f1f6!important}
html[data-theme="dark"] .member-document-item h3 small{color:#c9d6de!important}
html[data-theme="dark"] .member-document-item img{background:#d4d9dc!important;border-color:#5a6d78!important}
html[data-theme="dark"] .document-image-popup{background:#24333d!important;border-color:#435965!important}

/* Preview kartu hasil generate: hanya gambar kartunya yang terang, bingkai dan area aksi tetap gelap. */
html[data-theme="dark"] .generated-card-showcase{background:#182630!important;border-color:#425865!important;box-shadow:0 8px 24px rgba(0,0,0,.28)!important}
html[data-theme="dark"] .generated-card-showcase-preview{background:#24343e!important;border-color:#465c68!important}
html[data-theme="dark"] .generated-card-showcase-preview>a{background:#24343e!important}
html[data-theme="dark"] .generated-card-showcase-preview img{background:#d9dddf!important;border-color:#657681!important}
html[data-theme="dark"] .generated-card-showcase-actions{background:#1d2b35!important;border-top:1px solid #40545f!important}

/* Ringkasan filter/template jangan berbentuk pil putih menyilaukan. */
html[data-theme="dark"] :is(.filter-summary-pill,.legacy-member-filter-summary,.legacy-member-tag){background:#263a46!important;color:#e3edf3!important;border:1px solid #48606d!important}
html[data-theme="dark"] .export-template-table tbody tr,
html[data-theme="dark"] .export-template-table tbody td{background:#18252f!important}
html[data-theme="dark"] .export-template-table tbody tr:nth-child(even) td{background:#142029!important}

/* Pemberitahuan dan baris kolom tambahan. */
html[data-theme="dark"] .notice-soft{background:#243540!important;color:#d9e6ed!important;border-left-color:#ff7a32!important}
html[data-theme="dark"] .custom-columns-box{background:#17252f!important}
html[data-theme="dark"] .custom-column-row{background:#22323d!important;border-color:#465c68!important;color:#edf4f8!important}
html[data-theme="dark"] .custom-column-row :is(label,span,strong){color:#e8f1f6!important}
html[data-theme="dark"] .custom-column-row input{background:#101b23!important;color:#f1f6f9!important}

/* Pengaturan logo/favicon: hilangkan dua panel putih besar. */
html[data-theme="dark"] .admin-photo-grid .crop-upload-group,
html[data-theme="dark"] .crop-upload-group,
html[data-theme="dark"] .site-settings-preview{background:#1c2b35!important;border-color:#425864!important;color:#e8f1f6!important}
html[data-theme="dark"] :is(.upload-preview,.site-logo-preview,.site-icon-preview,.crop-result-preview){background:#273842!important;border-color:#4a606c!important}
html[data-theme="dark"] :is(.site-logo-preview,.site-icon-preview,.crop-result-preview) img{background:transparent!important}
html[data-theme="dark"] .crop-upload-group :is(label,span,strong,h3){color:#e5eef4!important}
html[data-theme="dark"] input[type="file"]{background:#101b23!important;color:#e8f0f5!important;border-color:#445b67!important}

/* Tabel akses keuangan: seluruh badan tabel menggunakan permukaan gelap. */
html[data-theme="dark"] .finance-access-table-wrap{background:#17242d!important;border-color:#425864!important}
html[data-theme="dark"] .finance-access-table{background:#17242d!important;color:#e7f0f5!important}
html[data-theme="dark"] .finance-access-table thead th{background:#243945!important;color:#f3f7f9!important;border-color:#516773!important}
html[data-theme="dark"] .finance-access-table tbody th{background:#22333e!important;color:#edf4f8!important;border-color:#455b67!important}
html[data-theme="dark"] .finance-access-table td{background:#18252f!important;color:#e5eef4!important;border-color:#405661!important}
html[data-theme="dark"] .finance-access-table tbody tr:nth-child(even) td{background:#14212a!important}
html[data-theme="dark"] .finance-access-check:hover{background:#2b414e!important}

/* Area preview/gambar umum: kurangi putih luas tanpa mengubah isi foto atau kartu. */
html[data-theme="dark"] :is(.photo-preview-card,.document-preview,.card-preview-wrap,.image-preview-wrap){background:#22323c!important;border-color:#455b67!important;color:#e7f0f5!important}

/* Teks sekunder yang sebelumnya terlalu gelap. */
html[data-theme="dark"] :is(.field-help,.form-help,.form-hint,.readonly-note,.settings-section p,.custom-columns-head p,.admin-page-head p){color:#b8c7d0!important}

/* Revisi kontras 4: media pengaturan, menu mobile, dan metadata direktori. */
html[data-theme="dark"] .site-media-card{
  background:#1b2a34!important;
  color:#e9f1f6!important;
  border-color:#435966!important;
  box-shadow:0 8px 22px rgba(0,0,0,.2)!important;
}
html[data-theme="dark"] .site-media-card h3,
html[data-theme="dark"] .site-media-card label,
html[data-theme="dark"] .site-media-card label>span{
  color:#eaf2f7!important;
}
html[data-theme="dark"] .site-media-card .danger-check,
html[data-theme="dark"] .site-media-card .danger-check span{
  color:#ff9c91!important;
}
html[data-theme="dark"] .site-media-preview{
  background:#243640!important;
  border-color:#526a77!important;
}
html[data-theme="dark"] .site-media-preview img{
  background:transparent!important;
}

/* Menu navigasi mobile wajib mengikuti permukaan tema gelap. */
@media(max-width:900px){
  html[data-theme="dark"] .site-header .main-nav,
  html[data-theme="dark"] .main-nav{
    background:#182630!important;
    border:1px solid #405561!important;
    box-shadow:0 18px 42px rgba(0,0,0,.52)!important;
  }
  html[data-theme="dark"] .main-nav>a,
  html[data-theme="dark"] .main-nav .nav-callbook-toggle,
  html[data-theme="dark"] .main-nav .nav-finance-toggle,
  html[data-theme="dark"] .main-nav .nav-user,
  html[data-theme="dark"] .main-nav .nav-logout-button{
    color:#dce7ee!important;
  }
  html[data-theme="dark"] .main-nav>a:hover,
  html[data-theme="dark"] .main-nav>a.is-active,
  html[data-theme="dark"] .main-nav .nav-callbook-toggle:hover,
  html[data-theme="dark"] .main-nav .nav-finance-toggle:hover,
  html[data-theme="dark"] .main-nav .nav-user:hover{
    background:#293b47!important;
    color:#ff9a61!important;
  }
  html[data-theme="dark"] .nav-account,
  html[data-theme="dark"] .nav-finance-menu{
    color:#dce7ee!important;
  }
}

/* Metadata kartu anggota: label dan nilainya jangan tenggelam. */
html[data-theme="dark"] .legacy-member-row .legacy-member-title-line h2{
  color:#73c7ff!important;
}
html[data-theme="dark"] .legacy-member-row .legacy-member-meta,
html[data-theme="dark"] .legacy-member-row .legacy-member-meta div{
  color:#d9e5ec!important;
}
html[data-theme="dark"] .legacy-member-row .legacy-member-meta dt{
  color:#f0f5f8!important;
}
html[data-theme="dark"] .legacy-member-row .legacy-member-meta dd{
  color:#bcd0dc!important;
}
html[data-theme="dark"] .legacy-member-row .legacy-member-meta dd a{
  color:#8fd0fa!important;
}

/* 2026-07-27: toggle berada di luar menu yang diciutkan pada layar mobile */
.header-theme-control{display:flex;align-items:center;margin-left:auto;margin-right:8px;position:relative;z-index:12}
.header-theme-control .theme-switch{margin:0}
@media(max-width:900px){
  .header-theme-control{margin-left:auto;margin-right:8px}
  .header-theme-control .theme-switch{width:auto;min-width:42px;padding:7px 9px}
  .header-theme-control .theme-switch-label{display:none}
  .header-theme-control .theme-switch-icon{display:none}
  .header-theme-control .theme-switch-track{display:inline-block}
  .main-nav>.theme-switch{display:none!important}
}
.admin-sidebar>.admin-theme-wrap{flex:0 0 auto;margin:10px 6px 8px}
@media(max-width:900px){
  .admin-sidebar>.admin-theme-wrap{margin:8px 10px}
  .admin-sidebar>.admin-theme-wrap .theme-switch{width:100%!important}
}

/* Kontras penuh halaman detail anggota di panel admin */
html[data-theme="dark"] .member-admin-summary{background:#182833!important;border-color:#3b5361!important;box-shadow:none!important}
html[data-theme="dark"] .member-admin-summary>div:nth-child(2) strong,
html[data-theme="dark"] .member-admin-summary dd{color:#eef5f8!important}
html[data-theme="dark"] .member-admin-summary>div:nth-child(2) span,
html[data-theme="dark"] .member-admin-summary dt{color:#aebfca!important}
html[data-theme="dark"] .manage-card{background:#172630!important;border-color:#3a5260!important;box-shadow:none!important}
html[data-theme="dark"] .manage-card>header{background:#1c2e39!important;border-color:#3a5260!important}
html[data-theme="dark"] .manage-card h2{color:#f1f6f8!important}
html[data-theme="dark"] .manage-card header p,
html[data-theme="dark"] .field-help{color:#b7c6cf!important}
html[data-theme="dark"] .manage-form label>span{color:#c8d5dc!important}
html[data-theme="dark"] .role-choice{background:#20323d!important;border-color:#455d6a!important;color:#eef5f8!important}
html[data-theme="dark"] .role-choice strong{color:#f4f8fa!important}
html[data-theme="dark"] .role-choice small{color:#b9c8d0!important}
html[data-theme="dark"] .detail-grid div{border-color:#314955!important}
html[data-theme="dark"] .detail-grid dt{color:#aebfc9!important}
html[data-theme="dark"] .detail-grid dd{color:#eef5f8!important}
html[data-theme="dark"] .empty-inline{color:#c0cdd4!important}

/* Toggle tema ikon tunggal: tetap ringkas di desktop dan mobile. */
.theme-switch,
html[data-theme="dark"] button.theme-switch,
html[data-theme="dark"] .theme-switch {
  width:42px!important; min-width:42px!important; height:42px!important; min-height:42px!important;
  padding:0!important; display:inline-flex!important; align-items:center!important; justify-content:center!important;
  gap:0!important; border-radius:50%!important; line-height:1!important;
}
.theme-switch-icon, html[data-theme="dark"] .theme-switch-icon {display:block!important;font-size:20px!important;line-height:1!important}
.theme-switch-label,.theme-switch-track{display:none!important}
.admin-theme-wrap{display:flex;justify-content:flex-start}
.admin-theme-wrap .theme-switch,html[data-theme="dark"] .admin-theme-wrap .theme-switch{width:42px!important;min-width:42px!important}
.callbook-theme-switch,html[data-theme="dark"] .callbook-theme-switch{width:42px!important;min-width:42px!important;height:42px!important}
@media(max-width:900px){.header-theme-control .theme-switch{width:42px!important;min-width:42px!important;height:42px!important}}

/* 2026-07-27: penyempurnaan editor laman admin */
.page-admin-heading,
.page-editor-form{
  margin-left:clamp(12px,1.5vw,24px);
  margin-right:clamp(12px,1.5vw,24px);
}
.page-editor-form{
  padding-bottom:clamp(18px,2vw,30px);
}
.page-editor-main,
.page-editor-side{
  padding:clamp(14px,1.5vw,22px)!important;
  border-radius:12px;
}
.page-editor-wrap{
  border-radius:10px;
}
.page-content-field{
  gap:0!important;
}
.page-content-field>span{
  display:block;
  padding:8px 12px;
}
.page-content-field textarea{
  display:block;
  min-height:360px;
  border-radius:0!important;
  border-left:0!important;
  border-right:0!important;
}
.page-editor-wrap>.description{
  margin:0;
  padding:10px 12px 12px;
}
.page-editor-side .button{
  width:100%;
  justify-content:center;
}

html[data-theme="dark"] .page-editor-main,
html[data-theme="dark"] .page-editor-side{
  background:#172630!important;
  border:1px solid #3b5361!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .page-editor-wrap{
  background:#14232c!important;
  border-color:#405866!important;
}
html[data-theme="dark"] .page-editor-toolbar{
  background:#1d303b!important;
  border-color:#405866!important;
}
html[data-theme="dark"] .page-editor-toolbar button{
  background:#263b47!important;
  border-color:#536c79!important;
  color:#eef5f8!important;
}
html[data-theme="dark"] .page-editor-toolbar button:hover{
  background:#304957!important;
  border-color:#728894!important;
}
html[data-theme="dark"] .page-content-field>span,
html[data-theme="dark"] .page-editor-wrap>.description{
  background:#192b35!important;
  color:#bdccd5!important;
}
html[data-theme="dark"] .page-content-field textarea,
html[data-theme="dark"] .page-editor-main textarea,
html[data-theme="dark"] .page-editor-main input,
html[data-theme="dark"] .page-editor-side select{
  background:#0f1d25!important;
  border-color:#405866!important;
  color:#f1f6f8!important;
}
html[data-theme="dark"] .page-slug-row{
  background:#0f1d25!important;
  border-color:#405866!important;
}
html[data-theme="dark"] .page-slug-row span{
  color:#aebfca!important;
}
html[data-theme="dark"] .page-editor-side h2{
  color:#f2f7f9!important;
  border-color:#405866!important;
}
html[data-theme="dark"] .page-editor-main label>span,
html[data-theme="dark"] .page-editor-side label>span{
  color:#dce7ed!important;
}

@media(max-width:820px){
  .page-admin-heading,
  .page-editor-form{margin-left:10px;margin-right:10px}
  .page-editor-main,.page-editor-side{padding:12px!important}
  .page-content-field textarea{min-height:300px}
}

/* 2026-07-28: perbaikan tema gelap form autentikasi dan menu aksi anggota mobile */
html[data-theme="dark"] .auth-section,
html[data-theme="dark"] .login-page-section,
html[data-theme="dark"] .register-page{
  color:#e7eef4!important;
}
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .register-form{
  background:#182630!important;
  color:#e7eef4!important;
  border-color:#405663!important;
  box-shadow:0 14px 36px rgba(0,0,0,.34)!important;
}
html[data-theme="dark"] .auth-heading :is(h1,h2,.eyebrow),
html[data-theme="dark"] .register-heading :is(h1,h2,.eyebrow),
html[data-theme="dark"] .login-card :is(h1,h2,strong,label),
html[data-theme="dark"] .register-form :is(h1,h2,h3,strong,label){color:#eef5f8!important}
html[data-theme="dark"] .login-card :is(.password-help-line,.remember-me-row span),
html[data-theme="dark"] .register-form :is(.auth-switch,small,.description){color:#aebfca!important}
html[data-theme="dark"] .password-toggle{
  background:#243640!important;
  color:#eef5f8!important;
  border-color:#526875!important;
}
html[data-theme="dark"] .password-toggle:hover{background:#304752!important;border-color:#ff7a32!important}
html[data-theme="dark"] .password-help-card{
  background:#182630!important;
  color:#e7eef4!important;
  border:1px solid #405663!important;
}
html[data-theme="dark"] .password-help-card>p:not(.eyebrow):not(.form-error-text){color:#b8c7d0!important}
html[data-theme="dark"] .modal-close{background:#293d48!important;color:#edf4f8!important}

html[data-theme="dark"] .member-type-card{
  background:#1b2a34!important;
  color:#e5edf2!important;
  border-color:#415663!important;
}
html[data-theme="dark"] .member-type-card span{color:#b7c5ce!important}
html[data-theme="dark"] .member-type-card.is-selected{
  background:#30251f!important;
  border-color:#ff7a32!important;
}
html[data-theme="dark"] .registration-panel,
html[data-theme="dark"] .candidate-registration-panel,
html[data-theme="dark"] .amateur-registration-panel{
  background:#14232c!important;
  color:#e7eef4!important;
  border:1px solid #3f5764!important;
}
html[data-theme="dark"] .candidate-number-preview,
html[data-theme="dark"] .registration-djid-note{
  background:#1c303a!important;
  color:#e5eef3!important;
  border-color:#47616f!important;
}
html[data-theme="dark"] .candidate-number-preview small{color:#aebfca!important}
html[data-theme="dark"] .candidate-form-stack label,
html[data-theme="dark"] .register-form .form-group>label{color:#dce7ed!important}
html[data-theme="dark"] .crop-upload-group{
  background:#1a2b35!important;
  color:#e5edf2!important;
  border-color:#405864!important;
}
html[data-theme="dark"] .crop-upload-button{background:#29404c!important;color:#f4f8fa!important}
html[data-theme="dark"] .crop-upload-button:hover{background:#365564!important}

/* Aturan mobile lama memakai !important dan muncul setelah aturan tema umum. */
@media(max-width:640px){
  html[data-theme="dark"] .member-action-wrap.is-open .member-action-menu,
  html[data-theme="dark"] .member-action-menu{
    background:#1a2731!important;
    color:#e5edf2!important;
    border-color:#465d69!important;
    box-shadow:0 14px 34px rgba(0,0,0,.5)!important;
  }
  html[data-theme="dark"] .member-action-wrap.is-open .member-action-menu a,
  html[data-theme="dark"] .member-action-wrap.is-open .member-action-menu button,
  html[data-theme="dark"] .member-action-menu a,
  html[data-theme="dark"] .member-action-menu button{
    background:transparent!important;
    color:#e2ebf0!important;
  }
  html[data-theme="dark"] .member-action-wrap.is-open .member-action-menu a:hover,
  html[data-theme="dark"] .member-action-wrap.is-open .member-action-menu button:hover,
  html[data-theme="dark"] .member-action-menu a:hover,
  html[data-theme="dark"] .member-action-menu button:hover{
    background:#2b3d48!important;
    color:#ff9a61!important;
  }
  html[data-theme="dark"] .member-action-menu .action-danger{color:#ff9189!important}
}

/* =========================================================
   JADWAL UNAR — DARK THEME
   ========================================================= */
html[data-theme="dark"] .unar-hero h1,
html[data-theme="dark"] .unar-schedule-card h2{
  color:#eef5f9!important;
}
html[data-theme="dark"] .unar-hero p,
html[data-theme="dark"] .unar-disclaimer,
html[data-theme="dark"] .unar-schedule-card small{
  color:#aebdca!important;
}
html[data-theme="dark"] .unar-update-card{
  background:#173329!important;
  border-color:#2d6b50!important;
  box-shadow:0 10px 26px rgba(0,0,0,.24)!important;
}
html[data-theme="dark"] .unar-update-card span{
  color:#9fd7b8!important;
}
html[data-theme="dark"] .unar-update-card strong{
  color:#d8f5e4!important;
}
html[data-theme="dark"] .unar-update-card.is-stale{
  background:#3a2d18!important;
  border-color:#7b5b23!important;
}
html[data-theme="dark"] .unar-update-card.is-stale span,
html[data-theme="dark"] .unar-update-card.is-stale strong{
  color:#ffd990!important;
}
html[data-theme="dark"] .unar-notice-warning{
  background:#3a2d18!important;
  border-color:#7b5b23!important;
  color:#ffe0a3!important;
}
html[data-theme="dark"] .unar-schedule-card{
  background:#18232d!important;
  color:#dce6ed!important;
  border-color:#344652!important;
  box-shadow:0 10px 30px rgba(0,0,0,.26)!important;
}
html[data-theme="dark"] .unar-date{
  color:#b9c8d1!important;
}
html[data-theme="dark"] .unar-status-badge{
  background:#18382b!important;
  color:#9be0b9!important;
}
html[data-theme="dark"] .unar-schedule-card.is-low .unar-status-badge{
  background:#3a2d18!important;
  color:#ffd58a!important;
}
html[data-theme="dark"] .unar-schedule-card.is-full .unar-status-badge{
  background:#3b2023!important;
  color:#ffb4b4!important;
}
html[data-theme="dark"] .unar-stats div{
  background:#111c24!important;
  border:1px solid #2f424e!important;
}
html[data-theme="dark"] .unar-stats dt{
  color:#aebdca!important;
}
html[data-theme="dark"] .unar-stats dd{
  color:#f0f6f9!important;
}
html[data-theme="dark"] .unar-stats .unar-remaining{
  background:#173329!important;
  border-color:#2d6049!important;
}
html[data-theme="dark"] .unar-schedule-card.is-low .unar-stats .unar-remaining{
  background:#3a2d18!important;
  border-color:#725522!important;
}
html[data-theme="dark"] .unar-schedule-card.is-full .unar-stats .unar-remaining{
  background:#3b2023!important;
  border-color:#714046!important;
}
html[data-theme="dark"] .unar-progress{
  background:#2a3a45!important;
}
html[data-theme="dark"] .unar-table-panel{
  background:#18232d!important;
  border-color:#344652!important;
}
html[data-theme="dark"] .unar-table th{
  background:#223640!important;
  color:#f2f7fa!important;
  border-color:#3b4f5b!important;
}
html[data-theme="dark"] .unar-table td{
  color:#dce6ed!important;
  border-color:#31434f!important;
}
html[data-theme="dark"] .unar-table tbody tr:nth-child(even){
  background:#14202a!important;
}
html[data-theme="dark"] .unar-table tbody tr:nth-child(odd){
  background:#18232d!important;
}
html[data-theme="dark"] .unar-table tbody tr:hover{
  background:#20313c!important;
}
html[data-theme="dark"] .unar-table td:before{
  color:#9fb1bd!important;
}

/* Patch 2026-08-02: warna sidebar/menu profil mobile pada tema gelap. */
@media (max-width:900px){
  html[data-theme="dark"] .site-header .main-nav{
    background:#16222c!important;
    box-shadow:16px 0 40px rgba(0,0,0,.42)!important;
  }
  html[data-theme="dark"] .site-header .mobile-nav-theme{
    color:#dce6ed!important;
    border-top-color:#304653!important;
    background:transparent!important;
  }
  html[data-theme="dark"] .site-header .mobile-nav-theme:hover{background:#2a3540!important;color:#ff9a61!important}
  html[data-theme="dark"] .site-header .mobile-header-account .nav-account-menu{background:#1d2b35!important;border-color:#415765!important}
}
