.pwa-launch-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, var(--pwa-start-a, #071834), var(--pwa-start-b, #17386f));
  color: #fff;
  transition: opacity .45s ease, visibility .45s ease;
}

.pwa-launch-screen::before,
.pwa-launch-screen::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 26px;
  transform: rotate(-5deg);
}

.pwa-launch-screen::after {
  inset: 19%;
  border-color: rgba(255,255,255,.08);
  transform: rotate(7deg);
}

.pwa-launch-screen--admin {
  --pwa-start-a: #06142f;
  --pwa-start-b: #203d7d;
  --pwa-accent: #e21f26;
}

.pwa-launch-screen--customer {
  --pwa-start-a: #0b375a;
  --pwa-start-b: #14845c;
  --pwa-accent: #e21f26;
}

.pwa-launch-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pwa-launch-card {
  position: relative;
  z-index: 1;
  width: min(310px, 86vw);
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.pwa-launch-icon-wrap {
  position: relative;
  width: 112px;
  height: 112px;
}

.pwa-launch-icon {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 112px;
  border-radius: 28px;
  box-shadow: 0 24px 54px rgba(0,0,0,.28);
  animation: pwaIconLift 1.8s ease-in-out infinite;
}

.pwa-launch-ring {
  position: absolute;
  inset: -16px;
  border-radius: 35px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: var(--pwa-accent);
  animation: pwaRing 1.1s linear infinite;
}

.pwa-launch-title {
  margin: 10px 0 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0;
}

.pwa-launch-copy {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: .82rem;
  line-height: 1.55;
}

.pwa-launch-progress {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.16);
}

.pwa-launch-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff, var(--pwa-accent));
  animation: pwaProgress 1.35s ease-in-out infinite;
}

.pwa-install-card {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  width: min(330px, calc(100vw - 32px));
  display: none;
  grid-template-columns: 44px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(30,50,104,.16);
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  color: #10234f;
  box-shadow: 0 18px 44px rgba(16,24,39,.18);
  backdrop-filter: blur(14px);
}

.pwa-install-card.is-visible {
  display: grid;
  animation: pwaInstallIn .35s ease both;
}

.pwa-install-card img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
}

.pwa-install-card strong {
  display: block;
  font-size: .78rem;
}

.pwa-install-card small {
  display: block;
  margin-top: 2px;
  color: #65728c;
  font-size: .66rem;
  line-height: 1.35;
}
.pwa-install-card__steps {
  display: block;
  margin-top: 8px;
  padding: 8px 9px;
  border-radius: 8px;
  background: #f4f7ff;
  color: #203d7d;
  font-size: .66rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-line;
}

.pwa-install-card__steps[hidden] {
  display: none;
}

.pwa-install-card button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: #e21f26;
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  cursor: pointer;
}

.pwa-install-card [data-pwa-dismiss] {
  width: 28px;
  min-height: 28px;
  padding: 0;
  background: #eef2ff;
  color: #203d7d;
}

.pwa-download-panel {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(30,50,104,.14);
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f7ff 100%);
  color: #10234f;
  box-shadow: 0 14px 34px rgba(16,24,39,.1);
}

.pwa-download-panel--admin {
  border-color: rgba(226,31,38,.24);
  background: linear-gradient(135deg, #ffffff 0%, #f7f9ff 58%, #fff1f2 100%);
}

.pwa-download-panel--customer {
  border-color: rgba(20,132,92,.22);
  background: linear-gradient(135deg, #ffffff 0%, #eef8f4 100%);
}

.pwa-download-panel--stacked {
  grid-template-columns: 52px minmax(0,1fr);
}

.pwa-download-panel--stacked button {
  grid-column: 1 / -1;
  width: 100%;
}

.pwa-download-panel img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(16,24,39,.16);
}

.pwa-download-panel strong,
.pwa-download-panel span {
  display: block;
}

.pwa-download-panel strong {
  color: #10234f;
  font-size: .8rem;
  font-weight: 850;
}

.pwa-download-panel span {
  margin-top: 3px;
  color: #5b6881;
  font-size: .68rem;
  line-height: 1.45;
}

.pwa-download-panel button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: #e21f26;
  color: #fff;
  font-size: .7rem;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(226,31,38,.2);
}

.pwa-notify-card {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 82;
  width: min(360px, calc(100vw - 32px));
  display: none;
  grid-template-columns: 50px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(18,52,92,.16);
  border-radius: 12px;
  background: #fff;
  color: #10234f;
  box-shadow: 0 22px 58px rgba(16,24,39,.2);
}

.pwa-notify-card.is-visible {
  display: grid;
  animation: pwaInstallIn .35s ease both;
}

.pwa-notify-card__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef8f4, #fff1f2);
}

.pwa-notify-card__icon::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 7px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e21f26;
}

.pwa-notify-card img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.pwa-notify-card strong,
.pwa-notify-card small {
  display: block;
}

.pwa-notify-card strong {
  font-size: .8rem;
  font-weight: 850;
}

.pwa-notify-card small {
  margin-top: 2px;
  color: #65728c;
  font-size: .66rem;
  line-height: 1.35;
}

.pwa-notify-card button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: #12345c;
  color: #fff;
  font-size: .7rem;
  font-weight: 850;
  cursor: pointer;
}

.pwa-notify-card--admin button {
  background: #e21f26;
}

.pwa-notify-card [data-pwa-notify-dismiss] {
  width: 28px;
  min-height: 28px;
  padding: 0;
  background: #eef2ff;
  color: #203d7d;
}

.pwa-download-panel--customer button {
  background: #12345c;
  box-shadow: 0 10px 20px rgba(18,52,92,.18);
}

@keyframes pwaIconLift {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-7px) scale(1.025); }
}

@keyframes pwaRing {
  to { transform: rotate(360deg); }
}

@keyframes pwaProgress {
  0% { transform: translateX(-105%); }
  55%, 100% { transform: translateX(245%); }
}

@keyframes pwaInstallIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (display-mode: standalone) {
  .pwa-install-card,
  .pwa-download-panel { display: none !important; }
}

@media (max-width: 560px) {
  .pwa-install-card {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  .pwa-notify-card {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    grid-template-columns: 46px minmax(0, 1fr) auto;
  }

  .pwa-notify-card [data-pwa-notify-dismiss] {
    grid-column: 3;
  }

  .pwa-download-panel {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .pwa-download-panel button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-launch-icon,
  .pwa-launch-ring,
  .pwa-launch-progress span,
  .pwa-install-card.is-visible {
    animation: none;
  }
}
