/* =====================================================
   DARK MODE STYLESHEET
   Aktif saat <body> memiliki class "dark-mode"
   ===================================================== */

/* ── Tombol Toggle Dark Mode ─────────────────────── */
#dark-mode-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

#dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(20deg) scale(1.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

#dark-mode-toggle .icon-sun  { display: none; }
#dark-mode-toggle .icon-moon { display: inline-block; }

body.dark-mode #dark-mode-toggle .icon-sun  { display: inline-block; }
body.dark-mode #dark-mode-toggle .icon-moon { display: none; }


/* ── Variabel Warna Dark Mode ────────────────────── */
body.dark-mode {
    background-color: #0f1117;
    color: #e2e8f0;
}

/* ── Gradient Background ─────────────────────────── */
body.dark-mode .argon-bg-gradient {
    background: linear-gradient(135deg, #1a1f3a 0%, #111827 100%);
}

/* ── Sidebar ─────────────────────────────────────── */
body.dark-mode .sidebar-argon {
    background: #1e2030;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.4);
}

body.dark-mode .sidebar-brand {
    color: #e2e8f0;
}

body.dark-mode .nav-label-argon {
    color: #64748b;
}

body.dark-mode .nav-menu-argon li a {
    color: #94a3b8;
}

body.dark-mode .nav-menu-argon li a:hover,
body.dark-mode .nav-menu-argon li a.active {
    background-color: #2d3149;
    color: #e2e8f0;
}

body.dark-mode .nav-menu-argon li a i {
    background: #2d3149;
    color: #7c8fd0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .nav-menu-argon li a.active i {
    background: linear-gradient(135deg, #4c63d2, #7258d4);
    color: #ffffff;
}

body.dark-mode .has-submenu.open > a.submenu-toggle.active {
    background: #2d3149;
    color: #e2e8f0;
}

body.dark-mode .has-submenu.open > a.submenu-toggle.active i:first-child {
    background: linear-gradient(135deg, #4c63d2, #7258d4);
    color: #ffffff;
}

body.dark-mode .submenu-argon li a.active {
    color: #7c8fd0;
    background: #252840;
}

body.dark-mode .sidebar-toggle {
    color: #7c8fd0;
}

body.dark-mode .sidebar-toggle:hover {
    background: #2d3149;
    color: #e2e8f0;
}

body.dark-mode .sidebar-footer {
    border-top: 1px solid #2d3149;
}

body.dark-mode .sidebar-footer strong {
    color: #e2e8f0;
}

body.dark-mode .sidebar-footer a {
    color: #f87171;
}

body.dark-mode .sidebar-argon::-webkit-scrollbar-thumb {
    background: #2d3149;
}

body.dark-mode .sidebar-argon::-webkit-scrollbar-thumb:hover {
    background: #3d4568;
}


/* ── Header ──────────────────────────────────────── */
body.dark-mode .argon-header {
    color: #e2e8f0;
}

body.dark-mode .page-title-argon {
    color: #e2e8f0;
}

body.dark-mode .global-back-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
}

body.dark-mode .global-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.dark-mode #clock-wrapper {
    color: #cbd5e1;
}

body.dark-mode .btn-header-argon {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
}

body.dark-mode .btn-header-argon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.dark-mode .mobile-menu-toggle {
    background: #1e2030;
    color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}


/* ── Card & Content ──────────────────────────────── */
body.dark-mode .card-argon,
body.dark-mode .card {
    background: #1e2030 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.3) !important;
    border-color: #2d3149 !important;
}

body.dark-mode .card-header {
    background: #1e2030 !important;
    color: #e2e8f0 !important;
    border-bottom-color: #2d3149 !important;
}

body.dark-mode .card-body {
    background: #1e2030 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .card-footer {
    background: #1e2030 !important;
    border-top-color: #2d3149 !important;
}

body.dark-mode .card-header-argon {
    border-bottom-color: #2d3149;
}

body.dark-mode .card-title-argon {
    color: #e2e8f0;
}

body.dark-mode .content-wrapper {
    background: transparent;
}

/* ── Dashboard Spesifik ──────────────────────────── */
body.dark-mode .page-header {
    background: #1e2030 !important;
    border-color: #2d3149 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .page-title h1 {
    color: #e2e8f0 !important;
}

body.dark-mode .page-subtitle {
    color: #94a3b8 !important;
}

body.dark-mode .app-main__inner {
    background: transparent !important;
}

body.dark-mode .report-panel,
body.dark-mode .report-info-item,
body.dark-mode .report-history-empty {
    background: #1e2030 !important;
    border-color: #2d3149 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35) !important;
}

body.dark-mode .report-info-item {
    background: #252840 !important;
}

body.dark-mode .report-panel-header h2,
body.dark-mode .report-info-item strong,
body.dark-mode .report-history-table td,
body.dark-mode .report-history-table td strong,
body.dark-mode .report-history-table td span {
    color: #e2e8f0 !important;
}

body.dark-mode .report-panel-header p,
body.dark-mode .report-info-item span,
body.dark-mode .report-history-table td small,
body.dark-mode .report-history-empty {
    color: #94a3b8 !important;
}

body.dark-mode .report-history-table th {
    background: #252840 !important;
    color: #cbd5e1 !important;
    border-bottom-color: #343852 !important;
}

body.dark-mode .report-history-table td {
    border-bottom-color: #2d3149 !important;
}

body.dark-mode .report-required-note {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #fca5a5 !important;
}

/* ── Tabel ───────────────────────────────────────── */
body.dark-mode table.dataTable,
body.dark-mode .table {
    background: #1e2030 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .table thead th,
body.dark-mode table.dataTable thead th {
    background: #252840 !important;
    color: #94a3b8 !important;
    border-bottom-color: #2d3149 !important;
    border-color: #2d3149 !important;
}

body.dark-mode .table tbody tr,
body.dark-mode table.dataTable tbody tr {
    background: #1e2030 !important;
    color: #e2e8f0 !important;
    border-color: #2d3149 !important;
}

body.dark-mode .table tbody tr:hover,
body.dark-mode table.dataTable tbody tr:hover {
    background: #252840 !important;
}

body.dark-mode .table-bordered,
body.dark-mode .table-bordered td,
body.dark-mode .table-bordered th {
    border-color: #2d3149 !important;
}

body.dark-mode .table td,
body.dark-mode .table th {
    border-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background: #252840 !important;
}

/* DataTables wrapper */
body.dark-mode .dataTables_wrapper .dataTables_length,
body.dark-mode .dataTables_wrapper .dataTables_filter,
body.dark-mode .dataTables_wrapper .dataTables_info,
body.dark-mode .dataTables_wrapper .dataTables_paginate {
    color: #94a3b8 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_filter input,
body.dark-mode .dataTables_wrapper .dataTables_length select {
    background: #252840 !important;
    color: #e2e8f0 !important;
    border-color: #2d3149 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #94a3b8 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #2d3149 !important;
    color: #e2e8f0 !important;
    border-color: #2d3149 !important;
}


/* ── Form & Input ────────────────────────────────── */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select,
body.dark-mode .form-control {
    background-color: #252840 !important;
    color: #e2e8f0 !important;
    border-color: #3d4568 !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #64748b !important;
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus,
body.dark-mode .form-control:focus {
    background-color: #2d3149 !important;
    color: #e2e8f0 !important;
    border-color: #4c63d2 !important;
    box-shadow: 0 0 0 0.2rem rgba(76, 99, 210, 0.25) !important;
}

body.dark-mode .form-group label,
body.dark-mode label {
    color: #cbd5e1 !important;
}

body.dark-mode .input-group-text {
    background-color: #252840 !important;
    color: #94a3b8 !important;
    border-color: #3d4568 !important;
}

/* Select2 */
body.dark-mode .select2-container--bootstrap4 .select2-selection,
body.dark-mode .select2-container--default .select2-selection--single {
    background-color: #252840 !important;
    color: #e2e8f0 !important;
    border-color: #3d4568 !important;
}

body.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #e2e8f0 !important;
}

body.dark-mode .select2-dropdown {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
}

body.dark-mode .select2-results__option {
    color: #e2e8f0 !important;
}

body.dark-mode .select2-results__option--highlighted {
    background-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .select2-search--dropdown .select2-search__field {
    background-color: #252840 !important;
    color: #e2e8f0 !important;
    border-color: #3d4568 !important;
}

body.dark-mode .select2-container--default .select2-selection--multiple {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
}

body.dark-mode .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #3d4568 !important;
    color: #e2e8f0 !important;
    border-color: #4c63d2 !important;
}


/* ── Teks Umum ───────────────────────────────────── */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: #e2e8f0 !important;
}

body.dark-mode p, body.dark-mode span, body.dark-mode li,
body.dark-mode td, body.dark-mode th, body.dark-mode div {
    color: inherit;
}

body.dark-mode .text-muted {
    color: #64748b !important;
}

body.dark-mode .text-dark {
    color: #e2e8f0 !important;
}

body.dark-mode .text-body {
    color: #e2e8f0 !important;
}

body.dark-mode .stat-label {
    color: #64748b !important;
}

body.dark-mode .stat-value {
    color: #e2e8f0 !important;
}

body.dark-mode .stat-card {
    background: #1e2030 !important;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.3) !important;
}


/* ── Bootstrap Utilities ─────────────────────────── */
body.dark-mode .bg-white,
body.dark-mode .bg-light {
    background-color: #1e2030 !important;
}

body.dark-mode .border,
body.dark-mode .border-bottom,
body.dark-mode .border-top {
    border-color: #2d3149 !important;
}

body.dark-mode .shadow,
body.dark-mode .shadow-sm {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

/* ── Badge ───────────────────────────────────────── */
body.dark-mode .badge-light {
    background-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .badge-secondary {
    background-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

/* ── Alert ───────────────────────────────────────── */
body.dark-mode .alert {
    border-color: #2d3149;
}

body.dark-mode .alert-info {
    background-color: #1a2d4a !important;
    color: #7dd3fc !important;
    border-color: #1e3a5f !important;
}

body.dark-mode .alert-warning {
    background-color: #3b2f00 !important;
    color: #fcd34d !important;
    border-color: #4a3b00 !important;
}

body.dark-mode .alert-danger {
    background-color: #3b0a0a !important;
    color: #fca5a5 !important;
    border-color: #4a0e0e !important;
}

body.dark-mode .alert-success {
    background-color: #0a2e1e !important;
    color: #6ee7b7 !important;
    border-color: #0e3b27 !important;
}

/* ── Modal ───────────────────────────────────────── */
body.dark-mode .modal-content {
    background-color: #1e2030 !important;
    color: #e2e8f0 !important;
    border-color: #2d3149 !important;
}

body.dark-mode .modal-header {
    background-color: #252840 !important;
    border-bottom-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .modal-header .modal-title {
    color: #e2e8f0 !important;
}

body.dark-mode .modal-footer {
    background-color: #252840 !important;
    border-top-color: #2d3149 !important;
}

body.dark-mode .modal-header .close,
body.dark-mode .modal-header button.close {
    color: #e2e8f0 !important;
    opacity: 0.7;
}

body.dark-mode .modal-body {
    color: #e2e8f0 !important;
}


/* ── Dropdown ────────────────────────────────────── */
body.dark-mode .dropdown-menu {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .dropdown-item {
    color: #e2e8f0 !important;
}

body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item:focus {
    background-color: #252840 !important;
    color: #ffffff !important;
}

body.dark-mode .dropdown-divider {
    border-top-color: #2d3149 !important;
}


/* ── Breadcrumb ──────────────────────────────────── */
body.dark-mode .breadcrumb {
    background-color: transparent !important;
}

body.dark-mode .breadcrumb-item,
body.dark-mode .breadcrumb-item a {
    color: #94a3b8 !important;
}

body.dark-mode .breadcrumb-item.active {
    color: #e2e8f0 !important;
}

body.dark-mode .breadcrumb-item + .breadcrumb-item::before {
    color: #64748b !important;
}

/* ── Nav Tabs ────────────────────────────────────── */
body.dark-mode .nav-tabs {
    border-bottom-color: #2d3149 !important;
}

body.dark-mode .nav-tabs .nav-link {
    color: #94a3b8 !important;
}

body.dark-mode .nav-tabs .nav-link.active {
    background-color: #1e2030 !important;
    border-color: #2d3149 #2d3149 #1e2030 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .nav-pills .nav-link {
    color: #94a3b8 !important;
}

body.dark-mode .nav-pills .nav-link.active {
    background-color: #4c63d2 !important;
    color: #ffffff !important;
}

/* ── Tombol ──────────────────────────────────────── */
body.dark-mode .btn-light {
    background-color: #2d3149 !important;
    color: #e2e8f0 !important;
    border-color: #3d4568 !important;
}

body.dark-mode .btn-light:hover {
    background-color: #3d4568 !important;
    color: #ffffff !important;
}

body.dark-mode .btn-secondary {
    background-color: #3d4568 !important;
    border-color: #4c5580 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .btn-outline-secondary {
    border-color: #3d4568 !important;
    color: #94a3b8 !important;
}

body.dark-mode .btn-outline-secondary:hover {
    background-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

/* ── Footer ──────────────────────────────────────── */
body.dark-mode .footer-argon {
    color: #64748b;
}

body.dark-mode .footer-argon a {
    color: #7c8fd0;
}

body.dark-mode .footer-argon a:hover {
    color: #a5b4fb;
}

/* ── List Group ──────────────────────────────────── */
body.dark-mode .list-group-item {
    background-color: #1e2030 !important;
    color: #e2e8f0 !important;
    border-color: #2d3149 !important;
}

body.dark-mode .list-group-item:hover {
    background-color: #252840 !important;
}

/* ── Progress Bar ────────────────────────────────── */
body.dark-mode .progress {
    background-color: #252840 !important;
}

/* ── HR ──────────────────────────────────────────── */
body.dark-mode hr {
    border-color: #2d3149 !important;
}

/* ── Pre / Code ──────────────────────────────────── */
body.dark-mode pre, body.dark-mode code {
    background-color: #252840 !important;
    color: #a5b4fb !important;
}

/* ── Toastr ──────────────────────────────────────── */
body.dark-mode #toast-container .toast {
    opacity: 0.95 !important;
}

/* ── Scrollbar Global ────────────────────────────── */
body.dark-mode ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #0f1117;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #2d3149;
    border-radius: 10px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #3d4568;
}

/* ── Transisi halus ──────────────────────────────── */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar-argon,
.card,
.card-argon,
.modal-content,
.dropdown-menu,
.form-control,
input, textarea, select {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}


/* =====================================================
   DARK MODE - OPAC (Halaman Publik)
   Layout: app/Views/layout/opac/layout.php
   CSS: opac-custom.css, opac_style.css
   ===================================================== */

/* ── Body OPAC ───────────────────────────────────── */
body.dark-mode {
    background-color: #0f1117 !important;
    color: #e2e8f0 !important;
}

/* ── OPAC Navbar ─────────────────────────────────── */
body.dark-mode .navbar-custom {
    background-color: #141824 !important;
    border-bottom: 1px solid #2d3149 !important;
}

body.dark-mode .navbar-brand h1 {
    color: #e2e8f0 !important;
}

body.dark-mode .navbar-brand p {
    color: #94a3b8 !important;
}

body.dark-mode .nav-link {
    color: #cbd5e1 !important;
}

body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
    color: #a5b4fb !important;
}

body.dark-mode .navbar-toggler {
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,0.2) !important;
}

body.dark-mode .navbar-toggler-icon-custom {
    color: #e2e8f0 !important;
}

/* ── OPAC Dropdown Menu ──────────────────────────── */
body.dark-mode .navbar-custom .dropdown-menu {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
}

body.dark-mode .navbar-custom .dropdown-item {
    color: #e2e8f0 !important;
}

body.dark-mode .navbar-custom .dropdown-item:hover {
    background-color: #252840 !important;
    color: #ffffff !important;
}

/* ── OPAC Hero Section ───────────────────────────── */
body.dark-mode .hero-section {
    background: linear-gradient(135deg, #1a2340 0%, #111827 100%) !important;
}

body.dark-mode .hero-section h1,
body.dark-mode .hero-section h2 {
    color: #e2e8f0 !important;
}

body.dark-mode .hero-section .lead {
    color: #cbd5e1 !important;
}

/* ── OPAC Search Box ─────────────────────────────── */
body.dark-mode .search-box .form-control,
body.dark-mode .search-box .form-select {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .search-box .form-control::placeholder {
    color: #64748b !important;
}

/* ── OPAC Content Section ────────────────────────── */
body.dark-mode .content-section {
    background-color: #111827 !important;
}

/* ── Catalog Card ────────────────────────────────── */
body.dark-mode .catalog-card {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
}

body.dark-mode .catalog-card .card-body {
    background-color: #1e2030 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .catalog-card h5,
body.dark-mode .catalog-card h6 {
    color: #e2e8f0 !important;
}

body.dark-mode .catalog-card .text-muted,
body.dark-mode .catalog-card small {
    color: #94a3b8 !important;
}

body.dark-mode .book-cover {
    border-color: #2d3149 !important;
}

/* ── Sidebar OPAC ────────────────────────────────── */
body.dark-mode .sidebar-card {
    background-color: #1e2030 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4) !important;
}

body.dark-mode .sidebar-card .card-body {
    background-color: #1e2030 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .stat-item {
    border-bottom-color: #2d3149 !important;
}

body.dark-mode .stat-icon {
    background-color: #252840 !important;
}

body.dark-mode .stat-value {
    color: #e2e8f0 !important;
}

body.dark-mode .stat-section {
    border-bottom-color: #2d3149 !important;
}

body.dark-mode .stat-section h6 {
    color: #e2e8f0 !important;
}

body.dark-mode .stat-list-item {
    border-bottom-color: #2d3149 !important;
}

body.dark-mode .stat-name {
    color: #94a3b8 !important;
}

body.dark-mode .stat-name:hover {
    color: #7c8fd0 !important;
}

body.dark-mode .stat-list::-webkit-scrollbar-track {
    background: #1e2030 !important;
}

body.dark-mode .stat-list::-webkit-scrollbar-thumb {
    background: #2d3149 !important;
}

/* ── OPAC Footer ─────────────────────────────────── */
body.dark-mode .footer-custom {
    background-color: #0a0d14 !important;
    border-top-color: #1e2030 !important;
    color: #94a3b8 !important;
}

body.dark-mode .footer-custom h4,
body.dark-mode .footer-custom .footer-title {
    color: #e2e8f0 !important;
}

body.dark-mode .footer-links a {
    color: #64748b !important;
}

body.dark-mode .footer-links a:hover {
    color: #7c8fd0 !important;
}

body.dark-mode .footer-contact li {
    color: #64748b !important;
}

body.dark-mode .footer-custom .text-secondary {
    color: #64748b !important;
}

body.dark-mode .footer-custom .border-top {
    border-color: #1e2030 !important;
}

/* ── OPAC Pagination ─────────────────────────────── */
body.dark-mode .pagination .page-link {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
    color: #94a3b8 !important;
}

body.dark-mode .pagination .page-link:hover {
    background-color: #2d3149 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .pagination .page-item.active .page-link {
    background-color: #4c63d2 !important;
    border-color: #4c63d2 !important;
    color: #ffffff !important;
}

body.dark-mode .pagination .page-item.disabled .page-link {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
    color: #3d4568 !important;
}

/* ── OPAC Login Button ───────────────────────────── */
body.dark-mode .btn.btn-light.text-primary {
    background-color: rgba(255,255,255,0.1) !important;
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,0.2) !important;
}

body.dark-mode .btn.btn-light.text-primary:hover {
    background-color: rgba(255,255,255,0.2) !important;
    color: #ffffff !important;
}

/* ── OPAC General Text ───────────────────────────── */
body.dark-mode .text-secondary {
    color: #64748b !important;
}

body.dark-mode h1:not(.hero-section h1),
body.dark-mode h2:not(.hero-section h2),
body.dark-mode h3, body.dark-mode h4, body.dark-mode h5 {
    color: #e2e8f0 !important;
}


/* =====================================================
   DARK MODE - OPAC INDEX PAGE (Inline styles override)
   Kelas-kelas yang didefinisikan langsung di <style>
   dalam file Opac/Views/index.php
   ===================================================== */

/* ── Glass Card (kotak pencarian di hero) ────────── */
body.dark-mode .glass-card {
    background: rgba(30, 32, 48, 0.97) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
}

/* ── Input custom dalam glass card ──────────────── */
body.dark-mode .custom-input {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .custom-input::placeholder {
    color: #64748b !important;
}

body.dark-mode .custom-input:focus {
    background-color: #2d3149 !important;
    border-color: #5b72e0 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 0 0 0.25rem rgba(76, 99, 210, 0.3) !important;
}

body.dark-mode select.custom-input option {
    background-color: #1e2030 !important;
    color: #e2e8f0 !important;
}

/* ── Sidebar Card (Statistik, Penerbit, dll) ─────── */
body.dark-mode .sidebar-card {
    background: #1e2030 !important;
    border: 1px solid #2d3149 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .sidebar-card .card-body {
    background: #1e2030 !important;
    color: #e2e8f0 !important;
}

/* ── bg-light di dalam sidebar card ─────────────── */
body.dark-mode .sidebar-card .bg-light {
    background-color: #252840 !important;
}

body.dark-mode .sidebar-card .text-dark {
    color: #e2e8f0 !important;
}

body.dark-mode .sidebar-card .text-muted,
body.dark-mode .sidebar-card small.text-muted {
    color: #94a3b8 !important;
}

/* ── Stat List Item links dalam sidebar ──────────── */
body.dark-mode .stat-list-item a {
    color: #94a3b8 !important;
}

body.dark-mode .stat-list-item a:hover {
    color: #a5b4fb !important;
}

body.dark-mode .stat-list-item {
    border-bottom-color: #2d3149 !important;
}

/* ── Stat Badge ──────────────────────────────────── */
body.dark-mode .stat-badge {
    background: #2d3149 !important;
    color: #a5b4fb !important;
}

/* ── Catalog Card ────────────────────────────────── */
body.dark-mode .catalog-card {
    background: #1e2030 !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid #2d3149 !important;
}

body.dark-mode .catalog-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5) !important;
}

/* ── Judul & info buku ───────────────────────────── */
body.dark-mode .catalog-card h5,
body.dark-mode .catalog-card h6 {
    color: #e2e8f0 !important;
}

body.dark-mode .catalog-card .book-meta {
    color: #94a3b8 !important;
}

body.dark-mode .catalog-card .book-meta i {
    color: #64748b !important;
}

/* ── heading Koleksi Terbaru ─────────────────────── */
body.dark-mode .catalog-section h4.text-dark,
body.dark-mode .text-dark {
    color: #e2e8f0 !important;
}

/* ── border-bottom section header ───────────────── */
body.dark-mode .border-bottom {
    border-bottom-color: #2d3149 !important;
}

/* ── Content section background ─────────────────── */
body.dark-mode .content-section {
    background-color: #0f1117 !important;
}

/* ── bg-light global ─────────────────────────────── */
body.dark-mode .bg-light {
    background-color: #1e2030 !important;
    color: #e2e8f0 !important;
}

/* ── Badge warna (karya umum, e-book, dll) ───────── */
body.dark-mode .badge.bg-secondary {
    background-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .badge.bg-info {
    background-color: #1a4a6b !important;
    color: #7dd3fc !important;
}

body.dark-mode .badge.bg-warning {
    background-color: #4a3400 !important;
    color: #fcd34d !important;
}

/* ── Link teks dalam catalog ─────────────────────── */
body.dark-mode .catalog-card a.text-decoration-none,
body.dark-mode .catalog-card a {
    color: #a5b4fb !important;
}

body.dark-mode .catalog-card a:hover {
    color: #c7d2fe !important;
}

/* ── Tombol di dalam catalog card ───────────────── */
body.dark-mode .catalog-card .btn-outline-primary {
    border-color: #4c63d2 !important;
    color: #a5b4fb !important;
}

body.dark-mode .catalog-card .btn-outline-primary:hover {
    background-color: #4c63d2 !important;
    color: #ffffff !important;
}

body.dark-mode .catalog-card .btn-outline-secondary {
    border-color: #3d4568 !important;
    color: #94a3b8 !important;
}

/* ── No result / empty state ─────────────────────── */
body.dark-mode .text-center.py-5 p,
body.dark-mode .text-center.py-5 h5 {
    color: #94a3b8 !important;
}

/* ── Paginasi OPAC ───────────────────────────────── */
body.dark-mode nav[aria-label] .page-link {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
    color: #94a3b8 !important;
}

body.dark-mode nav[aria-label] .page-link:hover {
    background-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode nav[aria-label] .page-item.active .page-link {
    background-color: #4c63d2 !important;
    border-color: #4c63d2 !important;
    color: #ffffff !important;
}


/* =====================================================
   DARK MODE - HALAMAN LOGIN (blank layout)
   Kelas dari authlogin.php
   ===================================================== */

/* Login container tetap gradien tapi lebih gelap */
body.dark-mode .login-container {
    background: linear-gradient(135deg, #1a1f3a 0%, #2d1f4a 100%) !important;
}

/* Login card — ganti putih ke gelap */
body.dark-mode .login-card {
    background: rgba(30, 32, 48, 0.97) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .login-card h2,
body.dark-mode .login-card h3,
body.dark-mode .login-card h4,
body.dark-mode .login-card p,
body.dark-mode .login-card label,
body.dark-mode .login-card span:not(.badge) {
    color: #e2e8f0 !important;
}

body.dark-mode .login-card .text-muted {
    color: #94a3b8 !important;
}

/* Input dalam login card */
body.dark-mode .login-card input[type='text'],
body.dark-mode .login-card input[type='password'],
body.dark-mode .login-card input[type='email'],
body.dark-mode .login-card .form-control {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .login-card input::placeholder {
    color: #64748b !important;
}

body.dark-mode .login-card input:focus,
body.dark-mode .login-card .form-control:focus {
    background-color: #2d3149 !important;
    border-color: #5b72e0 !important;
    box-shadow: 0 0 0 0.2rem rgba(76, 99, 210, 0.3) !important;
    color: #e2e8f0 !important;
}

/* Link di halaman login */
body.dark-mode .login-card a {
    color: #a5b4fb !important;
}

body.dark-mode .login-card a:hover {
    color: #c7d2fe !important;
}

/* Alert error/success dalam login */
body.dark-mode .login-card .alert-danger {
    background-color: #3b0a0a !important;
    color: #fca5a5 !important;
    border-color: #4a0e0e !important;
}

body.dark-mode .login-card .alert-success {
    background-color: #0a2e1e !important;
    color: #6ee7b7 !important;
    border-color: #0e3b27 !important;
}


/* =====================================================
   DARK MODE - HALAMAN ADMIN (admin-management-page)
   Class dari User/Views/list.php dan halaman admin lain
   ===================================================== */

/* ── Page title / header halaman (app-page-title) ── */
body.dark-mode .app-page-title {
    background-color: #1a1c2e !important;
    border-bottom: 1px solid #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .app-page-title .page-title-heading,
body.dark-mode .app-page-title .page-title-subheading {
    color: #94a3b8 !important;
}

body.dark-mode .page-title-wrapper {
    color: #e2e8f0 !important;
}

/* Breadcrumb */
body.dark-mode .breadcrumb-item a {
    color: #7c8fd0 !important;
}

body.dark-mode .breadcrumb-item.active,
body.dark-mode .breadcrumb-item + .breadcrumb-item::before {
    color: #94a3b8 !important;
}

/* ── Admin Card (card utama konten) ──────────────── */
body.dark-mode .admin-card {
    background: #1e2030 !important;
    border-color: #2d3149 !important;
}

body.dark-mode .admin-card .card-header {
    background: #1e2030 !important;
    border-bottom-color: #2d3149 !important;
}

/* ── Admin Card Title ─────────────────────────────── */
body.dark-mode .admin-card-title {
    color: #e2e8f0 !important;
}

body.dark-mode .admin-card-title small {
    color: #94a3b8 !important;
}

/* ── Admin Role Bar (bar tab Semua/Admin/Kataloger) ─ */
body.dark-mode .admin-role-bar {
    background: #161828 !important;
    border-bottom-color: #2d3149 !important;
}

/* ── Admin Role Tabs (tombol tab filter) ─────────── */
body.dark-mode .admin-role-tab {
    background: #252840 !important;
    border-color: #3d4568 !important;
    color: #94a3b8 !important;
}

body.dark-mode .admin-role-tab:hover {
    background: #2d3149 !important;
    border-color: #4c63d2 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .admin-role-tab.active {
    background: #4c63d2 !important;
    border-color: #4c63d2 !important;
    color: #ffffff !important;
}

/* ── Admin Role Meta (badge info kanan) ──────────── */
body.dark-mode .admin-role-meta {
    background: #252840 !important;
    color: #94a3b8 !important;
}

/* ── Admin Table Wrapper ──────────────────────────── */
body.dark-mode .admin-table-wrapper {
    background: #1e2030 !important;
}

/* ── Admin Table ──────────────────────────────────── */
body.dark-mode .admin-table th {
    background: #161828 !important;
    color: #94a3b8 !important;
    border-bottom-color: #2d3149 !important;
}

body.dark-mode .admin-table td {
    background: transparent !important;
    border-bottom-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .admin-table tr:hover td {
    background: #252840 !important;
}

/* ── Admin Table Toolbar (search, length) ────────── */
body.dark-mode .admin-table-toolbar label {
    color: #94a3b8 !important;
}

body.dark-mode .admin-table-toolbar .dataTables_filter input,
body.dark-mode .admin-table-toolbar .dataTables_length select {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

/* ── Admin User Cell (nama & email user) ─────────── */
body.dark-mode .admin-user-name {
    color: #e2e8f0 !important;
}

body.dark-mode .admin-user-meta {
    color: #94a3b8 !important;
}

body.dark-mode .admin-user-avatar {
    background: #252840 !important;
    color: #7c8fd0 !important;
}

/* ── Admin Action Buttons (edit/delete) ──────────── */
body.dark-mode .admin-icon-action {
    background: #252840 !important;
    border-color: #3d4568 !important;
    color: #94a3b8 !important;
}

body.dark-mode .admin-action-edit:hover,
body.dark-mode .admin-action-edit:focus {
    background: #1d2a52 !important;
    border-color: #4c63d2 !important;
    color: #a5b4fb !important;
}

body.dark-mode .admin-action-delete:hover,
body.dark-mode .admin-action-delete:focus {
    background: #3b1515 !important;
    border-color: #dc3545 !important;
    color: #f87171 !important;
}

body.dark-mode .admin-action-locked:disabled {
    background: #1a1c2e !important;
    border-color: #2d3149 !important;
    color: #3d4568 !important;
}

/* ── Admin Role Option (radio cards) ─────────────── */
body.dark-mode .admin-role-option {
    background: #252840 !important;
    border-color: #3d4568 !important;
}

body.dark-mode .admin-role-option-title {
    color: #e2e8f0 !important;
}

body.dark-mode .admin-role-option small {
    color: #94a3b8 !important;
}

/* ── DataTables generic (shared across all admin pages) ── */
body.dark-mode table.dataTable thead th,
body.dark-mode table.dataTable thead td {
    background: #161828 !important;
    color: #94a3b8 !important;
    border-bottom-color: #2d3149 !important;
}

body.dark-mode table.dataTable tbody tr {
    background: #1e2030 !important;
    color: #e2e8f0 !important;
}

body.dark-mode table.dataTable tbody tr:nth-child(even) {
    background: #1a1c2e !important;
}

body.dark-mode table.dataTable tbody tr:hover {
    background: #252840 !important;
}

body.dark-mode table.dataTable tbody td {
    border-bottom-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

/* DataTables wrapper controls (search, length) */
body.dark-mode .dataTables_wrapper .dataTables_filter input {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
    border-radius: 8px;
}

body.dark-mode .dataTables_wrapper .dataTables_length select {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_info {
    color: #94a3b8 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #1e2030 !important;
    border-color: #2d3149 !important;
    color: #94a3b8 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #2d3149 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #4c63d2 !important;
    border-color: #4c63d2 !important;
    color: #ffffff !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    background: #1a1c2e !important;
    color: #3d4568 !important;
}

/* ── Generic Bootstrap cards di admin pages ──────── */
body.dark-mode .main-card,
body.dark-mode .card {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
}

body.dark-mode .card-header {
    background-color: #161828 !important;
    border-bottom-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .card-body {
    background-color: #1e2030 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .card-footer {
    background-color: #161828 !important;
    border-top-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

/* ── Input, select, textarea global admin ─────────── */
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode input[type="text"]:not(.custom-input),
body.dark-mode input[type="password"]:not(.custom-input),
body.dark-mode input[type="email"]:not(.custom-input),
body.dark-mode input[type="number"]:not(.custom-input),
body.dark-mode input[type="search"]:not(.custom-input),
body.dark-mode textarea,
body.dark-mode select:not(.custom-input) {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .form-control::placeholder,
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #64748b !important;
}

body.dark-mode .form-control:focus,
body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    background-color: #2d3149 !important;
    border-color: #5b72e0 !important;
    box-shadow: 0 0 0 0.2rem rgba(76, 99, 210, 0.25) !important;
    color: #e2e8f0 !important;
}

body.dark-mode select option {
    background-color: #1e2030 !important;
    color: #e2e8f0 !important;
}

/* ── Label & teks form ────────────────────────────── */
body.dark-mode label,
body.dark-mode .form-label {
    color: #cbd5e1 !important;
}

/* ── Table generic Bootstrap ─────────────────────── */
body.dark-mode .table {
    color: #e2e8f0 !important;
    border-color: #2d3149 !important;
}

body.dark-mode .table th,
body.dark-mode .table thead th {
    background-color: #161828 !important;
    color: #94a3b8 !important;
    border-color: #2d3149 !important;
}

body.dark-mode .table td {
    border-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255,255,255,0.02) !important;
}

body.dark-mode .table-hover tbody tr:hover {
    background-color: #252840 !important;
    color: #e2e8f0 !important;
}

/* ── Badge STATUS aktif/nonaktif ─────────────────── */
body.dark-mode .badge.bg-success,
body.dark-mode .badge-success,
body.dark-mode .badge.text-bg-success {
    background-color: #14532d !important;
    color: #86efac !important;
}

body.dark-mode .badge.bg-danger,
body.dark-mode .badge-danger {
    background-color: #4c0519 !important;
    color: #fca5a5 !important;
}

body.dark-mode .badge.bg-primary,
body.dark-mode .badge-primary {
    background-color: #1e3a8a !important;
    color: #93c5fd !important;
}



/* =====================================================
   DARK MODE - SWEETALERT2 MODAL
   Mencakup semua Swal.fire() di seluruh aplikasi
   ===================================================== */

body.dark-mode .swal2-popup {
    background: #1e2030 !important;
    color: #e2e8f0 !important;
    border: 1px solid #2d3149 !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
}

body.dark-mode .swal2-title {
    color: #e2e8f0 !important;
}

body.dark-mode .swal2-html-container,
body.dark-mode .swal2-content {
    color: #cbd5e1 !important;
}

body.dark-mode .swal2-html-container p,
body.dark-mode .swal2-html-container strong {
    color: #cbd5e1 !important;
}

/* ── Tombol konfirmasi (Backup ZIP) ──────────────── */
body.dark-mode .swal2-confirm {
    background: #4c63d2 !important;
    color: #ffffff !important;
    border: none !important;
}

body.dark-mode .swal2-confirm:hover {
    background: #3a51c0 !important;
}

/* ── Tombol deny (Ingatkan Besok) ────────────────── */
body.dark-mode .swal2-deny {
    background: #3b0a0a !important;
    color: #fca5a5 !important;
    border: 1px solid #7f1d1d !important;
}

body.dark-mode .swal2-deny:hover {
    background: #7f1d1d !important;
    color: #ffffff !important;
}

/* ── Tombol cancel (Tutup) ───────────────────────── */
body.dark-mode .swal2-cancel {
    background: #252840 !important;
    color: #94a3b8 !important;
    border: 1px solid #3d4568 !important;
}

body.dark-mode .swal2-cancel:hover {
    background: #2d3149 !important;
    color: #e2e8f0 !important;
}

/* ── Icon SweetAlert2 ────────────────────────────── */
body.dark-mode .swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

body.dark-mode .swal2-icon.swal2-success {
    border-color: #22c55e !important;
    color: #22c55e !important;
}

body.dark-mode .swal2-icon.swal2-info {
    border-color: #38bdf8 !important;
    color: #38bdf8 !important;
}

body.dark-mode .swal2-icon.swal2-error {
    border-color: #f87171 !important;
    color: #f87171 !important;
}

body.dark-mode .swal2-icon.swal2-question {
    border-color: #a78bfa !important;
    color: #a78bfa !important;
}

/* Icon animasi inner circle */
body.dark-mode .swal2-icon.swal2-warning .swal2-icon-content,
body.dark-mode .swal2-icon.swal2-info .swal2-icon-content {
    color: inherit !important;
}

/* ── Backdrop overlay ────────────────────────────── */
body.dark-mode .swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.7) !important;
}

/* ── Input di dalam Swal ─────────────────────────── */
body.dark-mode .swal2-input,
body.dark-mode .swal2-textarea,
body.dark-mode .swal2-select {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .swal2-input:focus,
body.dark-mode .swal2-textarea:focus {
    border-color: #5b72e0 !important;
    box-shadow: 0 0 0 3px rgba(76, 99, 210, 0.3) !important;
}

/* ── Footer text Swal ─────────────────────────────── */
body.dark-mode .swal2-footer {
    border-top-color: #2d3149 !important;
    color: #94a3b8 !important;
}

/* ── Close button (X) ────────────────────────────── */
body.dark-mode .swal2-close {
    color: #94a3b8 !important;
}

body.dark-mode .swal2-close:hover {
    color: #e2e8f0 !important;
}

/* ── SweetAlert2 v8 (sweetalert2@8.js) ──────────── */
body.dark-mode .swal-modal {
    background: #1e2030 !important;
    color: #e2e8f0 !important;
    border: 1px solid #2d3149 !important;
}

body.dark-mode .swal-title {
    color: #e2e8f0 !important;
}

body.dark-mode .swal-text {
    color: #cbd5e1 !important;
}

body.dark-mode .swal-button--confirm {
    background: #4c63d2 !important;
}

body.dark-mode .swal-button--cancel,
body.dark-mode .swal-button--danger {
    background: #3b0a0a !important;
    color: #fca5a5 !important;
}

body.dark-mode .swal-overlay {
    background: rgba(0, 0, 0, 0.7) !important;
}


/* ── SweetAlert2: selector tanpa body (untuk popup di luar body) ── */
.swal2-container.swal2-backdrop-show ~ * .swal2-popup,
.swal2-shown .swal2-popup {
    /* fallback sudah cukup dengan body.dark-mode di atas */
}

/* Tambahan: pastikan .swal2-popup dalam dark mode tertarget
   meski dirender di dalam .swal2-container */
body.dark-mode + .swal2-container .swal2-popup,
.swal2-container:has(.swal2-popup) .swal2-popup {
    /* handled by body.dark-mode .swal2-popup */
}

/* Paling aman: CSS variable override untuk SweetAlert2 dark */
body.dark-mode {
    --swal2-background: #1e2030;
    --swal2-title-color: #e2e8f0;
    --swal2-content-color: #cbd5e1;
    --swal2-border-radius: 16px;
}


/* ── .swal2-dark-popup: class langsung di popup element ── */
/* Ini lebih kuat karena langsung pada elemen popup */
.swal2-dark-popup {
    background: #1e2030 !important;
    color: #e2e8f0 !important;
    border: 1px solid #2d3149 !important;
}

.swal2-dark-popup .swal2-title {
    color: #e2e8f0 !important;
}

.swal2-dark-popup .swal2-html-container,
.swal2-dark-popup .swal2-content {
    color: #cbd5e1 !important;
}

.swal2-dark-popup .swal2-html-container p,
.swal2-dark-popup .swal2-html-container strong {
    color: #cbd5e1 !important;
}

.swal2-dark-popup .swal2-confirm {
    background: #4c63d2 !important;
    border: none !important;
}

.swal2-dark-popup .swal2-deny {
    background: #7f1d1d !important;
    border: none !important;
}

.swal2-dark-popup .swal2-cancel {
    background: #252840 !important;
    color: #94a3b8 !important;
    border: 1px solid #3d4568 !important;
}

.swal2-dark-popup .swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

.swal2-dark-popup .swal2-icon.swal2-warning .swal2-icon-content {
    color: #f59e0b !important;
}

.swal2-dark-popup .swal2-close {
    color: #94a3b8 !important;
}



/* =====================================================
   DARK MODE - BOOTSTRAP MODAL
   ===================================================== */

body.dark-mode .modal-content {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .modal-header {
    background-color: #161828 !important;
    border-bottom-color: #2d3149 !important;
}

body.dark-mode .modal-title {
    color: #e2e8f0 !important;
}

body.dark-mode .modal-body {
    background-color: #1e2030 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .modal-footer {
    background-color: #161828 !important;
    border-top-color: #2d3149 !important;
}

body.dark-mode .modal-header .btn-close,
body.dark-mode .modal-header .close {
    color: #94a3b8 !important;
    filter: invert(1) brightness(0.7) !important;
}

/* Teks dan label di dalam modal */
body.dark-mode .modal-body label,
body.dark-mode .modal-body p,
body.dark-mode .modal-body span:not(.badge),
body.dark-mode .modal-body h5,
body.dark-mode .modal-body h6 {
    color: #e2e8f0 !important;
}

body.dark-mode .modal-body .text-muted {
    color: #94a3b8 !important;
}

/* ── Jenis Input Cards dalam modal (Buku Baru/Buku Lama) ── */
body.dark-mode .modal-body .card,
body.dark-mode .modal-body [class*="option"],
body.dark-mode .modal-body [class*="choice"] {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

/* Active/selected card in modal */
body.dark-mode .modal-body .card.border-primary,
body.dark-mode .modal-body .card.active,
body.dark-mode .modal-body .card:has(input:checked) {
    border-color: #4c63d2 !important;
    background-color: #1d2a52 !important;
}

/* Input dalam modal */
body.dark-mode .modal-body .form-control,
body.dark-mode .modal-body .form-select,
body.dark-mode .modal-body select,
body.dark-mode .modal-body input {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .modal-body .form-control:focus,
body.dark-mode .modal-body select:focus {
    border-color: #5b72e0 !important;
    background-color: #2d3149 !important;
}


/* =====================================================
   DARK MODE - FORM SECTIONS / KARTU FORM ADMIN
   (Tambah Katalog, Tambah Anggota, dll)
   ===================================================== */

/* Kartu section form (putih dengan border) */
body.dark-mode .main-card > .card-body,
body.dark-mode .card.mb-3,
body.dark-mode .card.mb-4,
body.dark-mode .card.shadow,
body.dark-mode .card.shadow-sm {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
}

/* Section header dalam form (e.g., "DATA EKSEMPLAR", "DESKRIPSI FISIK") */
body.dark-mode .section-title,
body.dark-mode .form-section-title,
body.dark-mode [class*="section-header"],
body.dark-mode .widget-heading {
    color: #94a3b8 !important;
}

/* Label placeholder / floating labels */
body.dark-mode .form-floating label,
body.dark-mode .form-floating > label {
    color: #94a3b8 !important;
}

/* Readonly/disabled input (field yang berwarna terang) */
body.dark-mode input[readonly],
body.dark-mode input:read-only,
body.dark-mode textarea[readonly] {
    background-color: #1a1c2e !important;
    color: #94a3b8 !important;
    border-color: #2d3149 !important;
}

/* Select2 dropdown */
body.dark-mode .select2-container--default .select2-selection--single,
body.dark-mode .select2-container--default .select2-selection--multiple {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #e2e8f0 !important;
}

body.dark-mode .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #94a3b8 transparent transparent transparent !important;
}

body.dark-mode .select2-dropdown {
    background-color: #1e2030 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .select2-container--default .select2-results__option {
    color: #e2e8f0 !important;
    background-color: transparent !important;
}

body.dark-mode .select2-container--default .select2-results__option--highlighted[aria-selected],
body.dark-mode .select2-container--default .select2-results__option--highlighted[data-selected] {
    background-color: #4c63d2 !important;
    color: #ffffff !important;
}

body.dark-mode .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #2d3149 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

/* Input group addon */
body.dark-mode .input-group-text {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #94a3b8 !important;
}


/* =====================================================
   DARK MODE - DROPZONE UPLOAD AREA
   ===================================================== */

body.dark-mode .dropzone,
body.dark-mode [class*="dropzone"],
body.dark-mode .dz-default,
body.dark-mode .dz-message {
    background-color: #1a1c2e !important;
    border-color: #3d4568 !important;
    color: #94a3b8 !important;
}

body.dark-mode .dropzone:hover,
body.dark-mode .dropzone.dz-drag-hover {
    border-color: #4c63d2 !important;
    background-color: #1d2a52 !important;
}

body.dark-mode .dz-message span,
body.dark-mode .dz-message .dz-button {
    color: #94a3b8 !important;
}

/* Upload foto box (webcam capture area) */
body.dark-mode #webcam-container,
body.dark-mode .webcam-container,
body.dark-mode [id*="upload"] .border,
body.dark-mode .foto-box {
    background-color: #1a1c2e !important;
    border-color: #3d4568 !important;
}


/* =====================================================
   DARK MODE - NAV TABS & NAV PILLS
   (Anggota / Bukan Anggota / Rombongan, dll)
   ===================================================== */

body.dark-mode .nav-tabs {
    border-bottom-color: #2d3149 !important;
    background-color: transparent !important;
}

body.dark-mode .nav-tabs .nav-link {
    color: #94a3b8 !important;
    border-color: transparent !important;
    background-color: transparent !important;
}

body.dark-mode .nav-tabs .nav-link:hover {
    color: #e2e8f0 !important;
    border-color: #2d3149 !important;
    background-color: #252840 !important;
}

body.dark-mode .nav-tabs .nav-link.active,
body.dark-mode .nav-tabs .nav-item.show .nav-link {
    color: #a5b4fb !important;
    background-color: #1e2030 !important;
    border-color: #2d3149 #2d3149 #1e2030 !important;
}

/* Tab content area */
body.dark-mode .tab-content {
    background-color: #1e2030 !important;
    color: #e2e8f0 !important;
}

/* Nav Pills (Anggota/Bukan Anggota/Rombongan style rounded) */
body.dark-mode .nav-pills .nav-link {
    color: #94a3b8 !important;
    background-color: transparent !important;
}

body.dark-mode .nav-pills .nav-link:hover {
    color: #e2e8f0 !important;
    background-color: #252840 !important;
}

body.dark-mode .nav-pills .nav-link.active,
body.dark-mode .nav-pills .show > .nav-link {
    background-color: #4c63d2 !important;
    color: #ffffff !important;
}


/* =====================================================
   DARK MODE - HALAMAN BUKU TAMU & LAYANAN MANDIRI
   (layout OPAC tapi dengan content khusus)
   ===================================================== */

/* Outer page body (gray background di buku tamu) */
body.dark-mode {
    background-color: #0f1117 !important;
}

/* Main card container buku tamu */
body.dark-mode .buku-tamu-card,
body.dark-mode [class*="buku-tamu"],
body.dark-mode [class*="guest-book"] {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

/* Outer container dengan bg abu-abu */
body.dark-mode > div,
body.dark-mode .container-fluid,
body.dark-mode .page-wrapper,
body.dark-mode main {
    background-color: inherit !important;
}

/* Tab strip (Anggota / Bukan Anggota / Rombongan) bar */
body.dark-mode .tab-strip,
body.dark-mode [class*="tab-strip"],
body.dark-mode [class*="tab-bar"] {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
}

/* Bootstrap card yang tampil di halaman layanan mandiri */
body.dark-mode .card .card-body .nav {
    background-color: transparent !important;
}

/* Tombol pill/tab yang putih */
body.dark-mode .btn-group .btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning),
body.dark-mode .btn-outline-secondary {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #94a3b8 !important;
}

body.dark-mode .btn-group .btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):hover {
    background-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

/* Jenjang Pendidikan & Kelas select di form anggota */
body.dark-mode select.form-select,
body.dark-mode select.form-control {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 16px 12px !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding-right: 2.5rem !important;
}


/* =====================================================
   DARK MODE - HALAMAN BUKU TAMU (GuestBook)
   Class dari app/Modules/GuestBook/Views/add.php
   ===================================================== */

body.dark-mode .page-container {
    background: #0f1117 !important;
}

body.dark-mode .page-header {
    background: #1e2030 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4) !important;
    border-left: 5px solid #4c63d2 !important;
}

body.dark-mode .back-button,
body.dark-mode .location-button {
    background: #1a1c2e !important;
    color: #94a3b8 !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3) !important;
}

body.dark-mode .back-button:hover,
body.dark-mode .location-button:hover {
    background: #252840 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .active-location-label {
    color: #94a3b8 !important;
}

body.dark-mode .library-info h1 {
    color: #e2e8f0 !important;
}

body.dark-mode .library-location {
    color: #94a3b8 !important;
}

body.dark-mode .breadcrumb-custom {
    background: #1a1c2e !important;
}

body.dark-mode .breadcrumb-custom a {
    color: #7c8fd0 !important;
}

body.dark-mode .breadcrumb-custom .active {
    color: #e2e8f0 !important;
}

/* Nav Tabs Custom di Buku Tamu */
body.dark-mode .nav-tabs-custom {
    background: #1e2030 !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.4) !important;
}

body.dark-mode .nav-tabs-custom .nav-tab {
    color: #94a3b8 !important;
}

body.dark-mode .nav-tabs-custom .nav-tab:hover {
    background: #252840 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .nav-tabs-custom .nav-tab.active {
    background: #4c63d2 !important;
    color: #ffffff !important;
    border-color: #4c63d2 !important;
}

/* Search Section di Buku Tamu */
body.dark-mode .search-section {
    background: #1e2030 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4) !important;
}

body.dark-mode .search-title {
    color: #e2e8f0 !important;
}

body.dark-mode .search-subtitle {
    color: #94a3b8 !important;
}

body.dark-mode .search-input-group {
    background: #252840 !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4) !important;
}

body.dark-mode .search-input {
    background: transparent !important;
    color: #e2e8f0 !important;
}

body.dark-mode .search-input::placeholder {
    color: #64748b !important;
}

body.dark-mode .search-btn {
    background: #4c63d2 !important;
    color: #ffffff !important;
}

body.dark-mode .search-btn:hover {
    background: #3a51c0 !important;
}

/* Alerts di Buku Tamu */
body.dark-mode .alert-custom {
    box-shadow: 0 3px 10px rgba(0,0,0,0.3) !important;
}

body.dark-mode .alert-warning-custom {
    background: #4a3400 !important;
    color: #fcd34d !important;
    border-left-color: #d97706 !important;
}

body.dark-mode .alert-success-custom {
    background: #064e3b !important;
    color: #6ee7b7 !important;
    border-left-color: #059669 !important;
}

/* Info Box */
body.dark-mode .info-box {
    background: #1e2030 !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.4) !important;
    border-top: 4px solid #4c63d2 !important;
}

body.dark-mode .info-value {
    color: #e2e8f0 !important;
}

body.dark-mode .info-label {
    color: #94a3b8 !important;
}

/* Form Styles khusus di Buku Tamu */
body.dark-mode .form-card {
    background: #1e2030 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4) !important;
}

body.dark-mode .form-title {
    color: #e2e8f0 !important;
    border-bottom: 2px solid #2d3149 !important;
}

/* Tombol khusus Buku Tamu */
body.dark-mode .btn-custom-primary {
    background: #4c63d2 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(76, 99, 210, 0.3) !important;
}

body.dark-mode .btn-custom-primary:hover {
    background: #3a51c0 !important;
}

body.dark-mode .btn-custom-secondary {
    background: #252840 !important;
    color: #94a3b8 !important;
    border-color: #3d4568 !important;
}

body.dark-mode .btn-custom-secondary:hover {
    background: #2d3149 !important;
    color: #e2e8f0 !important;
}

/* =====================================================
   DARK MODE - HALAMAN LOKASI DAN SCAN BUKU TAMU
   ===================================================== */

/* Halaman Lokasi - Override inline style bg-white */
body.dark-mode .main-contact-area,
body.dark-mode .offer-area,
body.dark-mode .contact-info-area,
body.dark-mode .contact-wrap {
    background-color: #1e2030 !important;
    color: #e2e8f0 !important;
}

/* Panel Scan Cepat Anggota */
body.dark-mode .quick-scan-panel {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4) !important;
}

body.dark-mode .quick-scan-header h2 {
    color: #e2e8f0 !important;
}

body.dark-mode .quick-scan-header p {
    color: #94a3b8 !important;
}

body.dark-mode .quick-scan-actions button {
    background-color: #252840 !important;
    color: #94a3b8 !important;
    border-color: #3d4568 !important;
}

body.dark-mode .quick-scan-actions button:hover {
    background-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .quick-scan-actions button.primary {
    background-color: #4c63d2 !important;
    color: #ffffff !important;
    border-color: #4c63d2 !important;
}

body.dark-mode .quick-scan-actions button.primary:hover {
    background-color: #3a51c0 !important;
}

/* Hasil Scan & Kunjungan Terbaru */
body.dark-mode .scan-result {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
}

body.dark-mode .scan-photo {
    background-color: #1a1c2e !important;
    border-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .scan-result-title {
    color: #e2e8f0 !important;
}

body.dark-mode .scan-result-meta {
    color: #94a3b8 !important;
}

body.dark-mode .recent-visits {
    background-color: #1a1c2e !important;
    border-color: #2d3149 !important;
}

body.dark-mode .recent-visits h3 {
    color: #e2e8f0 !important;
}

body.dark-mode .recent-visits-list li {
    background-color: #252840 !important;
    border-bottom-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .recent-visits-list li.recent-empty {
    background-color: transparent !important;
    color: #94a3b8 !important;
}

body.dark-mode .recent-visits-list .recent-time {
    color: #94a3b8 !important;
}

/* Profil Anggota */
body.dark-mode .member-profile {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4) !important;
}

body.dark-mode .welcome-header h2 {
    color: #e2e8f0 !important;
}

body.dark-mode .member-number {
    background-color: #4c63d2 !important;
    color: #ffffff !important;
}

/* =====================================================
   DARK MODE - FORM SECTION (Buku Tamu Non Anggota / Rombongan)
   ===================================================== */
body.dark-mode .form-section {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4) !important;
}

body.dark-mode .form-title {
    color: #e2e8f0 !important;
}

body.dark-mode .form-subtitle {
    color: #94a3b8 !important;
}

body.dark-mode .form-group-title {
    color: #e2e8f0 !important;
    background-color: #1a1c2e !important;
    border-left: 4px solid #4c63d2 !important;
}

body.dark-mode .form-label {
    color: #cbd5e1 !important;
}

/* Bypass Inline Style (style="background-color: #ffffff;") secara brutal
   pada elemen <section> di Atur Lokasi */
body.dark-mode section[style*="background-color: #ffffff"],
body.dark-mode section[style*="background-color:#ffffff"],
body.dark-mode section[style*="background-color: rgb(255, 255, 255)"],
body.dark-mode div[style*="background-color: #ffffff"] {
    background-color: #0f1117 !important;
}

body.dark-mode .main-contact-area.offer-area {
    background-color: #0f1117 !important;
}

body.dark-mode .contact-wrap {
    background-color: #1e2030 !important;
    border: 1px solid #2d3149 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4) !important;
    border-radius: 12px;
}

/* =====================================================
   DARK MODE - JUDUL SECTION (Buku Tamu Rombongan)
   ===================================================== */
body.dark-mode .section-header {
    background-color: #252840 !important;
    border-left: 5px solid #4c63d2 !important;
    border-radius: 8px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3) !important;
}

body.dark-mode .section-header h3 {
    color: #e2e8f0 !important;
}

body.dark-mode .section-header i {
    color: #94a3b8 !important;
}

/* =====================================================
   DARK MODE - FORM KATALOG
   ===================================================== */

/* Area Keseluruhan Data Buku / Eksemplar */
body.dark-mode .catalog-collection-panel,
body.dark-mode .catalog-bibliographic-body,
body.dark-mode .card-body.catalog-bibliographic-body,
body.dark-mode .catalog-form-wrapper,
body.dark-mode .catalog-identification-panel,
body.dark-mode .catalog-material-bar,
body.dark-mode .catalog-opac-panel,
body.dark-mode .catalog-entry-target {
    background-color: #1e2030 !important;
    border-color: #2d3149 !important;
}

/* Panel Barcode dan Notifikasi */
body.dark-mode .catalog-existing-notice {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
}

body.dark-mode .catalog-existing-notice strong {
    color: #e2e8f0 !important;
}

body.dark-mode .catalog-existing-notice span {
    color: #94a3b8 !important;
}

/* Header Section (Misal: "Data Eksemplar", "Data Buku", "Identifikasi Buku") */
body.dark-mode .catalog-section-heading,
body.dark-mode .catalog-data-heading {
    background-color: transparent !important;
    border-bottom: 2px solid #2d3149 !important;
}

body.dark-mode .catalog-section-heading h5,
body.dark-mode .catalog-data-heading h5 {
    color: #e2e8f0 !important;
}

/* Panel Barcode dan Rak */
body.dark-mode .catalog-rack-editor {
    background-color: #252840 !important;
    border: 1px solid #3d4568 !important;
}

body.dark-mode .catalog-rack-editor-heading {
    color: #e2e8f0 !important;
}

/* Form Section di dalam Tabel / Grid Data Buku (Misal: JUDUL BUKU, PENGARANG) */
body.dark-mode .catalog-form-section {
    background-color: #1a1c2e !important;
    border: 1px solid #2d3149 !important;
}

body.dark-mode .catalog-form-section-header {
    background-color: #252840 !important;
    border-bottom: 1px solid #3d4568 !important;
}

body.dark-mode .custom-title-wrap,
body.dark-mode .custom-title {
    color: #e2e8f0 !important;
    background-color: transparent !important;
}

/* Dropzone / Image Upload Khusus Cover Katalog */
body.dark-mode .catalog-cover-upload-area,
body.dark-mode .cover-preview-container,
body.dark-mode .catalog-cover-placeholder {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
}

body.dark-mode .catalog-cover-placeholder {
    color: #94a3b8 !important;
}

body.dark-mode .catalog-cover-upload-area:hover {
    background-color: #2d3149 !important;
}

/* Badge/Label Wajib Diisi */
body.dark-mode .badge-light {
    background-color: #252840 !important;
    color: #94a3b8 !important;
    border-color: #3d4568 !important;
}

/* =====================================================
   DARK MODE - FINAL AUDIT OVERRIDES
   Menutup komponen custom yang tidak memakai class Bootstrap standar.
   ===================================================== */

html.dark-mode-pending,
html.dark-mode-pending body {
    background-color: #0f1117 !important;
    color: #e2e8f0 !important;
    color-scheme: dark;
}

body.dark-mode .app-container,
body.dark-mode .app-main,
body.dark-mode .app-main__outer,
body.dark-mode .app-main__inner,
body.dark-mode .content-wrapper,
body.dark-mode .app-theme-white,
body.dark-mode .body-tabs-shadow {
    background-color: #0f1117 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .text-muted,
body.dark-mode small.text-muted,
body.dark-mode .form-text,
body.dark-mode .page-title-subheading,
body.dark-mode .help-block,
body.dark-mode .small {
    color: #94a3b8 !important;
}

body.dark-mode .text-secondary,
body.dark-mode .text-black-50 {
    color: #94a3b8 !important;
}

body.dark-mode .page-title-heading,
body.dark-mode .page-title-heading > div,
body.dark-mode .page-title-actions {
    color: #e2e8f0 !important;
}

body.dark-mode .page-title-icon,
body.dark-mode .page-title-icon > i {
    background: #252840 !important;
    color: #a5b4fc !important;
    border-color: #3d4568 !important;
}

body.dark-mode .main-card,
body.dark-mode .main-card.card,
body.dark-mode .main-card > .card-header,
body.dark-mode .main-card > .card-body {
    border-color: #2d3149 !important;
}

body.dark-mode .btn:disabled,
body.dark-mode .btn.disabled,
body.dark-mode button:disabled,
body.dark-mode .form-control:disabled,
body.dark-mode select:disabled,
body.dark-mode input:disabled,
body.dark-mode textarea:disabled {
    background-color: #1a1c2e !important;
    border-color: #2d3149 !important;
    color: #64748b !important;
    opacity: 1 !important;
}

body.dark-mode input[type="checkbox"],
body.dark-mode input[type="radio"] {
    accent-color: #5b72e0;
}

body.dark-mode input[type="file"]::file-selector-button {
    background-color: #252840 !important;
    color: #e2e8f0 !important;
    border-color: #3d4568 !important;
}

/* Backup Data */
body.dark-mode .backup-summary,
body.dark-mode .backup-status-grid {
    color: #e2e8f0 !important;
}

body.dark-mode .backup-stat,
body.dark-mode .backup-action,
body.dark-mode .backup-status-panel,
body.dark-mode .backup-email-chip,
body.dark-mode .backup-email-empty,
body.dark-mode .backup-note {
    background-color: #1a1c2e !important;
    border-color: #2d3149 !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
}

body.dark-mode .backup-stat small,
body.dark-mode .backup-action p,
body.dark-mode .backup-status-list dt,
body.dark-mode .backup-toggle span,
body.dark-mode .backup-email-empty,
body.dark-mode .backup-email-feedback {
    color: #94a3b8 !important;
}

body.dark-mode .backup-stat strong,
body.dark-mode .backup-action h5,
body.dark-mode .backup-status-list dd,
body.dark-mode .backup-toggle strong,
body.dark-mode .backup-email-chip span {
    color: #e2e8f0 !important;
}

body.dark-mode .backup-toggle {
    background-color: #1a1c2e !important;
    border-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .backup-toggle:hover,
body.dark-mode .backup-email-chip:hover {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
}

body.dark-mode .backup-status-badge.safe {
    background-color: #052e1a !important;
    color: #86efac !important;
}

body.dark-mode .backup-status-badge.soon {
    background-color: #3b2f00 !important;
    color: #fcd34d !important;
}

body.dark-mode .backup-status-badge.due,
body.dark-mode .backup-status-badge.none,
body.dark-mode .backup-status-badge.overdue {
    background-color: #3b0a0a !important;
    color: #fca5a5 !important;
}

body.dark-mode .backup-badge {
    background-color: #1d2a52 !important;
    color: #bfdbfe !important;
}

body.dark-mode .backup-note {
    border-left-color: #38bdf8 !important;
}

/* Tambah Katalog dan panel form katalog */
body.dark-mode .catalog-generated-barcode,
body.dark-mode .catalog-autofill-panel,
body.dark-mode .catalog-cover-panel,
body.dark-mode .catalog-cover-placeholder,
body.dark-mode .catalog-scanner-thumbnail,
body.dark-mode .catalog-opac-slider,
body.dark-mode .catalog-entry-result {
    background-color: #1a1c2e !important;
    border-color: #2d3149 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .catalog-cover-panel-title strong,
body.dark-mode .catalog-entry-destination,
body.dark-mode .catalog-opac-title,
body.dark-mode .catalog-generated-barcode strong,
body.dark-mode .catalog-rack-editor-heading strong {
    color: #e2e8f0 !important;
}

body.dark-mode .catalog-entry-eyebrow,
body.dark-mode .catalog-section-heading span,
body.dark-mode .catalog-cover-panel-title span,
body.dark-mode .catalog-cover-option,
body.dark-mode .catalog-autofill-status,
body.dark-mode .catalog-generated-barcode span,
body.dark-mode .catalog-opac-help,
body.dark-mode .catalog-opac-state,
body.dark-mode .catalog-rack-editor-heading span,
body.dark-mode .catalog-field-status,
body.dark-mode .catalog-mobile-camera-url {
    color: #94a3b8 !important;
}

body.dark-mode .catalog-generated-barcode > i,
body.dark-mode .catalog-rack-editor-heading > i {
    color: #93c5fd !important;
}

body.dark-mode .catalog-form-section .form-radio,
body.dark-mode .form-radio {
    background-color: #252840 !important;
    border-color: #3d4568 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .catalog-mobile-camera-qr img {
    background-color: #f8fafc !important;
    border-color: #3d4568 !important;
}

body.dark-mode .catalog-autofill-cover {
    background-color: #111827 !important;
    border-color: #2d3149 !important;
}

body.dark-mode .catalog-scanner-gallery {
    scrollbar-color: #3d4568 #111827;
}

body.dark-mode .catalog-opac-switch input:checked + .catalog-opac-slider {
    background-color: #198754 !important;
}

body.dark-mode .catalog-opac-switch input:checked ~ .catalog-opac-state {
    color: #86efac !important;
}

body.dark-mode .catalog-opac-slider::before {
    background-color: #e2e8f0 !important;
}

/* Select2 state yang sering tetap terang */
body.dark-mode .select2-container--default .select2-selection__placeholder,
body.dark-mode .select2-container--bootstrap4 .select2-selection__placeholder {
    color: #94a3b8 !important;
}

body.dark-mode .select2-container--default .select2-results__option[aria-selected="true"],
body.dark-mode .select2-container--default .select2-results__option[data-selected="true"] {
    background-color: #252840 !important;
    color: #e2e8f0 !important;
}

/* Inline style dan panel putih umum di modul lama */
body.dark-mode .bg-white,
body.dark-mode .bg-light,
body.dark-mode [style*="background: #fff"],
body.dark-mode [style*="background:#fff"],
body.dark-mode [style*="background: white"],
body.dark-mode [style*="background:white"],
body.dark-mode [style*="background-color: #fff"],
body.dark-mode [style*="background-color:#fff"],
body.dark-mode [style*="background-color: white"],
body.dark-mode [style*="background-color:white"] {
    background-color: #1e2030 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .swal2-success-circular-line-left,
body.dark-mode .swal2-success-circular-line-right,
body.dark-mode .swal2-success-fix {
    background-color: #1e2030 !important;
}
