/* 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-1a { color: #269eee !important; }
.kelompok-label.kel-1b { color: #839d0d !important; }
.kelompok-label.kel-2a { color: #D35400 !important; }
.kelompok-label.kel-2b { color: #1fc1a1 !important; }
.kelompok-label.kel-3a { color: #e51de8 !important; }
.kelompok-label.kel-3b { color: #C70039 !important; }
.kelompok-label.kel-1 { color: #269eee !important; }
.kelompok-label.kel-2 { color: #839d0d !important; }
.kelompok-label.kel-3 { color: #D35400 !important; }
.kelompok-label.kel-4 { color: #1fc1a1 !important; }
.kelompok-label.kel-5 { color: #e51de8 !important; }
.kelompok-label.kel-6 { color: #C70039 !important; }

/* 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; }

/* Student lifecycle controls */
.min-w-0 { min-width: 0; }
.student-status-tabs { scrollbar-width: thin; }
.student-status-tabs .btn { flex: 0 0 auto; }

@media (max-width: 575.98px) {
  .data-section .dropdown-menu { max-width: calc(100vw - 2rem); }
  #studentStatusModal .modal-dialog,
  #studentHistoryModal .modal-dialog,
  #userModal .modal-dialog { margin: .75rem; }
  #studentStatusModal .modal-footer { display: grid; grid-template-columns: 1fr 1fr; }
  #studentStatusModal .modal-footer > * { width: 100%; margin: 0; }
}


/* WISUDA */
.wisuda-table td,
.wisuda-table th {
  padding: .8rem .9rem;
}

.wisuda-description {
  line-height: 1.55;
}

.wisuda-number {
  min-width: 2rem;
  line-height: 1.35;
}

@media (max-width: 575.98px) {
  .wisuda-page {
    padding-left: .1rem;
    padding-right: .1rem;
  }

  .wisuda-card .card-body {
    overflow-wrap: anywhere;
  }
}

/* Keep the longer navigation comfortable on medium desktop widths. */
@media (min-width: 992px) and (max-width: 1399.98px) {
  .navbar-center {
    position: static;
    transform: none;
    margin-left: auto;
    margin-right: auto;
    gap: .15rem !important;
  }

  .navbar-center .nav-link {
    padding-left: .4rem;
    padding-right: .4rem;
    font-size: .9rem;
  }

  .navbar-brand {
    max-width: 24vw;
  }

  .navbar-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
