/* ============================================================================
   SIPADU DUKCAPIL KABUPATEN MINAHASA - DESIGN STYLESHEET
   Sistem Pelacakan Dokumen Real-time & WebGIS Spasial
   Warna Utama: Crimson Maroon Minahasa (#850E17) & Emas (#D4AF37)
   Tipografi: Plus Jakarta Sans & Playfair Display
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@1,600;1,700&display=swap');

:root {
  --primary: #850E17;
  --primary-dark: #58080E;
  --primary-light: #A51722;
  --primary-subtle: #FDF2F3;
  --primary-glow: rgba(133, 14, 23, 0.20);
  --primary-glow-lg: rgba(133, 14, 23, 0.34);
  --accent-gold: #D4AF37;
  --accent-gold-light: #FBF4DC;
  --text-dark: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --bg-light: #F8FAFC;
  --bg-card: #FFFFFF;
  --border-color: #E2E8F0;
  --border-subtle: rgba(226, 232, 240, 0.9);
  --shadow-xs: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-sm: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 28px -4px rgba(133, 14, 23, 0.10), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 22px 44px -8px rgba(133, 14, 23, 0.16), 0 8px 16px -4px rgba(15, 23, 42, 0.05);
  --shadow-float: 0 32px 64px -12px rgba(15, 23, 42, 0.24);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 9999px;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ============================================================================
   LENIS SMOOTH SCROLL INTEGRATION STYLES
   ============================================================================ */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.65;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(133, 14, 23, 0.14);
  color: var(--primary-dark);
}

/* ============================================================================
   GSAP WORD-BY-WORD REVEAL TYPOGRAPHY
   ============================================================================ */
.word-reveal-item {
  display: inline-block;
  will-change: transform, opacity, filter;
  transform-origin: center bottom;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* ============================================================================
   TOPBAR & NAVBAR UTAMA (GLASSMORPHIC)
   ============================================================================ */
.topbar-dukcapil {
  background: linear-gradient(135deg, rgba(72, 6, 11, 0.97) 0%, rgba(133, 14, 23, 0.95) 55%, rgba(162, 18, 30, 0.93) 100%);
  color: #FFFFFF;
  padding: 13px 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  position: sticky;
  top: 0;
  z-index: 1050;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: padding 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.topbar-dukcapil.scrolled {
  padding: 9px 0;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.28);
  border-bottom-color: rgba(212, 175, 55, 0.38);
}

.topbar-dukcapil > .container,
.topbar-dukcapil > .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #FFFFFF;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-out);
}

.brand-wrapper:hover {
  color: #FFFFFF;
  transform: translateY(-1px);
}

.brand-logo-img {
  width: 38px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-heading-gov {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.2;
}

.brand-regency {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.6px;
  line-height: 1.1;
  color: #FFFFFF;
}

.brand-divider {
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  margin: 0 4px;
}

.brand-dept-name {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #FFFFFF;
  text-transform: uppercase;
  line-height: 1.25;
}

.brand-dept-sub {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.25;
}

.nav-links-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 4px;
  margin-left: auto;
}

.nav-item-custom {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  transition: all 0.25s var(--ease-out);
  position: relative;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-item-custom:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.nav-item-custom.active {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.14);
}

.btn-login-officer {
  background: linear-gradient(135deg, #43040A 0%, #2C0206 100%);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(212, 175, 55, 0.42);
  transition: all 0.25s var(--ease-out);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-login-officer:hover {
  background: linear-gradient(135deg, #5A060E 0%, #3A0308 100%);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  border-color: rgba(212, 175, 55, 0.72);
}

/* Admin Navbar Polish */
.navbar.navbar-dark {
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.navbar.navbar-dark .nav-link {
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.95rem !important;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.2s var(--ease-out);
  margin: 0 2px;
}

.navbar.navbar-dark .nav-link:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.14);
}

.navbar.navbar-dark .nav-link.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ============================================================================
   HERO BANNER SECTION
   ============================================================================ */
.hero-dukcapil {
  position: relative;
  background-color: #0F172A;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #FFFFFF;
}

.hero-dukcapil::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.45;
}

.hero-bg-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right 35%;
  filter: brightness(0.92) contrast(1.06);
  transform: scale(1.01);
  transition: transform 7s ease-out;
}

.hero-dukcapil:hover .hero-bg-image {
  transform: scale(1.04);
}

.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg,
      rgba(68, 5, 10, 0.97) 0%,
      rgba(115, 11, 20, 0.90) 42%,
      rgba(133, 14, 23, 0.48) 72%,
      rgba(15, 23, 42, 0.22) 100%);
  z-index: 2;
}

.hero-wave-shape {
  position: absolute;
  right: -8%;
  bottom: -25%;
  width: 55%;
  height: 85%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.22) 0%, rgba(165, 23, 34, 0.35) 55%, transparent 100%);
  border-radius: 50%;
  filter: blur(65px);
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 5;
  padding: 64px 0 76px 0;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 23px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.hero-subtitle-welcome {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  color: var(--accent-gold);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-subtitle-welcome::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), transparent);
}

.hero-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.18;
  color: #FFFFFF;
  margin-bottom: 20px;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 620px;
  line-height: 1.75;
  margin-bottom: 34px;
}

/* White Pill Search Status Button */
.btn-cek-status-white {
  background: #FFFFFF;
  color: #0F172A;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transition: all 0.3s var(--ease-out);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.btn-cek-status-white:hover {
  background: #FFFDFD;
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
}

.btn-cek-status-white i {
  color: var(--primary);
  font-size: 16px;
  transition: transform 0.25s var(--ease-out);
}

.btn-cek-status-white:hover i:last-child {
  transform: translateX(4px);
}

/* Quick Search Card in Hero */
.hero-search-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-xl);
  padding: 30px;
  box-shadow: var(--shadow-float);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.hero-search-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-gold) 100%);
}

.hero-search-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 38px 72px -12px rgba(15, 23, 42, 0.3);
}

.api-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.1);
  color: #065F46;
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.api-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ============================================================================
   STATISTICS & QUICK NUMBERS STRIP
   ============================================================================ */
.stats-strip {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  padding: 40px 0;
  position: relative;
  z-index: 10;
}

.stat-item-box {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s var(--ease-out);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.stat-item-box:hover {
  background: #FFFFFF;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(133, 14, 23, 0.22);
}

.stat-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--primary-subtle);
  color: var(--primary);
  font-size: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.stat-item-box:hover .stat-icon-wrap {
  transform: scale(1.08) rotate(3deg);
}

.stat-number-val {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.stat-label-val {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
}

/* ============================================================================
   2 LAYANAN UTAMA SECTION
   ============================================================================ */
.section-two-services {
  padding: 84px 0;
  background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
  position: relative;
}

.section-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 8px;
}

.section-title-dark {
  font-size: 34px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  line-height: 1.24;
}

.section-desc-muted {
  font-size: 15.5px;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.feature-focus-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: 40px 36px;
  box-shadow: var(--shadow-sm);
  transition: all 0.35s var(--ease-out);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.feature-focus-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #850E17, #D4AF37);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.feature-focus-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(133, 14, 23, 0.25);
}

.feature-focus-card:hover::before {
  opacity: 1;
}

.feature-icon-badge {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: linear-gradient(135deg, #7A0C16 0%, #9E1420 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 30px;
  margin-bottom: 24px;
  box-shadow: 0 12px 24px rgba(133, 14, 23, 0.26);
  transition: transform 0.3s var(--ease-out);
}

.feature-focus-card:hover .feature-icon-badge {
  transform: scale(1.07) rotate(3deg);
}

.feature-card-title {
  font-size: 22.5px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}

.feature-card-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.72;
  margin-bottom: 24px;
}

.btn-primary-maroon {
  background: linear-gradient(135deg, #8E101A 0%, #660810 100%);
  color: #FFFFFF;
  font-size: 14.5px;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: all 0.28s var(--ease-out);
  border: none;
  box-shadow: 0 6px 16px var(--primary-glow);
}

.btn-primary-maroon:hover {
  background: linear-gradient(135deg, #730A13 0%, #4A050B 100%);
  color: #FFFFFF;
  box-shadow: 0 10px 26px var(--primary-glow-lg);
  transform: translateY(-2px);
}

.btn-primary-maroon:active {
  transform: translateY(0);
}

/* ============================================================================
   GLOBAL CARD, TABLE & BADGE POLISH (PUBLIK & ADMIN)
   ============================================================================ */
.card.rounded-4 {
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.table>thead th {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  background-color: #F8FAFC;
  border-bottom: 1px solid var(--border-color);
  padding-top: 13px;
  padding-bottom: 13px;
}

.table>tbody td {
  padding-top: 13px;
  padding-bottom: 13px;
  border-bottom-color: #F1F5F9;
}

.table-hover>tbody>tr:hover>* {
  background-color: rgba(133, 14, 23, 0.025);
}

.font-monospace {
  font-variant-numeric: tabular-nums;
}

/* ============================================================================
   WEBGIS MAP & SPATIAL STYLING
   ============================================================================ */
.map-container-dukcapil {
  height: 520px;
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  z-index: 10;
}

.map-sidebar-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 20px;
  height: 520px;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.map-sidebar-card::-webkit-scrollbar {
  width: 6px;
}

.map-sidebar-card::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 999px;
}

.kecamatan-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.22s var(--ease-out);
  cursor: pointer;
  background: #FFFFFF;
}

.kecamatan-list-item:hover {
  background: var(--primary-subtle);
  border-color: rgba(133, 14, 23, 0.35);
  transform: translateX(4px);
  box-shadow: var(--shadow-xs);
}

.kecamatan-list-item.is-selected {
  background: var(--primary-subtle);
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(133, 14, 23, 0.12);
}

.custom-map-marker-hq {
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-hq-pill {
  background: linear-gradient(135deg, #850E17 0%, #58080E 100%);
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 12px;
  border: 2px solid #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.marker-kecamatan-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 12px;
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.marker-kecamatan-circle:hover {
  transform: scale(1.2);
}

/* Leaflet Popup & Layer Control Polish */
.leaflet-popup-content-wrapper {
  border-radius: 14px !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18) !important;
  border: 1px solid rgba(226, 232, 240, 0.9);
  font-family: var(--font-main) !important;
}

.leaflet-popup-content {
  margin: 14px 16px !important;
  line-height: 1.5 !important;
}

.leaflet-control-layers {
  border-radius: 12px !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 6px 10px !important;
  font-family: var(--font-main) !important;
}

/* ============================================================================
   TRACKING & TIMELINE 5 TAHAP
   ============================================================================ */
.tracking-timeline-5step {
  position: relative;
  padding-left: 50px;
  margin-top: 28px;
}

.tracking-timeline-5step::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 16px;
  bottom: 24px;
  width: 3px;
  background: linear-gradient(180deg, #CBD5E1 0%, #E2E8F0 100%);
  border-radius: 2px;
}

.timeline-step-row {
  position: relative;
  margin-bottom: 28px;
}

.timeline-step-row:last-child {
  margin-bottom: 0;
}

.timeline-step-icon {
  position: absolute;
  left: -50px;
  top: 2px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #94A3B8;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border: 3px solid #FFFFFF;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
  z-index: 2;
  transition: all 0.35s var(--ease-out);
}

/* Completed Step */
.timeline-step-row.completed .timeline-step-icon {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%);
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.18);
}

/* Active Step */
.timeline-step-row.active .timeline-step-icon {
  background: linear-gradient(135deg, #8E101A 0%, #58080E 100%);
  box-shadow: 0 0 0 7px var(--primary-glow);
  animation: pulse-node 2.2s infinite;
}

@keyframes pulse-node {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(133, 14, 23, 0.55);
  }

  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 12px rgba(133, 14, 23, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(133, 14, 23, 0);
  }
}

.timeline-card-content {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-xs);
  transition: all 0.3s var(--ease-out);
}

.timeline-step-row.active .timeline-card-content {
  border-color: rgba(133, 14, 23, 0.35);
  box-shadow: var(--shadow-md);
  background: linear-gradient(180deg, #FFFDFD 0%, #FDF2F3 100%);
}

.timeline-step-row.completed .timeline-card-content {
  border-left: 4px solid #059669;
}

/* Verification Officer Signature Box */
.officer-signature-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #F8FAFC;
  border-radius: var(--radius-md);
  border: 1px dashed #CBD5E1;
  margin-top: 14px;
  font-size: 12.5px;
}

.officer-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid rgba(133, 14, 23, 0.15);
}

/* Result Finished Card */
.finished-document-box {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 1.5px solid #6EE7B7;
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 28px;
  box-shadow: 0 14px 32px rgba(5, 150, 105, 0.12);
}

/* ============================================================================
   FORMS & INPUTS
   ============================================================================ */
.form-control,
.form-select {
  border-radius: 10px;
  border-color: #CBD5E1;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(133, 14, 23, 0.14);
}

.form-control-custom,
.form-select-custom {
  border-radius: var(--radius-md);
  border: 1.5px solid #CBD5E1;
  padding: 13px 18px;
  font-size: 15px;
  transition: all 0.25s var(--ease-out);
  background-color: #FFFFFF;
}

.form-control-custom:focus,
.form-select-custom:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4.5px var(--primary-glow);
  outline: none;
}

.form-label-custom {
  font-weight: 700;
  font-size: 13px;
  color: #334155;
  margin-bottom: 7px;
}

/* Flow Step Card (1-5 Tahapan) */
.flow-step-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  border: 1px solid var(--border-subtle);
  height: 100%;
  box-shadow: var(--shadow-xs);
  transition: all 0.3s var(--ease-out);
}

.flow-step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(133, 14, 23, 0.25);
}

.flow-step-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #850E17 0%, #6E0911 100%);
  color: #FFFFFF;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(133, 14, 23, 0.3);
}

/* ============================================================================
   FOOTER RESMI
   ============================================================================ */
.footer-dukcapil {
  background: radial-gradient(circle at top right, rgba(133, 14, 23, 0.22), transparent 45%), #0B0F19;
  color: #94A3B8;
  padding: 72px 0 30px 0;
  font-size: 14px;
  border-top: 4px solid var(--primary);
  position: relative;
  z-index: 10;
}

.footer-dukcapil h5 {
  color: #FFFFFF;
  font-weight: 700;
  margin-bottom: 20px;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.footer-link-item {
  color: #94A3B8;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  transition: color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.footer-link-item:hover {
  color: #FFFFFF;
  transform: translateX(4px);
}

.footer-bottom-line {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 48px;
  padding-top: 26px;
  text-align: center;
  font-size: 13px;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS (DESKTOP >= 992px TETAP UTUH)
   ============================================================================ */
.mobile-nav-toggle {
  display: none;
}

@media (min-width: 992px) {
  .topbar-dukcapil > .container,
  .topbar-dukcapil > .container-fluid {
    flex-wrap: nowrap !important;
  }
}

@media (max-width: 1199.98px) {
  .brand-divider,
  .brand-dept-block {
    display: none !important;
  }
}

/* ============================================================================
   TAMPILAN TABLET & HANDPHONE (max-width: 991.98px)
   ============================================================================ */
@media (max-width: 991.98px) {
  /* 1. Pencegahan Horizontal Overflow Global */
  html,
  body {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .container,
  .container-fluid,
  .card,
  form,
  table,
  .map-container-dukcapil,
  .map-sidebar-card {
    max-width: 100%;
  }

  /* 2. Header & Menu Navigasi Hamburger ala Referensi */
  .topbar-dukcapil {
    padding: 12px 0;
  }

  .topbar-dukcapil > .container,
  .topbar-dukcapil > .container-fluid {
    flex-wrap: wrap !important;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
  }

  .mobile-nav-toggle:hover,
  .mobile-nav-toggle:focus {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
  }

  /* Hilangkan scroll horizontal & ubah menjadi dropdown vertikal penuh */
  .nav-links-wrap {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: 12px;
    margin-left: 0;
    padding: 12px;
    gap: 6px;
    background: linear-gradient(180deg, #58080E 0%, #43040A 100%);
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.28);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.35);
    overflow-x: visible;
  }

  .nav-links-wrap.is-open {
    display: flex;
    animation: mobileMenuFadeDown 0.22s var(--ease-out);
  }

  @keyframes mobileMenuFadeDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-links-wrap .nav-item-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 11px 16px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    border: none;
  }

  .nav-links-wrap .nav-item-custom i {
    font-size: 17px;
    width: 22px;
    text-align: center;
    margin-right: 0 !important;
  }

  .nav-links-wrap .nav-item-custom:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
  }

  /* Item aktif pill merah terang seperti referensi */
  .nav-links-wrap .nav-item-custom.active {
    background: linear-gradient(135deg, #C81E2B 0%, #A51722 100%);
    color: #FFFFFF;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  }

  .nav-links-wrap .btn-login-officer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    margin-left: 0 !important;
    margin-top: 6px;
    padding: 11px 16px;
    border-radius: 12px;
    font-size: 14.5px;
  }

  /* Navbar Admin Mobile Seragam */
  .navbar.navbar-dark .navbar-collapse {
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(180deg, #58080E 0%, #43040A 100%);
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.28);
  }

  .navbar.navbar-dark .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 16px !important;
    border-radius: 12px;
    margin: 2px 0;
  }

  .navbar.navbar-dark .nav-link.active {
    background: linear-gradient(135deg, #C81E2B 0%, #A51722 100%);
  }

  /* 3. Hero & Lacak Resi Cepat */
  .hero-dukcapil {
    min-height: auto;
  }

  .hero-overlay-gradient {
    background: linear-gradient(180deg,
        rgba(68, 5, 10, 0.96) 0%,
        rgba(115, 11, 20, 0.92) 55%,
        rgba(68, 5, 10, 0.96) 100%);
  }

  .hero-content {
    padding: 44px 0 54px 0;
  }

  .hero-title {
    font-size: 32px;
    line-height: 1.24;
  }

  .section-title-dark {
    font-size: 27px;
  }

  /* 4. WebGIS & Sidebar Kecamatan */
  .map-container-dukcapil {
    height: 360px;
  }

  .map-sidebar-card {
    height: auto;
    max-height: 380px;
    margin-top: 16px;
  }

  .kecamatan-list-item {
    min-height: 46px;
    padding: 12px 14px;
  }

  .leaflet-control-layers {
    max-width: calc(100vw - 48px);
    font-size: 12px;
  }

  .leaflet-control-layers-expanded {
    max-height: 210px;
    overflow-y: auto;
  }
}

/* ============================================================================
   TRANSFORMASI TABEL ADMIN MENJADI KARTU RINGKAS (< 768px)
   ============================================================================ */
@media (max-width: 767.98px) {
  .admin-mobile-cards-table {
    border: 0;
  }

  .admin-mobile-cards-table thead {
    display: none;
  }

  .admin-mobile-cards-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background-color: #F8FAFC;
  }

  .admin-mobile-cards-table tbody tr {
    display: block;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }

  .admin-mobile-cards-table tbody tr td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed #E2E8F0;
    text-align: right;
    font-size: 13px;
  }

  .admin-mobile-cards-table tbody tr td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #64748B;
    text-align: left;
    flex-shrink: 0;
    padding-top: 2px;
  }

  /* Baris kosong (colspan) tetap rata tengah */
  .admin-mobile-cards-table tbody tr td[colspan] {
    display: block;
    text-align: center;
    border-bottom: none;
    padding: 20px 8px;
  }

  .admin-mobile-cards-table tbody tr td[colspan]::before {
    display: none;
  }

  /* Baris Aksi (Update Tahap) menjadi tombol penuh mudah ditekan */
  .admin-mobile-cards-table tbody tr td:last-child {
    border-bottom: none;
    padding-top: 12px;
    padding-bottom: 2px;
    justify-content: stretch;
  }

  .admin-mobile-cards-table tbody tr td:last-child::before {
    display: none;
  }

  .admin-mobile-cards-table tbody tr td:last-child .btn {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13.5px;
  }
}

/* ============================================================================
   DETAIL EKSTRA HANDPHONE KECIL (max-width: 575.98px)
   ============================================================================ */
@media (max-width: 575.98px) {
  .brand-logo-img {
    width: 34px;
    height: 40px;
  }

  .brand-regency {
    font-size: 16.5px;
  }

  .hero-content {
    padding: 34px 0 46px 0;
  }

  .hero-tagline {
    font-size: 18px;
    margin-bottom: 6px;
  }

  .hero-subtitle-welcome {
    font-size: 11px;
    letter-spacing: 1.5px;
  }

  .hero-title {
    font-size: 25px;
    line-height: 1.26;
    margin-bottom: 14px;
  }

  .hero-desc {
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 24px;
  }

  /* Tombol aksi hero stack rapi */
  .hero-content .d-flex.flex-wrap.gap-3 {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .btn-cek-status-white,
  .hero-content .btn-outline-light {
    width: 100%;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Card Lacak Resi Cepat */
  .hero-search-card {
    padding: 20px 18px;
    border-radius: 18px;
  }

  .hero-search-card .form-control-custom {
    font-size: 15px !important;
    padding: 11px 14px !important;
  }

  .hero-search-card .btn-primary-maroon {
    min-height: 46px;
    font-size: 14px;
  }

  /* Statistik & Kartu Layanan 1 Kolom Penuh */
  .stats-strip {
    padding: 28px 0;
  }

  .stats-strip .row > [class*="col-"] {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }

  .stat-item-box {
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 15px 16px;
    gap: 14px;
  }

  .stat-icon-wrap {
    width: 48px;
    height: 48px;
    font-size: 21px;
    border-radius: 13px;
  }

  .stat-number-val {
    font-size: 24px;
  }

  .stat-label-val {
    font-size: 12.5px;
  }

  .section-two-services {
    padding: 52px 0;
  }

  .section-title-dark {
    font-size: 23px;
  }

  .feature-focus-card {
    padding: 26px 20px;
    border-radius: 18px;
  }

  .feature-icon-badge {
    width: 56px;
    height: 56px;
    font-size: 24px;
    border-radius: 15px;
    margin-bottom: 18px;
  }

  .feature-card-title {
    font-size: 19px;
  }

  /* Peta WebGIS di layar HP kecil */
  .map-container-dukcapil {
    height: 340px;
  }

  .marker-hq-pill {
    font-size: 10.5px;
    padding: 5px 10px;
  }

  /* Header & Filter Dashboard Admin */
  .admin-dashboard-header {
    flex-direction: column;
    align-items: stretch !important;
  }

  .admin-dashboard-header .btn {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}