/* custom.css */
body,
html {
  height: 100%;
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #ebebeb;
  overflow-x: hidden;
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

#loading-overlay.d-none {
  display: none !important;
}

#app-wrapper {
  display: flex;
}

#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 220px;
  background-color: #2707f6;
  color: white;
  padding: 1rem;
  z-index: 1000;
  transition: left 0.3s ease-in-out;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#sidebar .logo-circle {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 1rem;
  border: 3px solid white;
}

#sidebar .nav-link {
  color: rgba(255, 255, 255);
  margin: 5px 0;
  border-radius: 0.25rem;
  font-weight: 500;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
  background-color: #6dc7ee;
  color: white;
}

#sidebar .list-unstyled a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

#sidebar .list-unstyled a:hover {
  color: white;
}

#main-container {
  margin-left: 220px;
  width: calc(100% - 220px);
  transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}

.navbar {
  background-color: white;
  border-bottom: 1px solid #dee2e6;
}

.navbar-brand {
  color: #2707f6 !important;
  font-weight: bold;
}

.navbar-text {
  color: #495057 !important;
}

#login-container {
  padding-top: 5rem;
  padding-bottom: 5rem;
  background-color: #ebebeb;
  min-height: 100vh;
}

.login-card-body {
  padding-top: 20px;
}

.login-logo {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: block;
}

.btn-login-primary {
  background-color: #1b03b7;
}

.btn-login-google {
  background-color: #008236;
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

.modal-header.bg-success .btn-close,
.modal-header.bg-danger .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.kolom-aksi {
  white-space: nowrap;
  width: 100px;
}

/* PERBAIKAN TINGGI KOTAK PENCARIAN */
#user-input-cari,
#btn-tampil-form {
  height: 31px;
  /* Menyamakan tinggi dengan btn-sm */
}

.tombol-kanan {
  position: relative;
  width: 180px;
  right: 50;
  top: 0;
}

/* Aturan hover dasar untuk semua tema */
#sidebar .nav-link:hover,
#sidebar .nav-link.active {
  background-color: rgba(0, 0, 0, 0.2);
  /* Efek hover lebih gelap */
  color: white;
}

/* Tema Biru (warna default Anda) */
#sidebar.theme-blue {
  background: #1c05b0eb;
  /* Warna biru/ungu sesuai default Anda */
}

/* Tema Hijau */
#sidebar.theme-green {
  background: #09b92f;
}

/* Tema Indigo */
#sidebar.theme-indigo {
  background: #b100f8;
}

/* Tema Merah Gelap */
#sidebar.theme-maroon {
  background: #800000;
}

/* Tema Merah Gelap */
#sidebar.theme-pink {
  background: #f575b9ff;
}

/* Tema Default (Gelap) */
#sidebar.theme-dark,
#sidebar:not([class*="theme-"]) {
  background: #212529;
  /* Warna abu-abu gelap */
}


/* === BLOK RESPONSIVE UNTUK MOBILE === */
@media (max-width: 767.98px) {
  #sidebar {
    left: -220px;
    z-index: 1045;
  }

  #sidebar.active {
    left: 0;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.2);
  }

  #main-container {
    margin-left: 0;
    width: 100%;
  }

  #main-container .container-fluid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
  }

  #sidebar-overlay.active {
    display: block;
  }
}

/* --- ATURAN BARU UNTUK TOOLTIP HAK AKSES --- */

/* Gaya untuk link menu yang dinonaktifkan */
.nav-item.disabled>a {
  color: rgba(255, 255, 255, 0.5) !important;
  cursor: not-allowed;
  background-color: transparent !important;
}

/* Gaya untuk kotak caption/tooltip */
.no-access-caption {
  display: none;
  /* Sembunyi secara default */
  position: absolute;
  left: 50px;
  /* Jarak dari kiri sidebar */
  margin-top: -10px;
  /* Posisikan sedikit di atas kursor */
  background-color: #7b7d6c;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  white-space: nowrap;
  z-index: 1050;
  /* Pastikan muncul di atas elemen lain */
}

/* Sihirnya di sini: Tampilkan caption saat <li> yang disabled di-hover */
.nav-item.disabled:hover>.no-access-caption {
  display: block;
}

/* --- STYLE UNTUK CUSTOM DROPDOWN DENGAN PENCARIAN --- */

.custom-dropdown {
  position: relative;
  width: 100%;
}

.custom-dropdown-selection {
  background-color: white;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-dropdown-options {
  display: none;
  /* Sembunyi secara default */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border: 1px solid #ced4da;
  border-top: none;
  border-radius: 0 0 0.375rem 0.375rem;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1050;
  /* Pastikan muncul di atas elemen lain */
}

.custom-dropdown.open .custom-dropdown-options {
  display: block;
  /* Tampilkan saat dropdown terbuka */
}

.custom-dropdown-search {
  padding: 0.5rem;
  border-bottom: 1px solid #ced4da;
}

.custom-dropdown-search input {
  width: 100%;
  padding: 0.375rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
}

.custom-dropdown-options ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.custom-dropdown-options li {
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.custom-dropdown-options li:hover,
.custom-dropdown-options li.selected {
  background-color: #e9ecef;
}

.table tr.transaksi-tunai {
  background-color: #f8f9fa;
  /* Warna abu-abu terang */
  color: #6c757d;
  /* Warna teks sedikit redup */
}

button,
.btn {
  pointer-events: auto !important;
  touch-action: manipulation !important;
}
