.alf-pwa-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  margin: 0 0.85rem;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(15, 23, 42, 0.96);
  color: #e2e8f0;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 0.9rem;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.32);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

@media (min-width: 768px) {
  .alf-pwa-banner,
  .alf-pwa-modal {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  #alfSplash {
    display: none !important;
  }
  body.alf-splash-lock {
    overflow: auto !important;
  }
}

.alf-pwa-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

body.alf-pwa-banner-active #mini-live-stats {
  opacity: 0;
  pointer-events: none;
  transform: translateY(150%) !important;
}

body.portal-category-open .alf-pwa-banner {
  opacity: 0;
  pointer-events: none;
  transform: translateY(120%) !important;
}

.alf-pwa-banner-icon {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.6rem;
  object-fit: contain;
  background: #fff;
  padding: 0.2rem;
  flex-shrink: 0;
}

.alf-pwa-banner-text {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.alf-pwa-banner-text strong {
  display: block;
  color: #fff;
  font-size: 0.78rem;
  margin-bottom: 0.08rem;
}

.alf-pwa-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  flex-shrink: 0;
}

.alf-pwa-banner-primary {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 0.38rem 0.72rem;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.alf-pwa-banner-dismiss {
  background: transparent;
  color: #94a3b8;
  border: none;
  font-size: 0.62rem;
  cursor: pointer;
  text-align: center;
}

.alf-pwa-banner--update {
  border-color: rgba(16, 185, 129, 0.45);
}

.alf-pwa-banner--update .alf-pwa-banner-primary {
  background: linear-gradient(135deg, #059669, #10b981);
}

.alf-pwa-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.alf-pwa-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.alf-pwa-modal-card {
  width: 100%;
  max-width: 24rem;
  background: #fff;
  border-radius: 1.25rem 1.25rem 1rem 1rem;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.alf-pwa-modal.is-open .alf-pwa-modal-card {
  transform: translateY(0);
}

.alf-pwa-modal-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.alf-pwa-modal-card p,
.alf-pwa-modal-card ol {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #475569;
}

.alf-pwa-modal-card ol {
  padding-left: 1.1rem;
}

.alf-pwa-modal-close {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.7rem;
  border: none;
  border-radius: 9999px;
  background: #4f46e5;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

/* ── SPLASH PEMBUKA PWA / BERANDA ── */
#alfSplash {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.alf-splash-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
  animation: alfSplashPulse 4s ease-in-out infinite;
}

.alf-splash-glow--gold {
  width: 220px;
  height: 220px;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.55) 0%, transparent 70%);
}

.alf-splash-glow--indigo {
  width: 280px;
  height: 280px;
  bottom: 12%;
  right: -40px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.45) 0%, transparent 70%);
  animation-delay: 1.2s;
}

.alf-splash-particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(212, 175, 55, 0.5), transparent),
    radial-gradient(1px 1px at 80% 20%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 60% 70%, rgba(99, 102, 241, 0.4), transparent),
    radial-gradient(1px 1px at 35% 85%, rgba(212, 175, 55, 0.35), transparent);
  opacity: 0.7;
  animation: alfSplashDrift 8s linear infinite;
}

.alf-splash-core {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  animation: alfSplashFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.alf-splash-logo-wrap {
  width: 7.5rem;
  height: 7.5rem;
  margin: 0 auto 1.25rem;
  border-radius: 1.5rem;
  background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.25), 0 20px 50px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: alfSplashLogoIn 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.alf-splash-logo {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.alf-splash-brand {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  animation: alfSplashFadeUp 0.9s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.alf-splash-brand span {
  color: #d4af37;
}

.alf-splash-jargon {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.92);
  line-height: 1.5;
  max-width: 18rem;
  margin-left: auto;
  margin-right: auto;
  animation: alfSplashFadeUp 0.9s 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.alf-splash-arabic {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  color: rgba(226, 232, 240, 0.85);
  direction: rtl;
  letter-spacing: 0.02em;
  animation: alfSplashFadeUp 0.9s 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.alf-splash-loader {
  width: 8.5rem;
  height: 3px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  overflow: hidden;
  animation: alfSplashFadeUp 0.9s 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.alf-splash-loader-bar {
  height: 100%;
  width: 35%;
  border-radius: inherit;
  background: linear-gradient(90deg, #008a3e, #d4af37, #6366f1);
  animation: alfSplashLoad 1.4s ease-in-out infinite;
}

@keyframes alfSplashFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes alfSplashLogoIn {
  from { opacity: 0; transform: scale(0.72); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes alfSplashPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.08); }
}

@keyframes alfSplashDrift {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

@keyframes alfSplashLoad {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
