/* =====================================================================
   Alumni Platform — app.css
   Mobile-first, responsif. Dipakai bersama Bootstrap 5.
   ===================================================================== */

:root {
  --sidebar-w: 250px;
  --app-primary: #0d6efd;
}

body {
  background: #f5f7fb;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------- Layout ------------------------------ */
.app-main { min-width: 0; }

.app-topbar { min-height: 58px; z-index: 1020; }

.app-sidebar {
  width: var(--sidebar-w);
  background: #101828;
  color: #cbd5e1;
  min-height: 100vh;
  flex-shrink: 0;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1045;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .25s ease;
}
.app-sidebar.open { transform: translateX(0); }

.sidebar-brand { border-bottom: 1px solid rgba(255,255,255,.08); }

.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 1040;
}
.sidebar-backdrop.show { display: block; }

.sidebar-nav { padding: .5rem 0 2rem; }
.sidebar-nav .nav-label {
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: #64748b; padding: .9rem 1.1rem .3rem;
}
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: .7rem;
  color: #cbd5e1; padding: .62rem 1.1rem; font-size: .925rem;
  border-left: 3px solid transparent;
}
.sidebar-nav .nav-link i { width: 20px; text-align: center; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav .nav-link.active {
  background: rgba(13,110,253,.15); color: #fff; border-left-color: var(--app-primary);
}
/* Ronde 31 — banner penjelas pengganti deretan menu abu-abu.
   Menu yang dikunci sekolah kini disembunyikan; yang tersisa hanya satu
   baris ringkas di puncak navigasi yang menerangkan berapa fitur terkunci,
   apa saja, dan ke mana harus pergi untuk membukanya. */
.sidebar-nav .nav-lock-banner {
  display: flex; align-items: flex-start; gap: .6rem;
  margin: .4rem .8rem .2rem; padding: .6rem .7rem;
  background: rgba(220,53,69,.12); border: 1px solid rgba(220,53,69,.35);
  border-radius: .55rem; color: #f8d7da; text-decoration: none;
}
.sidebar-nav .nav-lock-banner:hover { background: rgba(220,53,69,.2); color: #fff; }
.sidebar-nav .nav-lock-banner > i { margin-top: .18rem; color: #ff9aa2; }
.sidebar-nav .nav-lock-banner strong { display: block; font-size: .82rem; color: #fff; }
.sidebar-nav .nav-lock-banner small {
  display: block; font-size: .72rem; color: #e2b8bd; line-height: 1.35;
}

@media (min-width: 992px) {
  .app-sidebar { position: sticky; top: 0; transform: none; height: 100vh; }
  .sidebar-backdrop { display: none !important; }
  #sidebarToggle, #sidebarClose { display: none !important; }
}

/* ------------------------------- Cards ------------------------------- */
.card { border: 0; border-radius: .75rem; box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.card-header { border-bottom: 1px solid #eef1f5; border-radius: .75rem .75rem 0 0 !important; }

.stat-card .stat-icon {
  width: 52px; height: 52px; border-radius: .8rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.stat-number { font-size: 1.45rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: #64748b; font-size: .8rem; }

.batch-card, .alumni-card, .school-card, .claim-card { transition: transform .15s ease, box-shadow .15s ease; }
.batch-card:hover, .alumni-card:hover, .school-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(16,24,40,.10); }

.batch-year {
  display: inline-block; background: var(--app-primary); color: #fff;
  font-weight: 700; border-radius: .5rem; padding: .15rem .6rem; margin-bottom: .6rem;
}
.batch-year-lg {
  background: var(--app-primary); color: #fff; font-weight: 800; font-size: 1.6rem;
  border-radius: .9rem; padding: .6rem 1.1rem;
}

/* ------------------------------ Avatars ------------------------------ */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; font-weight: 600; flex-shrink: 0;
}
.avatar-sm { width: 30px; height: 30px; font-size: .8rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.5rem; }
.avatar-xl { width: 110px; height: 110px; font-size: 2.6rem; }

/* ---------------------------- Notifications --------------------------- */
.notif-dropdown { width: 360px; max-width: 92vw; }
.notif-badge { font-size: .6rem; }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-list .list-group-item { border-left: 0; border-right: 0; border-radius: 0 !important; }
.notif-list .list-group-item.bg-primary-subtle { border-left: 3px solid var(--app-primary); }
.notif-list .notif-item { cursor: pointer; }
/* Judul notifikasi sebagai tautan (tombol "Buka" dihapus sesuai review). */
.notif-list a.notif-title { color: inherit; text-decoration: none; }
.notif-list a.notif-title:hover { color: var(--app-primary); }
.notif-item { padding: .6rem 1rem; border-bottom: 1px solid #f1f3f7; display: block; color: inherit; text-decoration: none; }
.notif-item:hover { background: #f8f9fa; }
.notif-icon {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: #e7f0ff; color: var(--app-primary);
  display: flex; align-items: center; justify-content: center;
}
.min-w-0 { min-width: 0; }
.text-truncate-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal;
}

/* ---------------------------- Event (Fase 3) --------------------------- */
.event-card { transition: box-shadow .15s ease, transform .15s ease; }
.event-card:hover { box-shadow: 0 .5rem 1.25rem rgba(15, 23, 42, .08); transform: translateY(-2px); }
.event-cover { height: 150px; object-fit: cover; }
.event-cover-lg { max-height: 300px; object-fit: cover; width: 100%; }
.event-cover-fallback {
  background: linear-gradient(135deg, var(--app-primary), #0f4c81);
  height: 150px;
}
.ticket-card { border-radius: 1rem; }
.ticket-head { background: linear-gradient(135deg, var(--app-primary), #0f4c81); }
.ticket-code { word-break: break-all; }
.checkin-panel { position: sticky; top: 1rem; }
.checkin-panel .form-control { font-size: 1rem; }
.scan-box video {
  width: 100%; border-radius: .5rem; background: #000; max-height: 260px; object-fit: cover;
}

/* -------------------------------- Misc -------------------------------- */
.empty-state { text-align: center; color: #64748b; padding: 2rem 1rem; }

.auth-card { width: 100%; max-width: 480px; border-radius: 1rem; }
.bg-auth {
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
  min-height: 100vh;
}
.container-auth { min-height: 100vh; }

.bg-landing { background: #fbfcfe; }
.school-logo { max-height: 56px; max-width: 100%; object-fit: contain; }
.school-logo-placeholder {
  width: 56px; height: 56px; border-radius: .6rem; background: #e7f0ff; color: var(--app-primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin: 0 auto;
}
.feature-icon {
  width: 46px; height: 46px; border-radius: .7rem; flex-shrink: 0;
  background: #e7f0ff; color: var(--app-primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}

/* Parsley: pesan error */
.parsley-errors-list { list-style: none; padding: 0; margin: .25rem 0 0; }
.parsley-errors-list li { color: #dc3545; font-size: .8rem; }
input.parsley-error, select.parsley-error, textarea.parsley-error { border-color: #dc3545 !important; }

/* DataTables: rapikan di layar kecil */
div.dataTables_wrapper div.dataTables_filter input { min-width: 180px; }

/* Touch friendly */
.btn { min-height: 38px; }
.btn-sm { min-height: 32px; }

/* Loading overlay sederhana */
.app-loading {
  position: fixed; inset: 0; background: rgba(255,255,255,.7); z-index: 2000;
  display: none; align-items: center; justify-content: center;
}
.app-loading.show { display: flex; }

/* ========== Ronde 40: Ajakan pasang PWA ========== */
.pwa-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1080;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 -.25rem 1rem rgba(0, 0, 0, .12);
}
.pwa-banner-isi {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  max-width: 960px;
  margin: 0 auto;
}
@media (max-width: 575.98px) {
  .pwa-banner-isi { flex-wrap: wrap; }
  .pwa-banner-isi .flex-shrink-0 { width: 100%; }
  .pwa-banner-isi .flex-shrink-0 .btn { flex: 1; }
}
