/* App tweaks (Bootstrap 5) */

/* Ensure Bootstrap Icons uses font-display: swap (improves FCP consistency) */
@font-face {
  font-family: "bootstrap-icons";
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6") format("woff2"),
       url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6") format("woff");
}

.login-card {
  width: min(420px, 92vw);
}

.navbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* On mobile, let center menu follow normal flow (stack in collapse) */
@media (max-width: 991.98px) {
  .navbar-center {
    position: static;
    transform: none;
    margin-top: .5rem;
    margin-bottom: .5rem;
  }
}


/* DATA page tweaks */
.data-section .btn.btn-sm {
  padding: .35rem .55rem;
}

@media (max-width: 575.98px) {
  .accordion-button {
    padding: .85rem .95rem;
  }
  .list-group-item {
    padding: .75rem .85rem;
  }
}


/* DATA tabs (horizontal, scroll on small screens) */
.data-tabs .nav-link{
  white-space: nowrap;
}


/* DATA page: make action row comfortable on mobile */
@media (max-width: 575.98px) {
  .data-section .btn.btn-sm { padding-top: .45rem; padding-bottom: .45rem; }
  .data-section .form-select-sm { min-height: calc(1.5em + .5rem + 2px); }
}


/* Export page: alternate row for mobile list */
.export-row-alt{
  background: rgba(13,110,253,.05);
}


/* CAPAIAN tabs (horizontal, scroll on small screens) */
.capaian-tabs .nav-link{
  white-space: nowrap;
}

/* CAPAIAN page: make action row comfortable on mobile */
@media (max-width: 575.98px) {
  .capaian-section .btn.btn-sm { padding-top: .45rem; padding-bottom: .45rem; }
  .capaian-section .form-select-sm { min-height: calc(1.5em + .5rem + 2px); }
}

/* CAPAIAN (Nilai): tab buttons padding + active state */
#nilaiTabs .nilai-tab-btn,
#nilaiTabs .nilai-tab-export {
  padding: .45rem .75rem;
}

#nilaiTabs .nilai-tab-btn {
  background: #fff;
  color: var(--bs-secondary-color, #6c757d);
}

#nilaiTabs .nilai-tab-btn.active,
#nilaiTabs .nilai-tab-btn[aria-selected="true"] {
  background: var(--bs-primary);
  color: #fff;
}


/* CAPAIAN (Nilai): space between tab button groups */
#nilaiTabs {
  gap: 1.75rem !important;
}

@media (max-width: 575.98px) {
  #nilaiTabs { gap: 1rem !important; }
}


/* Back To Top button */
.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  z-index: 1080;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 575.98px) {
  .back-to-top {
    right: .85rem;
    bottom: .85rem;
    width: 44px;
    height: 44px;
  }
}
/* Dashboard: Kelompok label colors */
.kelompok-label { font-weight: 600; }
.kelompok-label.kel-1 { color: #269eee !important; } /* Kel. 1 */
.kelompok-label.kel-2 { color: #839d0d !important; } /* Kel. 2 */
.kelompok-label.kel-3 { color: #D35400 !important; } /* Kel. 3 */
.kelompok-label.kel-4 { color: #1fc1a1 !important; } /* Kel. 4 */
.kelompok-label.kel-5 { color: #e51de8 !important; } /* Kel. 5 */
.kelompok-label.kel-6 { color: #C70039 !important; } /* Kel. 6 */

/* Dashboard: zebra list items */
.dashboard-page .list-group-item:not(.active):nth-child(odd) { background-color: #ffffff; }
.dashboard-page .list-group-item:not(.active):nth-child(even) { background-color: #f8f9fa; }
