/**
 * SELARAS KEPRI — Stylesheet aplikasi (dipakai oleh SEMUA halaman, admin & publik)
 * Dimuat lewat <link href="<?= base_url('assets/css/app.css') ?>"> di setiap layout.
 *
 * Struktur file (cari via section comment "---------- Nama ----------"):
 * - Variabel warna & radius (:root)
 * - Sidebar & layout admin (.app-sidebar, .app-main, .app-topbar)
 * - Card, tombol, badge status umum
 * - Tabel & pagination modern (admin)
 * - Halaman login & daftar admin (.auth-shell, .auth-brand, .auth-form-panel)
 * - Halaman publik buku tamu/izin lokasi (.bt-* — topbar, slider, hero backdrop, form, info panel, footer)
 * - Pengaturan Tampilan admin (.tampilan-* — form repeater di halaman CMS)
 * - Animasi & responsive breakpoints
 */

:root {
  --navy-900: #0f1f3d;
  --navy-800: #16294f;
  --navy-700: #1c3260;
  --gold-500: #f2a900;
  --gold-400: #f5bc33;
  --bg-page: #f4f6fb;
  --text-muted: #6b7280;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-soft: 0 4px 20px rgba(15, 31, 61, 0.06);
  --shadow-card: 0 8px 24px rgba(15, 31, 61, 0.08);
}

body {
  background: var(--bg-page);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: #1f2937;
}

/* ---------- Sidebar ---------- */
.app-sidebar {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  height: 100vh;
  height: 100dvh;
  width: 260px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1030;
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.app-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar .brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--gold-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--navy-900);
  flex-shrink: 0;
}
/* Background emas cuma dipakai untuk fallback teks "SK" saat belum ada logo —
   begitu logo asli (gambar) diunggah, background dihapus supaya PNG transparan
   tidak menampilkan kotak kuning di baliknya. */
.app-sidebar .brand-badge:has(img) { background: transparent; }

.brand-badge img,
.lp-brand-badge img,
.bt-brand-badge img,
.lp-emblem img,
.auth-brand__badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.app-sidebar .brand-text {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.app-sidebar .brand-text small {
  display: block;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.68rem;
}

.app-sidebar nav {
  padding: 1rem 0.75rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Reveal bertahap saat sidebar pertama render — delay per item diatur inline
   lewat style="animation-delay:...s" di layouts/admin.php (dihitung dari index
   loop PHP), jadi otomatis menyesuaikan berapa pun jumlah menu yang tampil. */
@keyframes navItemIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.app-sidebar .nav-section-label,
.app-sidebar .nav-link {
  animation: navItemIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .app-sidebar .nav-section-label,
  .app-sidebar .nav-link {
    animation: none;
  }
}

.app-sidebar .nav-section-label {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 0.75rem 0.35rem;
  font-weight: 600;
}

.app-sidebar .nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.75);
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.15rem;
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

/* Indikator pill di tepi kiri, muncul dengan efek "overshoot" (spring-like)
   saat menu aktif — bukan cuma ganti warna instan. */
.app-sidebar .nav-link::before {
  content: '';
  position: absolute;
  left: -0.75rem;
  top: 50%;
  width: 3px;
  height: 58%;
  background: var(--gold-500);
  border-radius: 0 4px 4px 0;
  transform: translateY(-50%) scaleY(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.app-sidebar .nav-link.active::before {
  transform: translateY(-50%) scaleY(1);
}

.app-sidebar .nav-link i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.app-sidebar .nav-link:hover i {
  transform: translateX(3px);
}
.app-sidebar .nav-link:active {
  transform: scale(0.98);
}

.app-sidebar .nav-link.active {
  background: var(--gold-500);
  color: var(--navy-900);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(242, 169, 0, 0.25);
}
.app-sidebar .nav-link.active:hover i {
  transform: none;
}

.app-sidebar .sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
}

/* ---------- Layout shell ---------- */
.app-main {
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  background: #fff;
  border-bottom: 1px solid #e9ecf3;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.app-content {
  padding: 1.5rem;
  flex: 1;
}

.sidebar-toggle-btn {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  color: var(--navy-800);
}

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.show {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
  .sidebar-toggle-btn {
    display: inline-block;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 31, 61, 0.45);
    z-index: 1025;
  }
  .sidebar-backdrop.show {
    display: block;
  }
}

/* ---------- Cards ---------- */
.card-soft {
  background: #fff;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-icon.bg-teal { background: #e6fbf5; color: #0d9488; }
.stat-icon.bg-blue { background: #e8f0fe; color: #2563eb; }
.stat-icon.bg-amber { background: #fff4e0; color: #d97706; }
.stat-icon.bg-purple { background: #f2e9fe; color: #7c3aed; }

/* ---------- Buttons ---------- */
.btn-navy {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
}
.btn-navy:hover {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: #fff;
}
.btn-gold {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
  font-weight: 600;
}
.btn-gold:hover {
  background: var(--gold-400);
  border-color: var(--gold-400);
  color: var(--navy-900);
}

/* ---------- Public form ---------- */
.public-hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: #fff;
  padding: 1.5rem 2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.public-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #374151;
}

.form-control, .form-select {
  border-radius: 10px;
  border: 1px solid #dfe3ec;
  padding: 0.6rem 0.85rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--navy-700);
  box-shadow: 0 0 0 0.2rem rgba(28, 50, 96, 0.12);
}

.badge-status-proses { background: #fff4e0; color: #d97706; }
.badge-status-selesai { background: #e6fbf5; color: #0d9488; }
.badge-status-diajukan { background: #e8f0fe; color: #2563eb; }
.badge-status-diverifikasi { background: #f2e9fe; color: #7c3aed; }
.badge-status-disetujui { background: #e6fbf5; color: #0d9488; }
.badge-status-ditolak { background: #fde8e8; color: #dc2626; }
.badge-status-belum_diproses { background: #fde8e8; color: #dc2626; }
.badge-status-didisposisi { background: #fff4e0; color: #d97706; }

.signature-pad-wrap {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #fbfcfe;
}

#signature-canvas {
  width: 100%;
  height: 160px;
  touch-action: none;
  cursor: crosshair;
}

/* ---------- Modern data table ---------- */
.table-modern-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid #eef0f5;
}

.table-modern {
  margin-bottom: 0;
}

.table-modern thead th {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  padding: 0.85rem 1rem;
  white-space: nowrap;
}

.table-modern thead th:first-child {
  border-top-left-radius: var(--radius-md);
}

.table-modern thead th:last-child {
  border-top-right-radius: var(--radius-md);
}

.table-modern tbody tr {
  transition: background 0.15s ease;
}

.table-modern tbody tr:nth-of-type(odd) {
  background: #fbfcfe;
}

.table-modern tbody tr:nth-of-type(even) {
  background: #ffffff;
}

.table-modern tbody tr:hover {
  background: #fff8e6;
}

.table-modern tbody td {
  padding: 0.75rem 1rem;
  border-color: #f0f2f7;
  vertical-align: middle;
}

.table-modern .col-no {
  width: 56px;
  text-align: center;
}

.table-modern .no-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef1f8;
  color: var(--navy-800);
  font-weight: 700;
  font-size: 0.78rem;
}

/* ---------- Modern pagination ---------- */
.pagination-modern-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eef0f5;
}

.pagination-modern-info {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pagination-modern-info strong {
  color: #1f2937;
}

.pagination-modern {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination-modern .page-item {
  display: flex;
}

.pagination-modern .page-link {
  min-width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #e3e7f0;
  color: var(--navy-800);
  font-size: 0.82rem;
  font-weight: 600;
  background: #fff;
  text-decoration: none;
  padding: 0 0.6rem;
  transition: all 0.15s ease;
}

.pagination-modern .page-link:hover {
  border-color: var(--gold-500);
  color: var(--navy-900);
  background: #fff8e6;
}

.pagination-modern .page-item.active .page-link {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
}

.pagination-modern .page-item.disabled .page-link {
  color: #c4c9d4;
  background: #f7f8fb;
  cursor: not-allowed;
}

/* ============================================================
   HALAMAN LOGIN & DAFTAR (.auth-*) — split-screen, panel kiri
   bermotif blueprint teknik + gradasi mengambang (nod ke identitas
   Dinas Pekerjaan Umum), panel kanan form bersih tanpa kartu ganda.
   ============================================================ */
.auth-shell {
  min-height: 100dvh;
  display: flex;
}
.auth-shell__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  width: 100%;
  min-height: 100dvh;
}

/* ---------- Panel kiri: brand & motif ---------- */
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 4vw, 3.5rem);
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: #fff;
}

.auth-brand__mesh {
  position: absolute;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  filter: blur(60px);
}
.auth-brand__mesh::before,
.auth-brand__mesh::after,
.auth-brand__blob3 {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.auth-brand__mesh::before {
  width: 46%;
  padding-bottom: 46%;
  top: 4%;
  left: 8%;
  background: radial-gradient(circle, rgba(242, 169, 0, 0.32), transparent 70%);
  animation: authBlobDrift1 22s ease-in-out infinite;
}
.auth-brand__mesh::after {
  width: 52%;
  padding-bottom: 52%;
  bottom: -8%;
  right: -6%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.28), transparent 70%);
  animation: authBlobDrift2 26s ease-in-out infinite;
}
.auth-brand__blob3 {
  width: 34%;
  padding-bottom: 34%;
  top: 42%;
  left: 46%;
  background: radial-gradient(circle, rgba(28, 50, 96, 0.55), transparent 70%);
  animation: authBlobDrift3 30s ease-in-out infinite;
}
@keyframes authBlobDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6%, 8%) scale(1.12); }
}
@keyframes authBlobDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-7%, -6%) scale(1.08); }
}
@keyframes authBlobDrift3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-42%, -55%) scale(1.15); }
}

.auth-brand__pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.16;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 65%);
  mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 65%);
}

.auth-brand__content {
  position: relative;
  z-index: 1;
}

.auth-brand__badge {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.auth-brand__title {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 1.25rem 0 0.4rem;
}
.auth-brand__tagline {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 34ch;
  line-height: 1.55;
  margin-bottom: 2rem;
}

.auth-brand__services {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.auth-brand__services li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}
.auth-brand__services i {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(242, 169, 0, 0.18);
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.auth-brand__footer {
  position: relative;
  z-index: 1;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
}

/* ---------- Panel kanan: form ---------- */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: #fff;
}
.auth-form-card {
  width: 100%;
  max-width: 380px;
}
.auth-form-card__mobile-brand { display: none; }

.auth-form-card__title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.3rem;
}
.auth-form-card__desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.auth-form-card .form-control {
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border-color: #e3e7f0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-form-card .form-control:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(242, 169, 0, 0.16);
}

.auth-submit {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  border-radius: 10px;
}

/* ---------- Reveal saat halaman dimuat ---------- */
@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-reveal {
  animation: authFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .auth-reveal { animation: none; }
  .auth-brand__mesh::before,
  .auth-brand__mesh::after,
  .auth-brand__blob3 { animation: none; }
}

@media (max-width: 991.98px) {
  .auth-shell__grid { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-card__mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
  }
  .auth-form-card__mobile-brand .auth-brand__badge {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--gold-500);
    color: var(--navy-900);
  }
  .auth-form-card__mobile-brand h1 {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
    margin: 0;
  }
  .auth-form-card__mobile-brand p {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin: 0;
  }
  .auth-form-panel { padding: 2.5rem 1.5rem; }
}

/* ---------- Pengaturan Tampilan (admin repeater forms) ---------- */
.tampilan-section {
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid #eef0f5;
}
.tampilan-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.tampilan-section__title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy-900);
  margin-bottom: 0.25rem;
}

.tampilan-section__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.repeater-row {
  background: #f8f9fc;
  border: 1px solid #eef0f5;
  border-radius: 10px;
  padding: 0.85rem;
  margin-bottom: 0.6rem;
  position: relative;
}

.repeater-remove {
  flex-shrink: 0;
}

.repeater-slide {
  background: #f8f9fc;
  border: 1px solid #eef0f5;
  border-radius: 12px;
  padding: 1.1rem;
  margin-bottom: 0.9rem;
}

.tampilan-thumb {
  width: 100%;
  max-width: 220px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #dfe3ec;
  background: #eef0f5;
}

.tampilan-logo-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 320px;
  height: 110px;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid #dfe3ec;
  background:
    linear-gradient(45deg, #eef0f5 25%, transparent 25%, transparent 75%, #eef0f5 75%, #eef0f5) 0 0 / 16px 16px,
    linear-gradient(45deg, #eef0f5 25%, #fff 25%, #fff 75%, #eef0f5 75%, #eef0f5) 8px 8px / 16px 16px;
}

.tampilan-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.bg-preview-swatch {
  height: 70px;
  border-radius: 10px;
  border: 1px solid #dfe3ec;
}

.color-swatch-input {
  width: 42px;
  height: 38px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #dfe3ec;
}

/* Choices.js dropdown fix — prevent hidden dropdown from taking layout space */
.choices__list--dropdown {
  position: absolute !important;
  width: 100%;
  z-index: 10;
}

.choices {
  position: relative;
}

/* ============================================================
   BUKU TAMU DIGITAL — Public Page
   ============================================================ */

/* Topbar */
.bt-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.9rem 0;
}

/* Sticky footer: body & main mengisi minimal 100vh, footer selalu menempel
   di bawah viewport meski konten halaman pendek (tidak ada sisa kosong). */
.bt-page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bt-page-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* Elemen terakhir di dalam <main> (backdrop halaman buku tamu/izin lokasi,
   atau section kartu konfirmasi) yang menyerap sisa tinggi viewport,
   supaya tidak ada celah kosong di bawah footer pada halaman pendek. */
.bt-page-main > *:last-child {
  flex: 1 0 auto;
}

.bt-page-main > .bt-hero-backdrop:last-child {
  display: flex;
  flex-direction: column;
}

.bt-footer {
  flex-shrink: 0;
}

.bt-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
}
.bt-brand:hover { color: #fff; }

.bt-brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gold-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--navy-900);
  flex-shrink: 0;
}
.bt-brand-badge:has(img) { background: transparent; }

.bt-brand-text {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.bt-brand-text small {
  display: block;
  font-weight: 400;
  font-size: 0.68rem;
  opacity: 0.6;
}

/* ---------- Hero backdrop (bg dari admin, mulai di bawah slider, meliputi judul + form) ---------- */
.bt-hero-backdrop {
  position: relative;
  isolation: isolate;
}

/* Melunturkan backdrop secara bertahap menjadi warna halaman (--bg-page) saat
   turun ke area form, agar formulir tetap nyaman dibaca meski backdrop gelap/foto. */
.bt-hero-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(244, 246, 251, 0) 0%,
    rgba(244, 246, 251, 0) 22%,
    rgba(244, 246, 251, 0.3) 45%,
    rgba(244, 246, 251, 0.55) 65%,
    rgba(244, 246, 251, 0.68) 82%,
    rgba(244, 246, 251, 0.74) 100%
  );
}

.bt-hero-backdrop > * {
  position: relative;
  z-index: 2;
}

/* ---------- Slider ---------- */
.bt-slider-section {
  position: relative;
}

.bt-slide {
  height: 56vh;
  min-height: 380px;
  max-height: 620px;
  position: relative;
  overflow: hidden;
}

/* Desktop/laptop: slider dibuat lebih tinggi agar gambar terlihat lebih penuh. */
@media (min-width: 992px) {
  .bt-slide {
    height: 74vh;
    min-height: 560px;
    max-height: 820px;
  }
}

/* Pembatas gelombang di ujung bawah slider — supaya peralihan dari foto slider
   ke backdrop/judul di bawahnya terasa disengaja (bukan potongan lurus yang kaku),
   tanpa membuat background kustom "bocor" ke dalam foto slider itu sendiri. */
.bt-slider-divider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 56px;
  line-height: 0;
  z-index: 3;
  pointer-events: none;
}
.bt-slider-divider svg {
  display: block;
  width: 100%;
  height: 100%;
}

@media (min-width: 992px) {
  .bt-slider-divider {
    height: 84px;
  }
}
@media (max-width: 575.98px) {
  .bt-slider-divider {
    height: 34px;
  }
}

/* Lapisan foto/gradasi slide — selalu pas & penuh, tanpa berulang.
   Zoom Ken Burns dijaga halus (lihat JS) supaya gambar tidak terasa kepotong. */
.bt-slide__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 7s ease-out;
  transform-origin: center center;
  will-change: transform;
}

.bt-slide__bg--1 {
  background-image: linear-gradient(145deg, #0f1f3d 0%, #163352 35%, #0d4a4e 100%);
}
.bt-slide__bg--2 {
  background-image: linear-gradient(145deg, #16294f 0%, #1c3260 40%, #1a4a7a 100%);
}
.bt-slide__bg--3 {
  background-image: linear-gradient(145deg, #0f1f3d 0%, #1c3260 50%, #163352 100%);
}

.bt-slide__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,31,61,0.72) 0%, rgba(15,31,61,0.22) 45%, rgba(15,31,61,0.42) 100%);
}

.bt-slide__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3.5rem;
}

.bt-slide__body {
  max-width: 600px;
}

.bt-slide__badge {
  display: inline-block;
  background: var(--gold-500);
  color: var(--navy-900);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 3px;
  margin-bottom: 0.9rem;
}

.bt-slide__title {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
}

.bt-slide__sub {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  margin: 0;
}

/* Slider indicators — berlaku untuk semua slider (#btSlider, #plSlider, dst)
   di dalam .bt-slider-section, bukan cuma ID tertentu. */
.bt-slider-section .carousel-indicators {
  margin-bottom: 1.25rem;
  gap: 0.35rem;
  z-index: 5;
}
.bt-slider-section .carousel-indicators button {
  width: 28px;
  height: 3px;
  border: none;
  border-radius: 2px;
  background: rgba(255,255,255,0.35);
  transition: width 0.35s ease, background 0.35s ease;
  opacity: 1;
}
.bt-slider-section .carousel-indicators button.active {
  width: 44px;
  background: var(--gold-500);
}

/* Slider arrows */
.bt-slider-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.bt-slider-arrow:hover {
  background: rgba(255,255,255,0.22);
}
.carousel-control-prev:active .bt-slider-arrow,
.carousel-control-next:active .bt-slider-arrow {
  transform: scale(0.92);
}
.carousel-control-prev-icon,
.carousel-control-next-icon { display: none; }

/* ---------- Heading section (transparan, mewarisi .bt-hero-backdrop) ---------- */
.bt-heading-section {
  padding: 2.5rem 0 1rem;
  position: relative;
}

.bt-heading__accent {
  width: 42px;
  height: 4px;
  background: var(--gold-500);
  border-radius: 2px;
  margin-bottom: 0.9rem;
}

.bt-heading__title {
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.bt-heading__sub {
  color: rgba(255,255,255,0.72);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 520px;
  margin: 0;
}

.bt-heading__date {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  margin: 0;
}

/* ---------- Form section ---------- */
.bt-form-section {
  padding: 1.5rem 0 4rem;
  position: relative;
}

.bt-card {
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(15,31,61,0.06), 0 20px 48px rgba(15,31,61,0.12);
  border: 1px solid rgba(255,255,255,0.6);
  padding: 2rem;
}

.bt-form-group {
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid #f0f2f7;
}
.bt-form-group--last {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.bt-form-group__title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy-900);
  margin-bottom: 1rem;
}

.bt-card .form-control,
.bt-card .form-select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.bt-card .form-control:focus,
.bt-card .form-select:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 0.2rem rgba(242,169,0,0.12);
}

.bt-card .input-group-text {
  background: #f8f9fc;
  border-color: #dfe3ec;
  color: var(--text-muted);
}

/* Counter input */
.bt-counter {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #dfe3ec;
  border-radius: 10px;
  overflow: hidden;
  max-width: 160px;
}

.bt-counter__btn {
  border: none;
  background: #f8f9fc;
  color: var(--navy-800);
  width: 44px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.bt-counter__btn:hover { background: #eef0f5; }
.bt-counter__btn:active { background: #e3e7ee; }

.bt-counter__input {
  border: none;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  width: 56px;
  color: var(--navy-900);
  background: transparent;
  -moz-appearance: textfield;
}
.bt-counter__input::-webkit-inner-spin-button,
.bt-counter__input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Signature pad */
.bt-signature-wrap {
  position: relative;
  border: 2px dashed #d5dbe7;
  border-radius: 12px;
  background: #fbfcfe;
  transition: border-color 0.2s ease;
}
.bt-signature-wrap:hover {
  border-color: var(--gold-500);
}

.bt-signature-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #c4c9d4;
  font-size: 0.85rem;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#signature-canvas {
  width: 100%;
  height: 150px;
  touch-action: none;
  cursor: crosshair;
  position: relative;
  z-index: 1;
}

/* ---------- Data Lokasi: pilih bentuk objek + gambar di peta Leaflet
   (permohonan_lokasi/create.php) ---------- */
.pl-bentuk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.pl-bentuk-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  background: #fff;
  border: 1.5px solid #e5e8f0;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.pl-bentuk-card:hover {
  border-color: var(--gold-500);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 31, 61, 0.08);
}
.pl-bentuk-card.is-active {
  border-color: var(--gold-500);
  background: linear-gradient(155deg, #fff9ec, #fff);
  box-shadow: 0 0 0 1px var(--gold-500) inset, 0 8px 20px rgba(242, 169, 0, 0.16);
}
.pl-bentuk-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f6fb;
  color: var(--navy-700);
  font-size: 1.1rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.pl-bentuk-card.is-active .pl-bentuk-card__icon {
  background: var(--gold-500);
  color: #fff;
}
.pl-bentuk-card__title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy-900);
}
.pl-bentuk-card__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.pl-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: #f4f6fb;
  border: 1px solid #e5e8f0;
  border-radius: 12px 12px 0 0;
  padding: 0.7rem 1rem;
}
.pl-map-toolbar__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}
.pl-map-toolbar__hint.is-ready { color: var(--navy-800); }
.pl-map-btn {
  border: 1px solid #dfe3ec;
  background: #fff;
  color: var(--navy-800);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.pl-map-btn:hover:not(:disabled) { background: #eef0f5; border-color: var(--navy-700); }
.pl-map-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pl-map-btn--danger { color: #dc2626; border-color: #f8b4b4; }
.pl-map-btn--danger:hover:not(:disabled) { background: #fef2f2; border-color: #dc2626; }

.pl-map {
  width: 100%;
  height: 340px;
  border: 1px solid #e5e8f0;
  border-top: none;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  background: #eef1f6;
}
.pl-map.pl-map--error { border-radius: 0 0 12px 12px; }

/* Varian read-only untuk halaman detail admin (permohonan_lokasi/admin_show.php) — tanpa
   toolbar di atasnya, jadi border-radius penuh di keempat sudut. */
.pl-map--small {
  height: 400px;
  border: 1px solid #eef0f5;
  border-radius: var(--radius-md);
}

/* Kontrol zoom Leaflet disenadakan dengan bahasa desain aplikasi (kotak putih rounded
   dengan shadow lembut, bukan tampilan default persegi Leaflet) */
.pl-map .leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 4px 14px rgba(15, 31, 61, 0.16) !important;
  border-radius: 10px !important;
  overflow: hidden;
}
.pl-map .leaflet-control-zoom a {
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  color: var(--navy-800) !important;
  font-weight: 700;
}
.pl-map .leaflet-control-zoom a:hover { background: #f4f6fb !important; }
.pl-map .leaflet-tooltip {
  background: var(--navy-900);
  color: #fff;
  border: none;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

@media (max-width: 575.98px) {
  .pl-bentuk-grid { grid-template-columns: 1fr; }
  .pl-bentuk-card { padding: 0.85rem 0.9rem; }
  .pl-map { height: 260px; }
  .pl-map-toolbar { justify-content: flex-start; }
}

/* Submit button */
.bt-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-500);
  border: 2px solid var(--gold-500);
  color: var(--navy-900);
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 10px;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.bt-submit-btn:hover {
  background: var(--gold-400);
  border-color: var(--gold-400);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(242,169,0,0.25);
}
.bt-submit-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

/* ---------- Info panel (glass, biar backdrop kustom terlihat lembut di baliknya) ---------- */
.bt-info {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px) saturate(140%);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(15,31,61,0.07), 0 16px 36px rgba(15,31,61,0.08);
  border: 1px solid rgba(255,255,255,0.55);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.bt-info__card {
  display: flex;
  gap: 0.85rem;
  padding: 0.75rem 0;
}
.bt-info__card + .bt-info__card {
  border-top: 1px solid #f3f4f8;
}

.bt-info__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.bt-info__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.2rem;
}

.bt-info__text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.bt-info-box {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px) saturate(140%);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(15,31,61,0.07), 0 16px 36px rgba(15,31,61,0.08);
  border: 1px solid rgba(255,255,255,0.55);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.bt-info-box__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.75rem;
}

.bt-info-box__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #374151;
  padding: 0.35rem 0;
}
.bt-info-box__row--muted {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ---------- Footer ---------- */
.bt-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.65);
  padding: 3rem 0 1.5rem;
}

.bt-footer-heading {
  color: var(--gold-500);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.75rem;
}

.bt-footer-desc {
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.5);
}

.bt-footer-text {
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.6);
}

/* ---------- Animations ---------- */
@keyframes btFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bt-animate {
  opacity: 0;
  transform: translateY(28px);
}
.bt-animate--visible {
  animation: btFadeUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scroll-linked reveal (dua arah): tersembunyi saat halaman masih di paling
   atas (baru dibuka/di-refresh — hanya slider yang terlihat), muncul begitu
   halaman digulir ke bawah, dan tersembunyi lagi begitu digulir kembali ke
   paling atas. Beda dengan .bt-animate yang sekali muncul lalu permanen. */
.bt-scrollhide {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.bt-scrollhide--show {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .bt-scrollhide {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.carousel-fade .carousel-item {
  transition-duration: 0.8s;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .bt-slide {
    height: 46vh;
    min-height: 300px;
  }
  .bt-slide__title {
    font-size: 1.5rem;
  }
  .bt-heading__title {
    font-size: 1.5rem;
  }
  .bt-card {
    padding: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .bt-slide {
    height: 42vh;
    min-height: 260px;
  }
  .bt-slide__title {
    font-size: 1.2rem;
  }
  .bt-slide__sub {
    font-size: 0.82rem;
  }
  .bt-slide__content {
    padding-bottom: 2.5rem;
  }
  .bt-heading-section {
    padding-top: 1.5rem;
  }
  .bt-heading__title {
    font-size: 1.35rem;
  }
  .bt-card {
    padding: 1.15rem;
  }
  .bt-form-section {
    padding-bottom: 2rem;
  }
  .bt-footer {
    padding: 2rem 0 1.25rem;
  }
}

/* ============================================================
   LANDING PAGE — Public Home (home/index.php + layouts/public.php)
   Topbar bermerek besar di atas slider, brand statement, statistik
   real-time, kartu layanan zig-zag, galeri, dan tautan terkait.
   ============================================================ */

/* ---------- Reveal saat disorot/discroll (dipakai berulang di banyak section:
   Statistik, Layanan Tersedia, Galeri Dinas, Tautan Terkait, footer). REPLAY
   setiap kali elemen keluar-masuk viewport, bukan sekali jalan lalu berhenti —
   class .is-visible di-toggle dua arah oleh IntersectionObserver di JS. ---------- */
.lp-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.lp-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.lp-reveal-zoom {
  opacity: 0;
  transform: translateY(24px) scale(0.92);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.lp-reveal-zoom.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .lp-reveal,
  .lp-reveal-zoom {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Topbar (transparan, di atas slider) ---------- */
.lp-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.15rem 0;
}

.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: #fff;
}
.lp-brand:hover { color: #fff; }

.lp-brand-badge {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy-900);
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.lp-brand-badge:has(img) { background: transparent; box-shadow: none; }

.lp-brand-text {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.lp-brand-text small {
  display: block;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  opacity: 0.78;
}

.lp-login-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lp-login-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- Scroll cue di ujung bawah slider ---------- */
.lp-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 6;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  animation: lpBounce 2.2s ease-in-out infinite;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lp-scroll-cue--hide {
  opacity: 0;
  visibility: hidden;
}
@keyframes lpBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Brand statement (dalam .bt-hero-backdrop) ---------- */
.lp-brand-section {
  padding: 3.75rem 0 3rem;
  position: relative;
}

.lp-emblem {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-900);
  font-weight: 800;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.lp-emblem:has(img) { background: transparent; box-shadow: none; }

.lp-brand-title {
  color: #fff;
  font-weight: 800;
  font-size: 2.75rem;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 0.75rem;
}

.lp-brand-subtitle {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 0.75rem;
  line-height: 1.6;
}

.lp-brand-subtitle--secondary {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.92rem;
  max-width: 580px;
  margin-top: -0.4rem;
}

.lp-brand-tagline {
  color: var(--gold-400);
  font-style: italic;
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.lp-cta-group {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}

.lp-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease;
}
.lp-cta-btn--primary {
  background: var(--gold-500);
  color: var(--navy-900);
  box-shadow: 0 10px 28px rgba(242, 169, 0, 0.3);
}
.lp-cta-btn--primary:hover {
  background: var(--gold-400);
  transform: translateY(-2px);
  color: var(--navy-900);
}
.lp-cta-btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
}
.lp-cta-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  color: #fff;
}

/* ---------- Statistik publik (sekarang di dalam .lp-content-backdrop, tema gelap) ---------- */
.lp-stat-section {
  padding: 3.5rem 0 1rem;
}

.lp-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

/* Kartu "glass" (transparan + blur), bukan solid putih lagi — supaya background
   parallax di baliknya tetap terlihat lembut, senada dengan .bt-info di halaman lain. */
.lp-stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12), 0 16px 36px rgba(0, 0, 0, 0.14);
  padding: 1.6rem 1.25rem;
  text-align: center;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.lp-stat-card.is-visible:hover {
  transform: translateY(-4px) scale(1);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16), 0 20px 44px rgba(0, 0, 0, 0.18);
}

.lp-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 0.9rem;
}

.lp-stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.4rem;
  font-variant-numeric: tabular-nums;
}

.lp-stat-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

/* ---------- Backdrop konten (Background Konten), menaungi Kartu Layanan s.d.
   Tautan Terkait dalam SATU wrapper utuh, background-size:cover supaya menutupi
   seluruh area dari atas ke bawah tanpa putus. background-attachment:fixed
   membuat gambar/gradasi terasa "diam relatif ke layar" sementara konten di
   atasnya bergulir (efek parallax) — di desktop. Di layar kecil (mobile)
   di-nonaktifkan lewat media query di bawah karena banyak browser mobile
   (terutama iOS Safari) tidak mendukung fixed dengan baik. ---------- */
.lp-content-backdrop {
  position: relative;
  isolation: isolate;
  background-attachment: fixed;
}

@media (max-width: 767.98px) {
  .lp-content-backdrop {
    background-attachment: scroll;
  }
}


/* ---------- Section head bersama (Layanan/Galeri/Link) — teks terang karena
   section ini selalu duduk di atas .lp-content-backdrop (tema gelap seperti hero) ---------- */
.lp-section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 2.5rem;
}
.lp-section-head__accent {
  width: 42px;
  height: 4px;
  background: var(--gold-500);
  border-radius: 2px;
  margin: 0 auto 0.9rem;
}
.lp-section-head__title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.lp-section-head__sub {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Kartu layanan (zig-zag, bukan grid 3 kolom generik) ---------- */
.lp-layanan-section {
  padding: 3.5rem 0 4rem;
}

.lp-layanan-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Glass (transparan + blur), sama seperti .lp-stat-card di atasnya — supaya
   background parallax tetap terlihat lembut di baliknya, bukan kartu putih polos. */
.lp-layanan-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12), 0 16px 36px rgba(0, 0, 0, 0.14);
  padding: 2.25rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, background 0.3s ease;
}
.lp-layanan-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16), 0 20px 44px rgba(0, 0, 0, 0.18);
}
.lp-layanan-card--reverse {
  flex-direction: row-reverse;
}

.lp-layanan-icon {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  flex-shrink: 0;
}

.lp-layanan-body {
  flex: 1;
}

.lp-layanan-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.lp-layanan-text {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.1rem;
  max-width: 560px;
}

.lp-layanan-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.4rem;
  border-radius: 10px;
  background: var(--navy-800);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lp-layanan-btn:hover {
  background: var(--navy-900);
  color: #fff;
  transform: translateX(2px);
}

.lp-layanan-link {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 600;
}
.lp-layanan-link:hover { text-decoration: underline; color: #fff; }

/* ---------- Galeri foto dinas ---------- */
.lp-galeri-section {
  padding: 1rem 0 4rem;
}

.lp-galeri-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.lp-galeri-item {
  position: relative;
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}
.lp-galeri-item:hover,
.lp-galeri-item:focus-visible {
  box-shadow: 0 16px 36px rgba(15, 31, 61, 0.2);
}
.lp-galeri-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.lp-galeri-item:hover img {
  transform: scale(1.08);
}
.lp-galeri-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 0.9rem 0.7rem;
  background: linear-gradient(to top, rgba(15, 31, 61, 0.85), rgba(15, 31, 61, 0));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.lp-galeri-item:hover .lp-galeri-caption {
  opacity: 1;
  transform: translateY(0);
}

.lp-galeri-zoom {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15, 31, 61, 0.55);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.lp-galeri-item:hover .lp-galeri-zoom,
.lp-galeri-item:focus-visible .lp-galeri-zoom {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Lightbox galeri (modal pop-up, bukan pindah halaman) ---------- */
.lp-body-locked {
  overflow: hidden;
}

.lp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.3s;
}
.lp-lightbox--open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
}

.lp-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 17, 32, 0.86);
  backdrop-filter: blur(6px);
}

.lp-lightbox__stage {
  position: relative;
  z-index: 2;
  max-width: min(90vw, 1100px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.92) translateY(10px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.lp-lightbox--open .lp-lightbox__stage {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.lp-lightbox__stage img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  background: #0f1f3d;
}

.lp-lightbox__caption {
  margin: 0.9rem 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  text-align: center;
  max-width: 60ch;
}

.lp-lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lp-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.lp-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lp-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lp-lightbox__nav--prev { left: 1.25rem; }
.lp-lightbox__nav--prev:hover { transform: translateY(-50%) translateX(-3px); }
.lp-lightbox__nav--next { right: 1.25rem; }
.lp-lightbox__nav--next:hover { transform: translateY(-50%) translateX(3px); }

@media (max-width: 575.98px) {
  .lp-lightbox__nav { width: 40px; height: 40px; font-size: 1rem; }
  .lp-lightbox__nav--prev { left: 0.5rem; }
  .lp-lightbox__nav--next { right: 0.5rem; }
  .lp-lightbox__close { top: 0.75rem; right: 0.75rem; width: 38px; height: 38px; }
  .lp-lightbox__stage { max-width: 94vw; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-lightbox,
  .lp-lightbox__stage {
    transition: none;
  }
}

/* ---------- Tautan terkait instansi ---------- */
.lp-link-section {
  padding: 0 0 4.5rem;
}

.lp-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.lp-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e9ecf3;
  box-shadow: var(--shadow-soft);
  color: var(--navy-900);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.lp-link-pill i:first-child {
  color: var(--navy-700);
  font-size: 1rem;
}
.lp-link-pill__go {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 0.1rem;
}
.lp-link-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--gold-500);
  color: var(--navy-900);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .lp-brand-title { font-size: 2.1rem; }
  .lp-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-galeri-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767.98px) {
  .lp-layanan-card,
  .lp-layanan-card--reverse {
    flex-direction: column;
    text-align: center;
    padding: 1.75rem;
  }
  .lp-layanan-text { max-width: none; }
  .lp-brand-section { padding: 3rem 0 2.5rem; }
  .lp-emblem { width: 76px; height: 76px; font-size: 1.6rem; border-radius: 20px; }
}

@media (max-width: 575.98px) {
  .lp-topbar { padding: 0.85rem 0; }
  .lp-brand-badge { width: 42px; height: 42px; font-size: 0.85rem; border-radius: 11px; }
  .lp-brand-text { font-size: 0.92rem; }
  .lp-brand-title { font-size: 1.65rem; }
  .lp-brand-subtitle { font-size: 0.92rem; }
  .lp-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .lp-stat-value { font-size: 1.5rem; }
  .lp-galeri-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .lp-scroll-cue { bottom: 52px; width: 34px; height: 34px; font-size: 0.95rem; }
}

/* ============================================================
   ADMIN — Data Pegawai & Unit Kerja (redesain modern)
   Kartu pegawai avatar-inisial, statistik hitung-naik, pohon unit
   kerja bisa dilipat dengan garis panduan, semua reveal on-load
   bertahap (staggered) via animation-delay inline per elemen.
   ============================================================ */

/* ---------- Reveal saat halaman dimuat ---------- */
@keyframes pgFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pg-reveal {
  animation: pgFadeUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .pg-reveal { animation: none; }
}

/* ---------- Kartu statistik ringkas ---------- */
.pg-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.pg-stat-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(15, 31, 61, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
/* Aksen navy->emas tipis di tepi atas — penanda identitas brand yang sama
   dipakai di halaman publik, supaya kartu tidak terasa template polos. */
.pg-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy-800), var(--gold-500));
  opacity: 0.85;
}
.pg-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: rgba(15, 31, 61, 0.12);
}
.pg-stat-card__icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -6px 10px -6px rgba(0, 0, 0, 0.1);
}
.pg-stat-card__icon--blue   { background: linear-gradient(155deg, #eef4ff, #dbe7fd); color: #2563eb; }
.pg-stat-card__icon--teal   { background: linear-gradient(155deg, #ecfdf7, #d3f7ec); color: #0d9488; }
.pg-stat-card__icon--amber  { background: linear-gradient(155deg, #fff8ec, #ffe9c2); color: #d97706; }
.pg-stat-card__icon--purple { background: linear-gradient(155deg, #f6f0ff, #e6d9fc); color: #7c3aed; }
.pg-stat-card__icon--rose   { background: linear-gradient(155deg, #fff0f6, #fcd7e6); color: #db2777; }
.pg-stat-card__value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.pg-stat-card__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ---------- Tombol & icon-button bersama ---------- */
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.pg-btn:active { transform: scale(0.97); }
.pg-btn--primary {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
  box-shadow: 0 6px 16px rgba(242, 169, 0, 0.25);
}
.pg-btn--primary:hover { background: var(--gold-400); color: var(--navy-900); transform: translateY(-1px); }
.pg-btn--outline {
  background: #fff;
  border-color: #e3e7f0;
  color: var(--navy-800);
}
.pg-btn--outline:hover { border-color: var(--navy-700); background: #f8f9fc; color: var(--navy-900); }
.pg-btn--ghost {
  background: #f4f6fb;
  border-color: transparent;
  color: var(--navy-800);
}
.pg-btn--ghost:hover { background: #eef1f8; }
.pg-btn--sm { padding: 0.4rem 0.75rem; font-size: 0.78rem; }

/* Varian berwarna — dipakai untuk tombol Kembali/Buka Semua/Tutup Semua di halaman
   Pengaturan Tampilan supaya lebih menonjol dibanding .pg-btn--ghost yang abu-abu netral. */
.pg-btn--soft-navy {
  background: #e8ecf5;
  border-color: transparent;
  color: var(--navy-800);
}
.pg-btn--soft-navy:hover { background: #dbe1f0; color: var(--navy-900); }

.pg-btn--soft-teal {
  background: #e6fbf5;
  border-color: transparent;
  color: #0d9488;
}
.pg-btn--soft-teal:hover { background: #d2f6ec; color: #0b7d72; }

.pg-btn--soft-amber {
  background: #fff4e0;
  border-color: transparent;
  color: #d97706;
}
.pg-btn--soft-amber:hover { background: #ffe9c2; color: #b8630a; }

.pg-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #e3e7f0;
  background: #fff;
  color: var(--navy-800);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pg-icon-btn:hover { background: #f4f6fb; transform: translateY(-1px); }
.pg-icon-btn--danger:hover { background: #fde8e8; border-color: #f8b4b4; color: #dc2626; }
.pg-icon-btn--sukses:hover { background: #e6fbf5; border-color: #99e6d9; color: #0d9488; }
.pg-icon-btn--sm { width: 28px; height: 28px; border-radius: 7px; font-size: 0.8rem; }

/* ---------- Toolbar filter & aksi ---------- */
.pg-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}
.pg-toolbar__filters {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0;
}
.pg-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pg-search, .pg-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f4f6fb;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.pg-search:focus-within, .pg-select:focus-within {
  background: #fff;
  border-color: var(--navy-700);
}
.pg-search i, .pg-select i { color: var(--text-muted); font-size: 0.9rem; }
.pg-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.85rem;
  min-width: 220px;
  color: #1f2937;
}
.pg-select select {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.85rem;
  color: #1f2937;
  max-width: 200px;
}

/* ---------- Empty state ---------- */
.pg-empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
}
.pg-empty__icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #f4f6fb;
  color: var(--navy-700);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.pg-empty__title { font-weight: 700; color: #1f2937; margin-bottom: 0.35rem; }
.pg-empty__text { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.25rem; }

/* ---------- Grid kartu pegawai ---------- */
.pg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.pg-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  position: relative;
  /* Grid item butuh min-width:0 secara eksplisit — kalau tidak, teks nama/jabatan
     yang white-space:nowrap memaksa lebar minimum kartu mengikuti panjang teks
     aslinya (bisa jauh lebih lebar dari minmax(260px,1fr)), bikin grid "blowout"
     dan overflow horizontal di layar sempit. */
  min-width: 0;
}
.pg-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.pg-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.pg-avatar {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.pg-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.pg-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.pg-status--aktif { background: #e6fbf5; color: #0d9488; }
.pg-status--aktif .pg-status__dot { background: #0d9488; box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15); }
.pg-status--nonaktif { background: #fde8e8; color: #dc2626; }
.pg-status--nonaktif .pg-status__dot { background: #dc2626; }
.pg-status--pending { background: #fff4e0; color: #d97706; }
.pg-status--pending .pg-status__dot { background: #d97706; box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15); }

.pg-card__nama {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-card__jabatan {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-bottom: 0.9rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #f0f2f7;
}
.pg-card__meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: #4b5563;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-card__meta-row i { color: var(--text-muted); font-size: 0.82rem; flex-shrink: 0; }
.pg-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

/* ---------- Pohon Unit Kerja ---------- */
.uk-tree-tools {
  display: flex;
  gap: 0.4rem;
}
.uk-branch {
  list-style: none;
  margin: 0;
  padding: 0;
}
.uk-branch:not(.uk-branch--root) {
  margin-left: 15px;
  padding-left: 18px;
  border-left: 2px dashed #e3e7f0;
}
.uk-node { margin-bottom: 0.15rem; }
.uk-node__row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.uk-node__row:hover {
  background: #f8f9fc;
}
.uk-node__row:hover .uk-node__delete {
  opacity: 1;
  pointer-events: auto;
}

.uk-toggle {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
}
.uk-toggle:hover { background: #eef1f8; color: var(--navy-800); }
.uk-toggle i { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.uk-toggle--collapsed i { transform: rotate(-90deg); }
.uk-toggle--leaf { visibility: hidden; }

.uk-node__icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
}
.uk-node__icon--navy   { background: #e8ecf5; color: var(--navy-800); }
.uk-node__icon--teal   { background: #e6fbf5; color: #0d9488; }
.uk-node__icon--blue   { background: #e8f0fe; color: #2563eb; }
.uk-node__icon--amber  { background: #fff4e0; color: #d97706; }
.uk-node__icon--purple { background: #f2e9fe; color: #7c3aed; }
.uk-node__icon--rose   { background: #fde8f0; color: #db2777; }

.uk-node__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.uk-node__nama {
  font-size: 0.87rem;
  font-weight: 600;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uk-node__jenis {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.uk-node__count {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy-700);
  background: #eef1f8;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.uk-node__delete {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

/* Trik CSS grid-template-rows (1fr <-> 0fr) untuk animasi lipat/buka tanpa
   perlu mengukur tinggi konten lewat JS — transisi tetap mulus untuk konten
   dengan tinggi dinamis (jumlah anak unit kerja bisa berbeda-beda). */
.uk-children {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.uk-children--collapsed {
  grid-template-rows: 0fr;
}
.uk-children__inner {
  overflow: hidden;
  min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  .uk-children { transition: none; }
  .uk-toggle i { transition: none; }
}

/* ---------- Pemilih jenis unit (kartu radio berikon) ---------- */
.uk-jenis-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
.uk-jenis-option { display: block; cursor: pointer; }
.uk-jenis-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.uk-jenis-option__card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1.5px solid #e3e7f0;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.uk-jenis-option__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
}
.uk-jenis-option input:checked + .uk-jenis-option__card {
  border-color: var(--gold-500);
  background: #fffaf0;
}
.uk-jenis-option input:focus-visible + .uk-jenis-option__card {
  border-color: var(--navy-700);
}
.uk-jenis-option:hover .uk-jenis-option__card {
  transform: translateY(-1px);
}
.uk-jenis-option__icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .pg-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767.98px) {
  .pg-toolbar { flex-direction: column; align-items: stretch; }
  .pg-toolbar__filters, .pg-toolbar__actions { width: 100%; }
  .pg-search input { min-width: 0; flex: 1; }
  .pg-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .pg-stat-grid { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .pg-stat-card { padding: 1rem; gap: 0.75rem; }
  .pg-stat-card__value { font-size: 1.3rem; }
  .uk-jenis-picker { grid-template-columns: 1fr; }
}

/* ============================================================
   ADMIN — Pengaturan Tampilan Publik (redesain modern)
   Hub bento asimetris dengan swatch gradasi hidup, form panjang
   dipecah jadi accordion yang bisa dilipat per-section, repeater
   dengan animasi masuk/keluar, dropzone unggah gambar drag-and-drop
   sungguhan, dan sticky save bar.
   ============================================================ */

/* ---------- Hub: kartu menu (tampilan_index.php) ---------- */
.ts-hub-lead {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 62ch;
  margin-bottom: 1.75rem;
}

.ts-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}
.ts-hub-card--wide { grid-column: 1 / -1; }

.ts-hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}
.ts-hub-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgba(15, 31, 61, 0.14);
  color: inherit;
}

.ts-hub-card__preview {
  height: 84px;
  position: relative;
  overflow: hidden;
}
.ts-hub-card__preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
}
.ts-hub-card--wide .ts-hub-card__preview { height: 110px; }

.ts-hub-card__body {
  padding: 1.35rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.ts-hub-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid #eef0f5;
  box-shadow: 0 6px 16px rgba(15, 31, 61, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--navy-800);
  margin-top: -2.6rem;
  margin-bottom: 0.9rem;
  position: relative;
  z-index: 1;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.ts-hub-card:hover .ts-hub-card__icon {
  transform: scale(1.08) rotate(-4deg);
}
.ts-hub-card__title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #111827;
  margin-bottom: 0.35rem;
}
.ts-hub-card--wide .ts-hub-card__title { font-size: 1.2rem; }
.ts-hub-card__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.1rem;
  flex: 1;
}
.ts-hub-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--navy-800);
}
.ts-hub-card__cta i {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ts-hub-card:hover .ts-hub-card__cta i {
  transform: translateX(4px);
}

/* ---------- Header halaman form (ts-hero) ---------- */
.ts-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.ts-hero__icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 10px 22px rgba(15, 31, 61, 0.22);
}
.ts-hero__title {
  font-weight: 800;
  font-size: 1.2rem;
  color: #111827;
  margin-bottom: 0.15rem;
}
.ts-hero__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.ts-hero__back {
  margin-left: auto;
}

/* ---------- Accordion section ---------- */
.ts-accordion-tools {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.ts-section {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  margin-bottom: 0.9rem;
  overflow: hidden;
}

.ts-section__header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.35rem;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}
.ts-section__header:hover { background: #fafbfd; }

.ts-section__icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #eef1f8;
  color: var(--navy-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.02rem;
  flex-shrink: 0;
}
.ts-section__heading { flex: 1; min-width: 0; }
.ts-section__title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy-900);
}
.ts-section__hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}
.ts-section__chevron {
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.ts-section--collapsed .ts-section__chevron { transform: rotate(-90deg); }
.ts-section--collapsed .ts-section__icon { background: #f4f6fb; }

/* Trik grid-template-rows (1fr <-> 0fr), sama seperti pohon Unit Kerja —
   transisi tinggi mulus untuk konten dinamis tanpa perlu JS mengukur tinggi. */
.ts-section__body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.ts-section--collapsed .ts-section__body {
  grid-template-rows: 0fr;
}
.ts-section__body-inner {
  overflow: hidden;
  min-height: 0;
}
.ts-section__body-content {
  padding: 0 1.35rem 1.5rem;
  border-top: 1px solid #f0f2f7;
  padding-top: 1.35rem;
}

@media (prefers-reduced-motion: reduce) {
  .ts-section__body, .ts-section__chevron { transition: none; }
}

/* ---------- Repeater: animasi masuk/keluar ---------- */
@keyframes tsRepeaterIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.repeater-row, .repeater-slide {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, box-shadow 0.2s ease, margin 0.35s ease, padding 0.35s ease;
}
.repeater-row.ts-just-added, .repeater-slide.ts-just-added {
  animation: tsRepeaterIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.repeater-row:hover, .repeater-slide:hover {
  border-color: #dde2ee;
}
.repeater-row.ts-removing, .repeater-slide.ts-removing {
  opacity: 0;
  transform: translateX(12px) scale(0.97);
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  max-height: 0 !important;
  border-width: 0 !important;
  overflow: hidden;
}

/* ---------- Preview gradasi hidup ---------- */
.ts-gradient-preview {
  height: 64px;
  border-radius: 12px;
  border: 1px solid #dfe3ec;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.ts-gradient-preview__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* ---------- Dropzone unggah gambar (drag & drop sungguhan) ---------- */
.ts-upload {
  position: relative;
  border: 1.5px dashed #dbe0ea;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
  background: #fbfcfe;
}
.ts-upload:hover { border-color: var(--navy-700); }
.ts-upload--dragover {
  border-color: var(--gold-500);
  background: #fffaf0;
}
.ts-upload__icon {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.ts-upload--dragover .ts-upload__icon { color: var(--gold-500); }
.ts-upload__text {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.ts-upload input[type="file"] {
  font-size: 0.78rem;
}

/* ---------- Sticky save bar ---------- */
.ts-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid #eef0f5;
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.25rem;
  margin-top: 1.25rem;
  box-shadow: 0 -6px 24px rgba(15, 31, 61, 0.08);
}
.ts-save-bar__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ts-save-bar__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(242, 169, 0, 0.18);
  flex-shrink: 0;
  animation: tsPulseDot 2s ease-in-out infinite;
}
@keyframes tsPulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .ts-save-bar__dot { animation: none; }
}

/* ============================================================
   NOTIFIKASI — lonceng topbar (dropdown) & halaman daftar lengkap
   ============================================================ */

/* ---------- Lonceng & badge ---------- */
.ntf-bell .btn {
  position: relative;
}
.ntf-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
  animation: ntfBadgeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ntfBadgeIn {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* ---------- Dropdown ---------- */
.ntf-dropdown {
  width: 340px;
  max-width: 90vw;
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 48px rgba(15, 31, 61, 0.18);
  overflow: hidden;
}
.ntf-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #eef0f5;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--navy-900);
}
.ntf-dropdown__header form { margin: 0; }
.ntf-dropdown__markall {
  border: none;
  background: none;
  color: var(--navy-700);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0;
}
.ntf-dropdown__markall:hover { text-decoration: underline; }

.ntf-dropdown__list {
  max-height: 360px;
  overflow-y: auto;
}
.ntf-dropdown__empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.ntf-item {
  display: flex;
  gap: 0.7rem;
  padding: 0.75rem 1.1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f5f6fa;
  transition: background 0.15s ease;
}
.ntf-item:hover { background: #f8f9fc; color: inherit; }
.ntf-item--unread { background: #fff9ec; }
.ntf-item--unread:hover { background: #fff4e0; }

.ntf-item__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef1f8;
  color: var(--navy-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.ntf-item--unread .ntf-item__icon { background: var(--gold-500); color: var(--navy-900); }

.ntf-item__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ntf-item__judul {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ntf-item__pesan {
  font-size: 0.76rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ntf-item__waktu {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 0.15rem;
}

.ntf-dropdown__footer {
  display: block;
  text-align: center;
  padding: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-800);
  background: #f8f9fc;
  text-decoration: none;
}
.ntf-dropdown__footer:hover { background: #f0f2f7; color: var(--navy-900); }

/* ---------- Halaman daftar lengkap (notifikasi_index.php) ---------- */
.ntf-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}
.ntf-row:hover { background: #f8f9fc; color: inherit; }
.ntf-row--unread { background: #fff9ec; }
.ntf-row--unread:hover { background: #fff4e0; }
.ntf-row__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.ntf-row__judul { font-weight: 700; font-size: 0.9rem; color: #1f2937; }
.ntf-row__pesan { font-size: 0.82rem; color: var(--text-muted); }
.ntf-row__waktu { font-size: 0.76rem; color: #9ca3af; flex-shrink: 0; white-space: nowrap; }
.ntf-row__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-500);
  flex-shrink: 0;
}

@media (max-width: 575.98px) {
  .ntf-dropdown { width: 300px; }
  .ntf-row__waktu { display: none; }
}

/* ============================================================
   DASHBOARD (redesain role-aware)
   Hero sapaan, grid kartu statistik auto-fit, grafik batang 7 hari
   vanilla (tanpa library), panel data terbaru gaya baris ikon.
   ============================================================ */

.db-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1.15rem 1.4rem;
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border: 1px solid rgba(15, 31, 61, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.db-hero__sapaan {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
}
.db-hero__role {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: #e8ecf5;
  color: var(--navy-800);
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
}
.db-hero__tanggal {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.db-hero__notif {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #fff9ec;
  color: #b8630a;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.db-hero__notif:hover { background: #ffe9c2; color: #b8630a; transform: translateY(-1px); }

/* ---------- Grid kartu statistik ---------- */
.db-kartu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.db-kartu-grid a.pg-stat-card { text-decoration: none; color: inherit; }

/* ---------- Grafik batang 7 hari ---------- */
.db-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  height: 160px;
  padding-top: 1.5rem;
}
.db-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.db-chart__bar-track {
  flex: 1;
  width: 100%;
  max-width: 40px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.db-chart__bar {
  width: 100%;
  height: 0%;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--gold-500) 0%, var(--gold-400) 100%);
  position: relative;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 3px;
}
.db-chart__bar-nilai {
  position: absolute;
  top: -1.35rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 700;
  color: #6b7280;
  white-space: nowrap;
}
.db-chart__label {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- Grid panel data terbaru ---------- */
.db-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1rem;
}
.db-panel__icon-text--navy   { color: var(--navy-800); }
.db-panel__icon-text--teal   { color: #0d9488; }
.db-panel__icon-text--blue   { color: #2563eb; }
.db-panel__icon-text--amber  { color: #d97706; }
.db-panel__icon-text--purple { color: #7c3aed; }
.db-panel__icon-text--rose   { color: #db2777; }

.db-row-list { display: flex; flex-direction: column; gap: 0.15rem; }
.db-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.5rem;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}
a.db-row:hover { background: #f8f9fc; color: inherit; }
.db-row__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.db-row__judul {
  font-weight: 700;
  font-size: 0.86rem;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-row__sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-row__waktu {
  font-size: 0.74rem;
  color: #9ca3af;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ---------- Aksi cepat ---------- */
.db-quick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #eef0f5;
}
.db-quick__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

@media (max-width: 575.98px) {
  .db-hero { flex-direction: column; align-items: flex-start; }
  .db-chart { height: 130px; }
  .db-chart__bar-nilai { display: none; }
}

/* ============================================================
   MODAL BERSAMA (Fase 3 — Pegawai/Pengguna/Roles/Menus)
   Header gradien navy (tambah/edit) atau rose (hapus/peringatan),
   sudut membulat, animasi scale-in halus menimpa default Bootstrap.
   ============================================================ */
.pg-modal .modal-content {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 31, 61, 0.22);
}
.pg-modal .modal-dialog {
  transform: scale(0.94) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}
.pg-modal.show .modal-dialog { transform: scale(1) translateY(0); }
.pg-modal .modal-header {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: #fff;
  border: none;
  padding: 1.1rem 1.4rem;
}
.pg-modal .modal-header .modal-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1rem;
}
.pg-modal .modal-header .btn-close { filter: invert(1) grayscale(1) brightness(2); opacity: 0.85; }
.pg-modal .modal-header .btn-close:hover { opacity: 1; }
.pg-modal .modal-body { padding: 1.4rem; }
.pg-modal .modal-footer { border: none; padding: 1rem 1.4rem 1.4rem; }

.pg-modal--danger .modal-header {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}
.pg-modal--wa .modal-header {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}
.pg-modal--wa .pg-modal-icon-wrap { background: #e6fbf5; color: #128c7e; }
.pg-wa-preview {
  background: #e5f5ec;
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  font-size: 0.86rem;
  color: #1f2937;
  white-space: pre-wrap;
  border: 1px solid #cdeedd;
}
.pg-modal--danger .pg-modal-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fde8e8;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1rem;
}

.pg-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.pg-form-grid .pg-form-full { grid-column: 1 / -1; }
.pg-form-grid label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.3rem;
}

@media (max-width: 575.98px) {
  .pg-form-grid { grid-template-columns: 1fr; }
}

/* ---------- Matriks override hak akses (users_akses.php) ---------- */
.pg-akses-table-wrap { overflow-x: auto; }
.pg-akses-table { width: 100%; border-collapse: collapse; }
.pg-akses-table thead th {
  position: sticky;
  top: 0;
  background: var(--navy-900);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.85rem 1rem;
  z-index: 1;
}
.pg-akses-table__menu { text-align: left; min-width: 220px; }
.pg-akses-table tbody tr { transition: background 0.15s ease; }
.pg-akses-table tbody tr:nth-of-type(even) { background: #f8f9fc; }
.pg-akses-table tbody tr:hover { background: #eef1f8; }
.pg-akses-table tbody td { padding: 0.7rem 1rem; border-bottom: 1px solid #eef0f5; }
.pg-akses-table__menu i { color: var(--navy-700); margin-right: 0.4rem; }

.pg-toggle { display: inline-flex; cursor: pointer; }
.pg-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pg-toggle__track {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #d7dbe6;
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.pg-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pg-toggle input:checked ~ .pg-toggle__track { background: #0d9488; }
.pg-toggle input:checked ~ .pg-toggle__track .pg-toggle__thumb { transform: translateX(18px); }
.pg-toggle input:focus-visible ~ .pg-toggle__track { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.pg-toggle--gold input:checked ~ .pg-toggle__track { background: var(--gold-500); }

.pg-menu-indent { display: inline-block; color: #c3c9d6; text-align: center; }

/* ---------- Pengaturan Menu: pohon drag & drop (menus_index.php) ---------- */
.pg-menu-tree, .pg-menu-tree ul { list-style: none; margin: 0; padding: 0; }
.pg-menu-tree { padding: 0.9rem; }

/* Garis penghubung ala tree-view (folder explorer): garis vertikal menyusuri
   sisi kiri daftar anak, dengan cabang horizontal pendek ke tiap baris anak —
   supaya hubungan grup->menu terlihat langsung dari bentuknya, bukan cuma dari
   indentasi/badge. */
.pg-menu-children {
  position: relative;
  padding-left: 2.35rem;
  margin-top: 0.4rem;
  min-height: 0.5rem;
}
.pg-menu-children::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1.05rem;
  width: 1px;
  background: #dde1ec;
}
.pg-menu-children > .pg-menu-item { position: relative; }
.pg-menu-children > .pg-menu-item::before {
  content: "";
  position: absolute;
  top: 1.45rem;
  left: -1.3rem;
  width: 1.3rem;
  height: 1px;
  background: #dde1ec;
}

.pg-menu-item { margin-bottom: 0.45rem; }
.pg-menu-item:last-child { margin-bottom: 0; }
.pg-menu-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: #fff;
  border: 1px solid #eef0f5;
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pg-menu-row:hover { border-color: #d7dbe6; box-shadow: var(--shadow-soft); }

/* Baris Grup dibuat jelas lebih "berat" daripada baris Menu (leaf): tinted
   background + aksen garis kiri navy, supaya grup terbaca sebagai wadah/
   kontainer, bukan item sejajar biasa. */
.pg-menu-item--group > .pg-menu-row {
  background: linear-gradient(90deg, rgba(22, 41, 79, 0.05), rgba(22, 41, 79, 0.015));
  border-color: rgba(22, 41, 79, 0.12);
  box-shadow: inset 3px 0 0 var(--navy-800);
}

.pg-menu-drag-handle {
  cursor: grab;
  color: #b7bccb;
  font-size: 1.05rem;
  flex-shrink: 0;
  touch-action: none;
  line-height: 1;
}
.pg-menu-drag-handle:hover { color: var(--navy-700); }
.pg-menu-drag-handle:active { cursor: grabbing; }

/* Ikon jadi badge bulat kecil: varian Grup (navy solid, lebih besar — kesan
   "folder"/wadah) vs varian Menu/leaf (outline tipis, lebih kecil — kesan item
   biasa di dalamnya). Perbedaan ini yang paling cepat ditangkap mata sebelum
   sempat membaca teks/badge sama sekali. */
.pg-menu-row__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
}
.pg-menu-row__icon--group {
  width: 30px;
  height: 30px;
  background: var(--navy-800);
  color: #fff;
  font-size: 0.95rem;
}
.pg-menu-row__icon--leaf {
  width: 24px;
  height: 24px;
  background: #f1f3f8;
  color: var(--navy-700);
  font-size: 0.8rem;
}

.pg-menu-row__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.pg-menu-row__nama { font-weight: 700; color: #1f2937; }
.pg-menu-item--group > .pg-menu-row .pg-menu-row__nama {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  color: var(--navy-900);
}
.pg-menu-row__slug {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: #f1f3f8;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-family: monospace;
}
.pg-menu-row__url { font-size: 0.76rem; color: var(--text-muted); }
.pg-menu-row__actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; margin-left: auto; }

@media (max-width: 575.98px) {
  .pg-menu-row { flex-wrap: wrap; }
  .pg-menu-row__url { display: none; }
  .pg-menu-children { padding-left: 1.5rem; }
  .pg-menu-children::before { left: 0.6rem; }
  .pg-menu-children > .pg-menu-item::before { left: -0.9rem; width: 0.9rem; }
}

/* Status simpan urutan (pill kecil di sebelah judul toolbar) */
.pg-menu-savestate {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: #f4f6fb;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.pg-menu-savestate--show { opacity: 1; transform: translateY(0); }
.pg-menu-savestate--saving { background: #fff4e0; color: #b8630a; }
.pg-menu-savestate--saved { background: #e6fbf5; color: #0d9488; }
.pg-menu-savestate--error { background: #fde8e8; color: #dc2626; }
.pg-menu-savestate .spinner-border { width: 0.8rem; height: 0.8rem; border-width: 2px; }

/* SortableJS: kelas ditempel di <li class="pg-menu-item"> yang sedang diseret */
.pg-menu-item.sortable-chosen > .pg-menu-row {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(242, 169, 0, 0.15);
}
.pg-menu-item.sortable-ghost > .pg-menu-row {
  opacity: 0.35;
  border-style: dashed;
}
.pg-menu-item.sortable-drag > .pg-menu-row {
  box-shadow: var(--shadow-card);
}
.pg-menu-children.pg-menu-list--dragover {
  background: rgba(242, 169, 0, 0.06);
  border-radius: var(--radius-md);
  outline: 1px dashed rgba(242, 169, 0, 0.4);
  outline-offset: 4px;
}

/* ============================================================
   HALAMAN OPERASIONAL ADMIN (Fase 4 — Buku Tamu/Surat Masuk/Izin Lokasi)
   Toolbar filter, grid kartu chart, panel detail read-only (label/value),
   kartu riwayat disposisi.
   ============================================================ */
.pg-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
}
.pg-filter-bar > * { flex: 1 1 160px; min-width: 140px; }
.pg-filter-bar__submit { flex: 0 0 auto !important; min-width: 0 !important; }

.pg-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.pg-detail-hero__judul { font-weight: 800; font-size: 1.15rem; color: #111827; }
.pg-detail-hero__nomor { font-size: 0.8rem; color: var(--text-muted); font-family: monospace; }

.pg-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem 1.5rem;
}
.pg-detail-item__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.pg-detail-item__value { font-size: 0.92rem; color: #1f2937; }
.pg-detail-item--full { grid-column: 1 / -1; }

.pg-disposisi-card {
  border: 1px solid #eef0f5;
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.7rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pg-disposisi-card:hover { border-color: #dde1ec; box-shadow: var(--shadow-soft); }
.pg-disposisi-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.pg-disposisi-card__nama { font-weight: 700; font-size: 0.88rem; color: #1f2937; }
.pg-disposisi-card__jabatan { font-size: 0.76rem; color: var(--text-muted); }
.pg-disposisi-card__isi { font-size: 0.84rem; color: #374151; margin-top: 0.5rem; }
.pg-disposisi-card__waktu { font-size: 0.72rem; color: #9ca3af; margin-top: 0.35rem; }

@media (max-width: 767.98px) {
  .pg-detail-grid { grid-template-columns: 1fr; }
  .pg-filter-bar > * { flex: 1 1 100%; }
}

/* ============================================================
   LAPORAN (Fase 5 — Surat Masuk / Buku Tamu / Izin Lokasi)
   Rekap breakdown bar horizontal per kategori.
   ============================================================ */
.lap-rekap { display: flex; flex-direction: column; gap: 0.65rem; }
.lap-rekap__row { display: grid; grid-template-columns: 130px 1fr 40px; align-items: center; gap: 0.75rem; }
.lap-rekap__label { font-size: 0.8rem; font-weight: 700; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lap-rekap__track { height: 10px; border-radius: 999px; background: #eef0f5; overflow: hidden; }
.lap-rekap__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
  width: 0%;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.lap-rekap__nilai { font-size: 0.82rem; font-weight: 800; color: #111827; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 575.98px) {
  .lap-rekap__row { grid-template-columns: 90px 1fr 32px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
  .ts-hub-grid { grid-template-columns: 1fr; }
  .ts-hub-card--wide { grid-column: auto; }
  .ts-hero { flex-wrap: wrap; }
  .ts-hero__back { margin-left: 0; order: 3; width: 100%; }
  .ts-save-bar { flex-direction: column; align-items: stretch; text-align: center; }
}
