/* =====================================================================
   APP MÓVIL: página de instalación y ajustes para la app instalada
   ===================================================================== */

/* ---------- página "App móvil" ---------- */
.am-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.am-icono { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 12px 30px -12px rgba(34, 81, 255, .7); flex: none; }
.am-hero-txt { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.am-hero-txt h2 { margin: 0; font-size: 22px; }
.am-hero-txt p { margin: 0; color: var(--text-2); line-height: 1.5; }
.am-url { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.am-url code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.am-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 550; font-size: 14px; }
.am-ok .ico { width: 16px; height: 16px; }
.am-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.am-qr[hidden] { display: none; }
.am-qr-img { width: 148px; height: 148px; padding: 8px; background: #fff; border-radius: 12px; }
.am-qr-img svg { width: 100%; height: 100%; display: block; }
.am-qr small { color: var(--muted); max-width: 170px; }

.am-tabs { align-self: flex-start; }
.am-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.am-tabs .ico { width: 15px; height: 15px; }

.am-pasos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: paso; }
.am-paso { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); animation: aparece .35s var(--ease-out, ease) both; }
.am-paso:nth-child(2) { animation-delay: .04s; } .am-paso:nth-child(3) { animation-delay: .08s; }
.am-paso:nth-child(4) { animation-delay: .12s; } .am-paso:nth-child(5) { animation-delay: .16s; }
.am-num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: #2251FF; }
.am-paso-txt { flex: 1; min-width: 0; }
.am-paso-txt b { font-size: 15px; }
.am-paso-txt p { margin: 3px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.am-alerta { display: block; margin-top: 4px; color: var(--warn); font-weight: 550; }
.am-visual { flex: none; }
.am-boton { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #0a84ff; background: var(--surface-2); border: 1px solid var(--border); }
.am-boton svg { width: 24px; height: 24px; }
.am-fila { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 550; white-space: nowrap; }
.am-fila svg { width: 20px; height: 20px; color: var(--text-2); }
.am-chip { display: inline-block; padding: 7px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 600; white-space: nowrap; }
.am-chip-azul { color: #0a84ff; }
.am-icono-mini { width: 44px; height: 44px; border-radius: 11px; display: block; }


@media (max-width: 620px) {
  .am-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .am-url { justify-content: center; }
  .am-paso { display: grid; grid-template-columns: 34px 1fr; gap: 10px 14px; align-items: start; }
  .am-visual { grid-column: 2; }
}

/* ---------- app instalada en el iPhone: respetar la muesca y la barra de inicio ---------- */
@supports (padding: env(safe-area-inset-top)) {
  @media (max-width: 860px) {
    [data-tema] .topbar { padding-top: calc(10px + env(safe-area-inset-top)); }
    [data-tema] .sidebar { padding-top: calc(20px + env(safe-area-inset-top)); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
    .auth-side { padding-top: calc(28px + env(safe-area-inset-top)); }
    .page { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
    .topbar, .page { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  }
  #toasts { bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* ---------- logotipo "H" ---------- */
.brand .logo { width: 28px; height: 28px; border-radius: 8px; flex: none; display: block; }
.brand-lg .logo { width: 44px; height: 44px; border-radius: 12px; }
.brand-sm .logo { width: 26px; height: 26px; border-radius: 7px; }
