/* ════════════════════════════════════════════════════════════════
   Warga Landing Page
   File: /assets/css/warga/warga-index.css
   Dipakai oleh: index.php
   ════════════════════════════════════════════════════════════════ */
/* Hamburger toggle untuk navbar tamu — match style warga (kotak putih solid) */
@media (max-width: 880px) {
  .navbar .nav-toggle {
    background: #fff !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 11px !important;
    color: #1d4ed8 !important;
    font-size: 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    transition: transform .15s;
    padding: 0 !important;
  }
  .navbar .nav-toggle:active {
    transform: scale(.94);
  }

  /* ── Fix: logo/brand dan hamburger tidak ketengah di mobile ── */
  /* Padding navbar lebih ringkas + brand mepet kiri, hamburger mepet kanan */
  .navbar-inner {
    padding: 0 12px !important;
    gap: 8px !important;
  }
  .navbar-brand {
    gap: 10px !important;
    margin-right: auto !important;     /* dorong brand mepet kiri */
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }
  .brand-text {
    min-width: 0 !important;
  }
  .brand-text strong,
  .brand-text span {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .navbar .nav-toggle {
    margin-left: auto !important;       /* dorong hamburger mepet kanan */
    flex-shrink: 0 !important;
  }
}

/* ── Mobile kecil (< 480px): padding lebih ketat ── */
@media (max-width: 480px) {
  .navbar-inner {
    padding: 0 10px !important;
  }
  .navbar-brand {
    gap: 8px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE MENU V2 — Premium Guest/Petugas Sidebar
   ═══════════════════════════════════════════════════════════════ */
.nav-mobile-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  z-index: 9998;
  display: block !important;
}
.nav-mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile-menu.nmm-v2 {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: auto;
  width: min(340px, 90vw);
  height: 100vh;
  background: #f8fafc;
  z-index: 9999;
  display: flex !important;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  box-shadow: -12px 0 50px rgba(15, 23, 42, .25);
  overflow: hidden;
  padding: 0;
  gap: 0;
}
.nav-mobile-menu.nmm-v2.open { transform: translateX(0); }

/* Close button */
.nmm-close-x {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 5;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  transition: all .15s;
}
.nmm-close-x:hover {
  background: rgba(255, 255, 255, .3);
  transform: rotate(90deg);
}

/* HERO */
.nmm-hero {
  position: relative;
  padding: 20px 18px 22px;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}
.nmm-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.nmm-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: .35;
}
.nmm-blob-1 { top: -50px; right: -40px; width: 180px; height: 180px; background: #60a5fa; }
.nmm-blob-2 { bottom: -60px; left: -40px; width: 160px; height: 160px; background: #38bdf8; }
.nmm-pattern {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .15) 1px, transparent 0);
  background-size: 18px 18px;
  opacity: .4;
}

.nmm-logo-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.nmm-logo-box {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .2);
  border: 1.5px solid rgba(255, 255, 255, .3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 6px;
  backdrop-filter: blur(8px);
}
.nmm-logo-box img,
.nmm-logo-box svg {
  width: 100%; height: 100%;
  object-fit: contain;
}
.nmm-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nmm-brand-text strong {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.nmm-brand-text span {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .8);
  font-weight: 500;
  margin-top: 2px;
}

/* Welcome (guest) */
.nmm-welcome {
  position: relative;
}
.nmm-greet-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .2);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.nmm-welcome h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  line-height: 1.15;
  color: #fff;
}
.nmm-welcome p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .85);
  margin: 0;
  font-weight: 500;
  line-height: 1.4;
}

/* User card (petugas logged in) */
.nmm-user-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px;
  padding: 12px 14px;
  backdrop-filter: blur(8px);
}
.nmm-user-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, .3);
}
.nmm-user-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.nmm-user-info small {
  font-size: 10.5px;
  color: rgba(255, 255, 255, .75);
  font-weight: 500;
}
.nmm-user-info strong {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.nmm-user-role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #86efac;
  margin-top: 4px;
}

/* NAV */
.nmm-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  -webkit-overflow-scrolling: touch;
}
.nmm-nav::-webkit-scrollbar { width: 3px; }
.nmm-nav::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.nmm-section {
  padding: 12px 10px 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.nmm-item {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #0f172a !important;
  background: transparent !important;
  border: none !important;
  margin: 0;
  font-weight: 600;
  font-size: 14px;
  transition: all .15s;
  position: relative;
}
.nmm-item:hover {
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
  transform: translateX(2px);
}

.nmm-item-featured {
  background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
  border: 1px solid #bfdbfe !important;
  margin-bottom: 4px;
}
.nmm-item-featured:hover {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe) !important;
}

.nmm-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  transition: all .2s;
}
.nmm-item:hover .nmm-icon { transform: scale(1.05) rotate(-3deg); }
.nmm-i-blue   { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8; }
.nmm-i-violet { background: linear-gradient(135deg, #f5f3ff, #ddd6fe); color: #6d28d9; }
.nmm-i-teal   { background: linear-gradient(135deg, #ccfbf1, #99f6e4); color: #0d9488; }
.nmm-i-cyan   { background: linear-gradient(135deg, #cffafe, #a5f3fc); color: #0891b2; }
.nmm-i-amber  { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; }
.nmm-i-red    { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #be123c; }

.nmm-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.nmm-text strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}
.nmm-text small {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  margin-top: 1px;
}

.nmm-arrow {
  font-size: 11px;
  color: #cbd5e1;
  transition: all .15s;
}
.nmm-item:hover .nmm-arrow {
  color: #2563eb;
  transform: translateX(3px);
}

.nmm-item-danger .nmm-text strong { color: #be123c; }
.nmm-item-danger:hover { background: #fff1f2 !important; }
.nmm-item-danger:hover .nmm-arrow { color: #be123c; }

.nmm-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 6px 8px;
}

/* FOOTER */
.nmm-footer {
  flex-shrink: 0;
  padding: 12px 16px 14px;
  background: linear-gradient(180deg, #fff, #f1f5f9);
  border-top: 1px solid #e2e8f0;
  text-align: center;
}
.nmm-footer-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}
.nmm-footer-tag i { color: #22c55e; font-size: 12px; }
.nmm-footer small {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
}

/* Reset gaya lama */
.nav-mobile-menu.nmm-v2 > a:first-of-type { margin-top: 0; }

