/* Custom styling for Modern Admin Template */
:root {
  --sidebar-width: 260px;
  --primary-color: #059669;
  --primary-hover: #047857;
  --secondary-color: #10b981;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --bs-primary: #059669;
  --bs-primary-rgb: 5, 150, 105;
}

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: #334155;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: #059669;
  transition: color 0.15s ease-in-out;
}
a:hover {
  color: #047857;
}

/* ==================================================== */
/* OVERRIDE TEMA HIJAU EMERALD (PENGGANTI WARNA BIRU)   */
/* ==================================================== */

.btn-primary {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  border-color: #047857 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
  transition: all 0.2s ease-in-out;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
  border-color: #065f46 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35) !important;
}

.btn-outline-primary {
  color: #059669 !important;
  border-color: #059669 !important;
  background-color: transparent !important;
  transition: all 0.2s ease-in-out;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.text-primary,
a.text-primary {
  color: #059669 !important;
}

.form-control:focus,
.form-select:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25) !important;
}

.form-check-input:checked {
  background-color: #059669 !important;
  border-color: #059669 !important;
}

.form-check-input:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25) !important;
}

.badge.bg-primary {
  background-color: #059669 !important;
  color: #ffffff !important;
}

.badge.bg-primary-subtle {
  background-color: #d1fae5 !important;
  color: #065f46 !important;
  border-color: #a7f3d0 !important;
}

.pagination .page-item.active .page-link {
  background-color: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
}

.pagination .page-link {
  color: #059669;
}
.pagination .page-link:hover {
  color: #047857;
}

/* Sidebar (Warna Dasar Hijau Modern - Emerald / Forest Green) */
#sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  z-index: 996;
  transition: all 0.3s;
  padding: 18px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #198754 #064e3b;
  box-shadow: 2px 0 20px rgba(6, 78, 59, 0.25);
  background: linear-gradient(180deg, #064e3b 0%, #04382a 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-nav {
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav li {
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav .nav-item {
  margin-bottom: 5px;
}

.sidebar-nav .nav-heading {
  font-size: 11px;
  text-transform: uppercase;
  color: #86efac;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin: 16px 0 6px 12px;
  opacity: 0.9;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  transition: all 0.25s ease;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.sidebar-nav .nav-link i {
  font-size: 17px;
  margin-right: 10px;
  color: #ffffff;
}

.sidebar-nav .nav-link.collapsed {
  color: #d1fae5;
  background: transparent;
  box-shadow: none;
}

.sidebar-nav .nav-link.collapsed i {
  color: #6ee7b7;
}

.sidebar-nav .nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-nav .nav-link:hover i {
  color: #a7f3d0;
}

/* Sidebar Nav Submenu Collapsible (Muncul ke bawah) */
.sidebar-nav .nav-link .bi-chevron-down {
  margin-right: 0;
  transition: transform 0.25s ease-in-out;
  font-size: 12px;
  color: #6ee7b7;
}

.sidebar-nav .nav-link:not(.collapsed) .bi-chevron-down {
  transform: rotate(180deg);
  color: #ffffff;
}

.sidebar-nav .nav-content {
  padding: 6px 0;
  margin: 4px 0 6px 0;
  list-style: none;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 8px;
}

.sidebar-nav .nav-content a {
  display: flex;
  align-items: center;
  font-size: 13.5px;
  font-weight: 500;
  color: #a7f3d0;
  transition: all 0.2s ease;
  padding: 7px 10px 7px 32px;
  border-radius: 6px;
  margin: 1px 6px;
}

.sidebar-nav .nav-content a i {
  font-size: 6px;
  margin-right: 10px;
  line-height: 0;
  border-radius: 50%;
  color: #6ee7b7;
  transition: all 0.2s ease;
}

.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.35);
}

.sidebar-nav .nav-content a.active {
  background: #059669;
  font-weight: 700;
}

.sidebar-nav .nav-content a:hover i,
.sidebar-nav .nav-content a.active i {
  background-color: #ffffff;
  color: #ffffff;
}

/* Header */
.header {
  transition: all 0.5s;
  z-index: 997;
  height: 60px;
  box-shadow: 0px 2px 20px rgba(1, 41, 112, 0.1);
  background-color: #fff;
  padding-left: 20px;
  padding-right: 20px;
}

.header .logo {
  line-height: 1;
}

.header .logo span {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
}

/* Main */
#main {
  margin-top: 60px;
  padding: 20px 24px;
  transition: all 0.3s;
  margin-left: var(--sidebar-width);
  overflow-x: hidden;
}

/* Toggle Sidebar Button */
.toggle-sidebar-btn {
  border: none;
  background: #f1f4fb;
  color: var(--primary-color);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 22px;
}

.toggle-sidebar-btn:hover {
  background: #e4eaf9;
  color: #2b3eb5;
}

@media (max-width: 1199px) {
  /* Tampilan TABLET & HP */
  #sidebar {
    left: -290px;
    width: 270px;
    box-shadow: 4px 0 24px rgba(1, 41, 112, 0.15);
    border-radius: 0 16px 16px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  #main {
    margin-left: 0;
    padding: 20px;
  }
  body.toggle-sidebar #sidebar {
    left: 0;
  }
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(1, 41, 112, 0.35);
    z-index: 995;
    display: none;
    backdrop-filter: blur(3px);
    transition: opacity 0.3s ease;
  }
  body.toggle-sidebar .sidebar-overlay {
    display: block;
  }
}

/* Khusus Tampilan HP (< 768px) */
@media (max-width: 767.98px) {
  #main {
    padding: 12px;
  }
  .header {
    padding-left: 10px;
    padding-right: 10px;
  }
  .card {
    margin-bottom: 14px;
    border-radius: 10px;
  }
  .card-body {
    padding: 14px;
  }
  .pagetitle h1 {
    font-size: 1.2rem;
  }
  
  /* Tombol Aksi di Header Halaman untuk HP */
  .page-header-actions {
    display: flex;
    width: 100%;
    gap: 8px;
    margin-top: 10px;
  }
  .page-header-actions .btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    font-size: 13.5px;
  }

  /* Tombol Form di HP: Tertata Vertikal Rapi, Berjarak, Tidak Menempel */
  .form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
  }
  .form-actions .btn {
    width: 100%;
    padding: 11px 16px;
    font-weight: 600;
  }
}

/* Tampilan PC & TABLET (>= 768px) */
@media (min-width: 768px) {
  /* Tombol Aksi di Header Halaman untuk PC/Tablet: Selalu Rapi di Kanan Layar */
  .pagetitle {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .page-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
  }
  
  /* Tombol Form di PC/Tablet: Berjejer Horizontal dengan Jarak Lega */
  .form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #edf2f9;
  }
  .form-actions .btn {
    padding: 9px 24px;
    font-weight: 500;
  }
}

/* Responsive Table with Smooth Touch Slide */
.table-responsive {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
  border-radius: 8px;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #c2c9d6 #f8f9fa;
}

.table-responsive table {
  min-width: 720px; /* Menjamin kolom tabel tetap lega, rapi, dan wajib di-slide dengan mulus */
  margin-bottom: 0;
}

.table-responsive th,
.table-responsive td {
  white-space: nowrap; /* Mencegah teks tertekuk bertumpuk */
  padding: 12px 14px;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}
.table-responsive::-webkit-scrollbar-track {
  background: #f1f3f8;
  border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: #c2c9d6;
  border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #899bbd;
}

/* Cards & Components */
.card {
  margin-bottom: 30px;
  border: none;
  border-radius: 8px;
  box-shadow: 0px 0 30px rgba(1, 41, 112, 0.08);
}

.card-title {
  padding: 20px 0 15px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
}

.card-title span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
}

.stat-card-icon {
  width: 54px;
  height: 54px;
  background: #f6f6fe;
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-card-icon.revenue {
  background: #e0f8e9;
  color: #2eca6a;
}

.stat-card-icon.customers {
  background: #ffecdf;
  color: #ff771d;
}

/* Footer */
.footer {
  padding: 20px 0;
  font-size: 14px;
  transition: all 0.3s;
  border-top: 1px solid #cddfff;
  background: #fff;
  margin-left: var(--sidebar-width);
}

@media (max-width: 1199px) {
  .footer {
    margin-left: 0;
  }
}

/* ==================================================== */
/* OPTIMASI TOMBOL EKSEKUSI & TAMPILAN RESPONSIVE HP/WEB */
/* ==================================================== */

.pagetitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tab Navigasi Terpadu (Satu Halaman: List + Form) */
.nav-tabs-custom {
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 1px;
}
.nav-tabs-custom::-webkit-scrollbar {
  display: none;
}

.nav-tabs-custom .nav-link {
  border: 1px solid transparent;
  color: #64748b;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 18px;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s ease-in-out;
  background: #f8fafc;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.nav-tabs-custom .nav-link:hover {
  color: var(--primary-color, #4154f1);
  background: #eef2ff;
}

.nav-tabs-custom .nav-link.active {
  color: var(--primary-color, #4154f1);
  background: #ffffff;
  border-color: #e2e8f0 #e2e8f0 #ffffff;
  border-bottom: 3px solid var(--primary-color, #4154f1);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.03);
}

/* Nav Pills Filter Horisontal Responsif */
.nav-pills-scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 6px;
}
.nav-pills-scroll::-webkit-scrollbar {
  display: none;
}
.nav-pills-scroll .nav-link {
  white-space: nowrap;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 20px;
}

/* Tombol Aksi di Kolom Tabel */
.table td.table-action-cell,
.table th.table-action-cell {
  white-space: nowrap !important;
  text-align: center !important;
  vertical-align: middle !important;
  padding: 8px 12px !important;
}

.table-action-btns {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.table-action-btns .btn,
.btn-group-sm > .btn {
  padding: 5px 9px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.2 !important;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.table-action-btns .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Bar Tombol Aksi Formulir (Desktop) */
.form-actions-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 24px;
}

.form-actions-bar .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 6px;
}

/* Card Header Section Form */
.section-form-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Responsif Mobile (HP) */
@media (max-width: 767.98px) {
  .pagetitle {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
  }

  .pagetitle > div:first-child {
    width: 100% !important;
  }

  .page-header-actions {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
    width: 100% !important;
    gap: 8px !important;
    margin-top: 2px !important;
  }

  .page-header-actions .btn {
    width: 100% !important;
    padding: 9px 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-radius: 8px !important;
  }

  .nav-tabs-custom .nav-link {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .form-actions-bar {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 10px !important;
    width: 100% !important;
    margin-top: 20px !important;
  }

  .form-actions-bar .btn {
    width: 100% !important;
    min-height: 44px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
  }

  .modal-footer {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
  }

  .modal-footer .btn {
    width: 100% !important;
    margin: 0 !important;
    min-height: 42px !important;
  }
}

/* ==================================================== */
/* FITUR TEMA TERANG / GELAP (DARK / LIGHT THEME TOGGLE)*/
/* ==================================================== */

.theme-toggle-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
  transition: all 0.25s ease;
}

.theme-toggle-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(15deg);
}

/* ==================================================== */
/* FITUR TEMA GELAP MENYELURUH (COMPREHENSIVE DARK MODE)*/
/* ==================================================== */

body.dark-mode {
  background-color: #0b1120 !important;
  color: #cbd5e1 !important;
}

body.dark-mode #main {
  background-color: #0b1120 !important;
}

body.dark-mode .header {
  background-color: #0f172a !important;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4) !important;
  border-bottom: 1px solid #1e293b !important;
}

body.dark-mode .header .logo span {
  color: #f1f5f9 !important;
}

body.dark-mode .toggle-sidebar-btn {
  background: #1e293b !important;
  color: #34d399 !important;
}

body.dark-mode .theme-toggle-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #fbbf24 !important;
}

body.dark-mode #btnNotifDropdown {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

body.dark-mode #btnNotifDropdown #notifBellIcon {
  color: #94a3b8 !important;
}

/* Seluruh Kartu & Container Form di Dark Mode */
body.dark-mode .card,
body.dark-mode .section-form-card,
body.dark-mode .card-body,
body.dark-mode .card-header,
body.dark-mode .card-footer {
  background-color: #111827 !important;
  border-color: #1f2937 !important;
  color: #e2e8f0 !important;
}

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

body.dark-mode .card-title,
body.dark-mode .pagetitle h1 {
  color: #f9fafb !important;
}

body.dark-mode .footer {
  background-color: #0f172a !important;
  border-top-color: #1e293b !important;
  color: #94a3b8 !important;
}

/* Seluruh Elemen Putih (.bg-white, .bg-light, dsb.) di Dark Mode */
body.dark-mode .bg-white,
body.dark-mode .bg-light,
body.dark-mode .bg-light-subtle {
  background-color: #111827 !important;
  color: #e2e8f0 !important;
  border-color: #1f2937 !important;
}

body.dark-mode .border {
  border-color: #1f2937 !important;
}

body.dark-mode .border-top {
  border-top-color: #1f2937 !important;
}
body.dark-mode .border-bottom {
  border-bottom-color: #1f2937 !important;
}
body.dark-mode .border-start {
  border-start-color: #1f2937 !important;
}
body.dark-mode .border-end {
  border-end-color: #1f2937 !important;
}

body.dark-mode hr {
  border-color: #1f2937 !important;
  opacity: 0.6;
}

/* Modal Dialog di Dark Mode */
body.dark-mode .modal-content,
body.dark-mode .modal-header,
body.dark-mode .modal-body,
body.dark-mode .modal-footer {
  background-color: #111827 !important;
  border-color: #1f2937 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Tabel di Dark Mode (Menghilangkan Background Putih Default Bootstrap) */
body.dark-mode .table {
  --bs-table-bg: transparent !important;
  --bs-table-accent-bg: transparent !important;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03) !important;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.05) !important;
  color: #cbd5e1 !important;
  border-color: #1f2937 !important;
}

body.dark-mode .table > :not(caption) > * > * {
  background-color: transparent !important;
  border-color: #1f2937 !important;
  color: #cbd5e1 !important;
  box-shadow: none !important;
}

body.dark-mode .table thead th,
body.dark-mode .table-light,
body.dark-mode .table-light th,
body.dark-mode .table-light td {
  background-color: #162032 !important;
  color: #f1f5f9 !important;
  border-color: #1f2937 !important;
}

body.dark-mode .table-hover tbody tr:hover > * {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

/* Input & Form Control di Dark Mode */
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .input-group-text {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
  background-color: #0f172a !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25) !important;
  color: #ffffff !important;
}

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

body.dark-mode .form-control:disabled,
body.dark-mode .form-control[readonly] {
  background-color: #162032 !important;
  color: #94a3b8 !important;
  border-color: #1f2937 !important;
}

body.dark-mode select option {
  background-color: #111827 !important;
  color: #f1f5f9 !important;
}

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

/* Dropdown Menu di Dark Mode */
body.dark-mode .dropdown-menu {
  background-color: #111827 !important;
  border: 1px solid #1f2937 !important;
  color: #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

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

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

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

/* Nav Tabs di Dark Mode */
body.dark-mode .nav-tabs-custom {
  border-color: #1f2937 !important;
}

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

body.dark-mode .nav-tabs-custom .nav-link.active {
  background: #111827 !important;
  color: #34d399 !important;
  border-color: #1f2937 #1f2937 #111827 !important;
  border-bottom: 3px solid #10b981 !important;
}

/* Pagination di Dark Mode */
body.dark-mode .pagination .page-link {
  background-color: #111827 !important;
  border-color: #1f2937 !important;
  color: #cbd5e1 !important;
}

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

body.dark-mode .pagination .page-item.disabled .page-link {
  background-color: #0b1120 !important;
  color: #475569 !important;
}

/* Badge di Dark Mode */
body.dark-mode .badge.bg-light,
body.dark-mode .badge.bg-white {
  background-color: #1f2937 !important;
  color: #cbd5e1 !important;
  border-color: #374151 !important;
}

body.dark-mode .badge.bg-primary-subtle {
  background-color: rgba(5, 150, 105, 0.25) !important;
  color: #6ee7b7 !important;
  border-color: #047857 !important;
}

body.dark-mode .badge.bg-info-subtle {
  background-color: rgba(14, 165, 233, 0.25) !important;
  color: #7dd3fc !important;
  border-color: #0284c7 !important;
}

body.dark-mode .badge.bg-warning-subtle {
  background-color: rgba(234, 179, 8, 0.2) !important;
  color: #fde047 !important;
  border-color: #ca8a04 !important;
}

body.dark-mode .badge.bg-success-subtle {
  background-color: rgba(16, 185, 129, 0.2) !important;
  color: #86efac !important;
  border-color: #059669 !important;
}

/* Tipografi di Dark Mode */
body.dark-mode .text-dark {
  color: #f1f5f9 !important;
}

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

body.dark-mode .text-primary {
  color: #34d399 !important;
}

/* SweetAlert2 di Dark Mode */
body.dark-mode .swal2-popup {
  background: #111827 !important;
  color: #e2e8f0 !important;
  border: 1px solid #1f2937 !important;
}

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

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

/* Section Card Header (Form Survey & Proyek) */
body.dark-mode .section-card-header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  border-bottom: 2px solid #1f2937 !important;
  color: #f1f5f9 !important;
}

body.dark-mode .section-card-header span,
body.dark-mode .section-card-header h5,
body.dark-mode .section-card-header h6 {
  color: #f1f5f9 !important;
}

body.dark-mode .section-card-header i {
  color: #34d399 !important;
}

/* Area Upload & Dropzone Foto di Dark Mode */
body.dark-mode .photo-box,
body.dark-mode .photo-dropzone,
body.dark-mode #preview_container,
body.dark-mode #preview_wrapper,
body.dark-mode .photo-upload-box {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .photo-upload-box:hover {
  background-color: #162032 !important;
  border-color: #10b981 !important;
}

body.dark-mode .photo-upload-box .upload-placeholder i {
  color: #34d399 !important;
}

body.dark-mode .photo-upload-box .upload-placeholder span,
body.dark-mode .photo-upload-box .upload-placeholder .text-muted {
  color: #94a3b8 !important;
}

/* Profile Stats Box & Tabs */
body.dark-mode .profile-stats-box {
  background: #0f172a !important;
  border-color: #1f2937 !important;
}

body.dark-mode .profile-stats-num {
  color: #34d399 !important;
}

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

body.dark-mode .nav-tabs-bordered {
  border-bottom-color: #1f2937 !important;
}

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

body.dark-mode .nav-tabs-bordered .nav-link:hover,
body.dark-mode .nav-tabs-bordered .nav-link:focus {
  color: #34d399 !important;
}

body.dark-mode .nav-tabs-bordered .nav-link.active {
  color: #34d399 !important;
  border-bottom: 2.5px solid #10b981 !important;
}

/* ==================================================== */
/* NOTIFIKASI DROPDOWN & DYNAMIC READ/UNREAD STYLING    */
/* ==================================================== */

.notif-dropdown-menu {
  width: 380px;
  max-width: 92vw;
  border-radius: 14px;
}

.notif-header-box {
  background: #f8fafc;
}

body.dark-mode .notif-header-box {
  background: #0f172a !important;
  border-color: #1f2937 !important;
}

.notif-footer-box {
  background: #f8fafc;
}

body.dark-mode .notif-footer-box {
  background: #0f172a !important;
  border-color: #1f2937 !important;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.notif-item:hover {
  background: #f0fdf4;
  text-decoration: none;
  color: inherit;
}

.notif-item.notif-read {
  opacity: 0.65;
  background: transparent;
}

.notif-item.notif-read:hover {
  opacity: 0.95;
  background: #f8fafc;
}

body.dark-mode .notif-item {
  border-bottom: 1px solid #1f2937 !important;
  color: #cbd5e1 !important;
}

body.dark-mode .notif-item:hover {
  background: #162032 !important;
}

body.dark-mode .notif-item.notif-read:hover {
  background: #131c2c !important;
}

.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
  margin-top: 5px;
}

.notif-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.notif-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
}

body.dark-mode .notif-title {
  color: #f1f5f9 !important;
}

.notif-message {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
  margin-bottom: 4px;
}

body.dark-mode .notif-message {
  color: #94a3b8 !important;
}

.notif-time {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

body.dark-mode .notif-time {
  color: #64748b !important;
}

/* Sembunyikan Tombol Segarkan / Refresh pada Layar Ponsel (Mobile < 576px) */
@media (max-width: 575.98px) {
  #btnRefreshHeader,
  #btnRefresh,
  .btn-refresh-header,
  .page-header-actions button[title*="Muat Ulang"],
  .page-header-actions button:has(.bi-arrow-clockwise) {
    display: none !important;
  }
}

/* ==================================================== */
/* EXECUTIVE DASHBOARD & HIGH-CONTRAST PANEL STYLES     */
/* ==================================================== */

.exec-header-banner {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
  border-radius: 0.85rem;
  color: #ffffff;
  padding: 1.15rem 1.5rem;
  box-shadow: 0 8px 20px -4px rgba(6, 78, 59, 0.25);
  position: relative;
  overflow: hidden;
}

.exec-header-banner::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.badge-banner-glass {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
}

/* ==================================================== */
/* HIGH-CONTRAST BADGES (LIGHT & DARK MODE COMPATIBLE)  */
/* ==================================================== */

.badge.bg-success-subtle,
.badge-soft-emerald {
  background-color: #dcfce7 !important;
  color: #166534 !important;
  border: 1px solid #86efac !important;
  font-weight: 600 !important;
}

.badge.bg-primary-subtle,
.badge-soft-blue {
  background-color: #dbeafe !important;
  color: #1e40af !important;
  border: 1px solid #93c5fd !important;
  font-weight: 600 !important;
}

.badge.bg-warning-subtle,
.badge-soft-amber {
  background-color: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fcd34d !important;
  font-weight: 600 !important;
}

.badge.bg-secondary-subtle,
.badge-soft-secondary {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
}

.badge.bg-info-subtle,
.badge-soft-cyan {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid #7dd3fc !important;
  font-weight: 600 !important;
}

.badge.bg-purple-subtle,
.badge-soft-purple {
  background-color: #f3e8ff !important;
  color: #6b21a8 !important;
  border: 1px solid #d8b4fe !important;
  font-weight: 600 !important;
}

.badge.bg-danger-subtle,
.badge-soft-danger {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
  border: 1px solid #fca5a5 !important;
  font-weight: 600 !important;
}

/* Dark Mode Overrides for High-Contrast Badges */
body.dark-mode .badge.bg-success-subtle,
body.dark-mode .badge-soft-emerald {
  background-color: rgba(16, 185, 129, 0.2) !important;
  color: #6ee7b7 !important;
  border-color: #059669 !important;
}

body.dark-mode .badge.bg-primary-subtle,
body.dark-mode .badge-soft-blue {
  background-color: rgba(59, 130, 246, 0.2) !important;
  color: #93c5fd !important;
  border-color: #2563eb !important;
}

body.dark-mode .badge.bg-warning-subtle,
body.dark-mode .badge-soft-amber {
  background-color: rgba(245, 158, 11, 0.2) !important;
  color: #fde047 !important;
  border-color: #d97706 !important;
}

body.dark-mode .badge.bg-secondary-subtle,
body.dark-mode .badge-soft-secondary {
  background-color: rgba(100, 116, 139, 0.25) !important;
  color: #cbd5e1 !important;
  border-color: #475569 !important;
}

body.dark-mode .badge.bg-info-subtle,
body.dark-mode .badge-soft-cyan {
  background-color: rgba(14, 165, 233, 0.2) !important;
  color: #7dd3fc !important;
  border-color: #0284c7 !important;
}

body.dark-mode .badge.bg-purple-subtle,
body.dark-mode .badge-soft-purple {
  background-color: rgba(147, 51, 234, 0.2) !important;
  color: #d8b4fe !important;
  border-color: #7e22ce !important;
}

body.dark-mode .badge.bg-danger-subtle,
body.dark-mode .badge-soft-danger {
  background-color: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
  border-color: #dc2626 !important;
}

/* ==================================================== */
/* COMPACT KPI METRIC CARDS                            */
/* ==================================================== */

.exec-stat-card {
  border-radius: 0.85rem;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease-in-out;
  background: #ffffff;
  min-height: 120px;
}

.exec-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -2px rgba(0, 0, 0, 0.08);
  border-color: rgba(16, 185, 129, 0.5);
}

.exec-card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #475569;
  margin: 0;
}

.exec-card-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin: 4px 0 6px 0;
}

.exec-icon-mini {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.exec-icon-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.exec-icon-blue {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.exec-icon-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.exec-icon-purple {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}

.exec-chart-card {
  border-radius: 0.85rem;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  background: #ffffff;
}

.exec-chart-card .card-title {
  color: #0f172a;
}

.exec-chart-card .text-muted {
  color: #475569 !important;
}

/* Feed Item & Photos */
.feed-item {
  position: relative;
  padding-left: 20px;
  margin-bottom: 1.25rem;
  border-left: 2px solid #e2e8f0;
  transition: all 0.2s ease;
}

.feed-item:last-child {
  margin-bottom: 0;
  border-left-color: transparent;
}

.feed-item-bullet {
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #10b981;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.feed-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
}

.feed-desc-box {
  background-color: #f8fafc;
  border-radius: 0.65rem;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #10b981 !important;
  padding: 0.75rem 0.9rem;
  font-size: 0.88rem;
  color: #1e293b;
  line-height: 1.5;
}

.feed-photo-thumb {
  width: 68px;
  height: 68px;
  border-radius: 0.55rem;
  object-fit: cover;
  border: 1.5px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.feed-photo-thumb:hover {
  transform: scale(1.08);
  border-color: #10b981;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Dark Mode Overrides for Executive Layout */
body.dark-mode .exec-stat-card,
body.dark-mode .exec-chart-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

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

body.dark-mode .exec-card-val {
  color: #f8fafc !important;
}

body.dark-mode .exec-chart-card .card-title {
  color: #f8fafc !important;
}

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

body.dark-mode .feed-item {
  border-left-color: #334155;
}

body.dark-mode .feed-desc-box {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  border-left-color: #10b981 !important;
  color: #f1f5f9 !important;
}

body.dark-mode .feed-photo-thumb {
  border-color: #475569;
}


