.tferp-install-button { margin-top: 8px; }
.tferp-install-button[hidden] { display: none !important; }
.user-panel .tferp-install-button { width: 100%; }
.tferp-pwa-dialog {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 24px;
  border: 1px solid var(--erp-border, #d8e0e5);
  border-radius: 18px;
  background: #fff;
  color: var(--erp-text, #17242b);
  box-shadow: 0 20px 70px #17242b30;
  overflow: auto;
}
.tferp-pwa-dialog::backdrop { background: #17242b66; }
.tferp-pwa-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.tferp-pwa-heading img { width: 56px; height: 56px; border-radius: 14px; }
.tferp-pwa-heading h2 { margin: 0 0 4px; font-size: 22px; }
.tferp-pwa-heading p { margin: 0; color: var(--erp-text-muted, #64727c); }
.tferp-pwa-dialog p { overflow-wrap: anywhere; line-height: 1.6; }
.tferp-pwa-host { padding: 12px; border-radius: 10px; background: #eef6f6; }
.tferp-pwa-host strong, .tferp-pwa-host span { display: block; }
.tferp-pwa-host span { margin-top: 4px; font-size: 13px; }
.tferp-pwa-dialog [data-pwa-message] { color: var(--erp-text-muted, #64727c); font-size: 14px; }
.tferp-pwa-dialog [data-pwa-warning] { padding: 10px; background: #fff8ec; border-radius: 10px; }
.tferp-pwa-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.tferp-pwa-update {
  position: fixed;
  z-index: 1400;
  inset: auto 16px max(16px, env(safe-area-inset-bottom)) auto;
  width: min(440px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid #8dbec0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 36px #17242b20;
  color: #17242b;
}
.tferp-pwa-update p { margin: 0 0 12px; line-height: 1.5; }
.tferp-pwa-update [hidden], .tferp-pwa-dialog [hidden], .tferp-pwa-update[hidden] { display: none !important; }
@media print {
  #tferp-pwa-root, .tferp-install-button { display: none !important; }
}
