/* ==================== SIDEBAR STYLE ==================== */

/* Active menu */
.list-group-item.active {
  background-color: #d1e7dd !important;
  border-color: #d1e7dd !important;
  color: #0f5132 !important;
  font-weight: 600;
}

/* Hover */
.list-group-item:hover {
  background-color: #0f5132 !important;
  color: #d1e7dd !important;
}

/* Sidebar item modern */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1rem;
  font-size: 0.9rem;
  color: #333;
  border: none;
}

/* Icon default */
.sidebar-icon {
  font-size: 1rem;
  color: #0f5132;
}

/* Icon hover */
.sidebar-item:hover .sidebar-icon {
  color: #d1e7dd !important;
}

/* Icon active */
.sidebar-item.active .sidebar-icon {
  color: #0f5132 !important;
}

/* Icon active + hover */
.sidebar-item.active:hover .sidebar-icon {
  color: #d1e7dd !important;
}

/* Sidebar card style */
.sidebar-wrapper {
  background-color: #ffffff;
  border-radius: 0.75rem;
  margin-top: 1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* Sidebar title */
.sidebar-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
  padding: 0.75rem 1rem 0.35rem;
  color: #6c757d;
}


/* ==================== NAVBAR SMALL FONT ==================== */

@media (max-width: 575.98px) {
  .navbar-brand .small.fw-semibold {
    font-size: 0.75rem;
  }
  .navbar-brand .small.text-white-50 {
    font-size: 0.7rem;
  }

  main {
    padding: 1rem !important; /* biar konten tidak terlalu mepet di HP kecil */
  }
}


/* ==================== BOTTOM NAV (MOBILE + TABLET) ==================== */

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background-color: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-around;
  padding: 0.25rem 0.4rem calc(env(safe-area-inset-bottom, 0) + 0.25rem);
}

.mobile-nav-item {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: #495057;
  font-size: 0.65rem;
  padding: 0.2rem 0.25rem;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
}

.mobile-nav-item i {
  font-size: 1.25rem;
  line-height: 1;
}

/* Aktif */
.mobile-nav-item.active {
  background-color: #eaf5ef;
  color: #198754;
  font-weight: 600;
}
.mobile-nav-item.active i {
  color: #198754;
}

/* Hover (kalau user pakai mouse) */
.mobile-nav-item:hover {
  background-color: #f2f2f2;
  color: #198754;
}


/* ==================== TABLET + MOBILE LAYOUT (≤ 991px) ==================== */

/* Sembunyikan sidebar di tablet & mobile, dan atur main + bottom nav */
@media (max-width: 991.98px) {
  aside,
  .sidebar-wrapper {
    display: none !important;
  }

  /* Main tetap mengikuti grid (col-12), hanya tambahkan ruang untuk bottom nav */
  main {
    padding-bottom: 6rem !important; /* supaya pagination/tabel tidak ketutup bottom nav */
    margin-top: 0 !important;
  }

  /* Sembunyikan info user versi desktop di navbar */
  .navbar .d-md-flex {
    display: none !important;
  }

  /* Bottom nav tampil di mobile + tablet */
  .mobile-bottom-nav {
    display: flex !important;
  }

  /* Tambah jarak sedikit di bawah card terakhir (misalnya tabel) */
  .card:last-of-type {
    margin-bottom: 1.5rem;
  }
}

/* Bottom nav hilang di desktop (≥ 992px) */
@media (min-width: 992px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}
