/* UNP SGS minor overrides — offline-friendly */
body {
  font-family: "Nunito", "Segoe UI", Tahoma, sans-serif;
}
.logo span {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.table-curricula code {
  font-size: 0.85rem;
}
.stat-card .card-body {
  padding: 1.25rem;
}
.import-hint {
  font-size: 0.875rem;
  color: #6c757d;
}
.badge-role {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.select2-container--bootstrap-5 .select2-selection {
  min-height: 38px;
}
.select2-container--bootstrap-5 .select2-dropdown {
  z-index: 2000;
}

/* Grade entry panel (Manual Encode) */
.encode-mode-tabs .nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #012970;
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
}
.encode-mode-tabs .nav-link.active {
  background-color: #012970;
  color: #fff;
}
.encode-section {
  background: #f6f9ff;
  border: 1px solid #ebeef4;
  border-radius: 0.5rem;
  padding: 1rem 1rem 0.25rem;
  margin-bottom: 1rem;
}
.encode-section-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4154a3;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.encode-section-title i {
  font-size: 0.95rem;
}
.encode-hint {
  font-size: 0.8125rem;
  color: #6c757d;
  margin-bottom: 0;
}
#manualEncodeCard .form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.encode-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #ebeef4;
}
.encode-actions .btn-primary,
.encode-actions .btn-success {
  min-width: 8rem;
}

/* Mobile / tablet / iPad bottom navigation (sidebar icons) */
@media (max-width: 1199px) {
  .header .toggle-sidebar-btn {
    display: none;
  }

  body.has-mobile-nav {
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }

  body.has-mobile-nav #main {
    min-height: calc(100vh - 60px - 62px);
  }

  body.has-mobile-nav .footer {
    margin-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }

  body.has-mobile-nav .back-to-top {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 998;
    background: #fff;
    border-top: 1px solid #ebeef4;
    box-shadow: 0 -4px 16px rgba(1, 41, 112, 0.08);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-bottom-nav-inner {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mobile-bottom-nav-inner::-webkit-scrollbar {
    display: none;
  }

  .mobile-nav-item {
    flex: 1 0 4.5rem;
    min-width: 4.5rem;
    max-width: 5.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.45rem 0.25rem 0.35rem;
    border: 0;
    background: transparent;
    color: #899bbd;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
  }

  .mobile-nav-item i {
    font-size: 1.35rem;
    line-height: 1;
  }

  .mobile-nav-item span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-nav-item.active,
  .mobile-nav-item:hover,
  .mobile-nav-item:focus {
    color: #4154f1;
  }

  .mobile-nav-item.active {
    background: #f6f9ff;
  }

  .mobile-nav-menu {
    cursor: pointer;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 60px 0 calc(62px + env(safe-area-inset-bottom, 0px)) 0;
    z-index: 995;
    background: rgba(1, 41, 112, 0.35);
  }

  body.toggle-sidebar .sidebar-backdrop {
    display: block;
  }

  body.toggle-sidebar .mobile-nav-menu {
    color: #4154f1;
    background: #f6f9ff;
  }

  .sidebar {
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
    z-index: 999;
  }
}

@media (min-width: 1200px) {
  .mobile-bottom-nav,
  .sidebar-backdrop {
    display: none !important;
  }
}

/* SweetAlert2 — match app theme */
.swal2-popup {
  font-family: "Nunito", "Segoe UI", Tahoma, sans-serif;
}
.swal2-container {
  z-index: 20000 !important;
}

/* Enrollment advice summary cards (NiceAdmin card-body has no top padding) */
.advice-summary-card .card-body {
  padding: 1.25rem 1.35rem;
}
.advice-summary-card .advice-summary-label {
  margin-bottom: 0.5rem;
}
.advice-summary-card .advice-summary-value {
  margin-bottom: 0.35rem;
}
