/* PWA install / update UI */
.pwa-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 1100;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.pwa-install-banner.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.app-body .pwa-install-banner {
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 992px) {
  .app-body .pwa-install-banner {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    left: auto;
    right: 20px;
    width: min(420px, calc(100vw - 40px));
  }
}

.pwa-install-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #1C2428;
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
  direction: rtl;
}
.pwa-install-icon img {
  display: block;
  border-radius: 12px;
  background: #0D7370;
}
.pwa-install-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pwa-install-text strong {
  font-size: .95rem;
}
.pwa-install-desc,
.pwa-install-ios {
  font-size: .78rem;
  line-height: 1.55;
  color: rgba(255,255,255,.78);
}
.pwa-install-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.pwa-install-btn {
  border: 0;
  border-radius: 10px;
  background: #0D7370;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  padding: 8px 14px;
  min-height: 40px;
  cursor: pointer;
  white-space: nowrap;
}
.pwa-install-btn:hover { background: #095E5C; }
.pwa-install-dismiss {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.65);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  align-self: center;
}

.pwa-update-toast {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translate(-50%, -120%);
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #0D7370;
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: transform .28s ease;
  direction: rtl;
}
.pwa-update-toast.show { transform: translate(-50%, 0); }
.pwa-update-btn {
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0D7370;
  font-weight: 800;
  font-size: .78rem;
  padding: 6px 12px;
  cursor: pointer;
}

html[data-theme="dark"] .pwa-install-inner {
  background: #0B1014;
  border-color: rgba(46,196,182,.25);
}
html[data-theme="dark"] .pwa-install-btn {
  background: #2EC4B6;
  color: #06201E;
}

/* Standalone: hide browser-ish chrome if needed */
html.pwa-standalone .status-bar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
