/* ==========================================================================
   App instalável (PWA): convite para instalar e passo a passo
   ========================================================================== */

/* Convite (celular): cartão fixo embaixo */
.pwa-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  display: flex; align-items: center; gap: 12px; max-width: 520px; margin: 0 auto; padding: 12px 10px 12px 12px;
  border-radius: 14px; background: var(--panel-2); border: 1px solid var(--border-2); box-shadow: var(--shadow);
  transform: translateY(calc(100% + 30px)); opacity: 0; transition: transform .38s cubic-bezier(.2, .9, .3, 1.1), opacity .25s;
}
.pwa-banner.show { transform: none; opacity: 1; }
.pwa-banner img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.pwa-b-txt { display: grid; gap: 1px; min-width: 0; flex: 1; line-height: 1.3; }
.pwa-b-txt b { font-size: 14px; }
.pwa-b-txt span { font-size: 12.5px; color: var(--muted); }
.pwa-b-go { flex: none; height: 38px; padding: 0 14px; }
.pwa-b-x { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.pwa-b-x:hover { background: var(--panel-3); color: var(--text); }
.pwa-b-x svg { width: 16px; height: 16px; }
@media (max-width: 360px) {
  .pwa-banner img { display: none; }
  .pwa-b-go { padding: 0 11px; }
}

/* Janela "Instalar o app" */
.pwa-guide { z-index: 150; }
.pwa-guide .modal-card { max-width: 440px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
.pwa-intro { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pwa-intro img { width: 52px; height: 52px; border-radius: 13px; flex: none; }
.pwa-intro b { display: block; font-size: 15px; }
.pwa-intro span { font-size: 13px; color: var(--muted); }

.pwa-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-bottom: 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); }
.pwa-seg button { height: 34px; padding: 0 4px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.pwa-seg button.active { background: var(--panel-3); color: var(--text); }
.pwa-brs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.pwa-brs button { height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--border-2); font-size: 12px; color: var(--text-2); transition: border-color .15s, background .15s, color .15s; }
.pwa-brs button.active { border-color: var(--green); background: var(--green-bg); color: var(--green); }

.pwa-steps { list-style: none; margin: 0 0 18px; padding: 0; counter-reset: pwa; display: grid; gap: 13px; }
.pwa-steps li { counter-increment: pwa; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.pwa-steps li::before {
  content: counter(pwa); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-bg); color: var(--green); font-weight: 700; font-size: 13px;
}
.pwa-steps li.done::before { content: '\2713'; background: var(--green); color: #03150b; }
.pwa-steps b { color: var(--text); font-weight: 600; }
.pwa-ico {
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin: 0 2px; vertical-align: -7px;
  border-radius: 6px; background: var(--panel-3); border: 1px solid var(--border-2); color: var(--text);
}
.pwa-ico svg { width: 15px; height: 15px; }
.pwa-ico.app { background: none; border: 0; }
.pwa-ico.app img { width: 22px; height: 22px; border-radius: 6px; }

.pwa-note { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; margin-bottom: 14px; border-radius: 8px; background: var(--yellow-bg); color: #f3c776; font-size: 12.5px; line-height: 1.45; }
.pwa-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.pwa-alt { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); text-align: center; }
.pwa-now { margin-bottom: 10px; }
.pwa-now svg, .pwa-copy svg { width: 17px; height: 17px; }
.pwa-copy { margin-bottom: 12px; }

/* Link "Instalar o app" na tela de login */
.auth-install {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px; margin-top: 14px;
  border-radius: var(--radius-sm); border: 1px dashed var(--border-2); color: var(--text-2); font-size: 13.5px; font-weight: 600;
  transition: border-color .15s, color .15s;
}
.auth-install:hover { border-color: var(--green); color: var(--green); }
.auth-install svg { width: 17px; height: 17px; }
