/* Pushfy 2.0, modais pós-login: "Atualize os dados da conta" + "Termos de uso Pushfy" (29/10/2026).
   Usa os tokens do app.css (claro/escuro). Prefixo .tg- (isolado). */
.tg-modal .modal-content.tg-card {
  border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--text);
  box-shadow: 0 30px 80px rgba(10, 16, 34, .28), 0 2px 6px rgba(10, 16, 34, .08); overflow: hidden; position: relative;
}
.tg-dialog-sm { max-width: 520px; }
.tg-dialog-lg { max-width: 860px; }
.tg-modal + .modal-backdrop, .modal-backdrop.show { --bs-backdrop-opacity: .55; }
body.tg-locked .modal-backdrop { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: rgba(9, 12, 22, .78); opacity: 1; }

/* Cabeçalho */
.tg-hero { display: flex; gap: 16px; padding: 26px 28px 18px; background:
  radial-gradient(120% 140% at 0% 0%, var(--accent-weak) 0%, transparent 60%); border-bottom: 1px solid var(--border); }
.tg-hero-row { align-items: center; padding: 20px 24px 16px; }
.tg-hero-txt { flex: 1; min-width: 0; }
.tg-hero-ic { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad-brand); color: #fff; font-size: 1.35rem; box-shadow: 0 8px 20px rgba(73, 121, 255, .35); }
.tg-kicker { display: inline-block; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.tg-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; margin: 0 0 6px; color: var(--text); }
.tg-hero-row .tg-title { margin: 0 0 2px; }
.tg-sub { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.tg-meta { margin: 0; color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.tg-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent;
  color: var(--muted); display: grid; place-items: center; transition: background var(--t-fast), color var(--t-fast); z-index: 2; }
.tg-x:hover { background: var(--surface-2); color: var(--text); }
.tg-x:focus-visible, .tg-btn:focus-visible, .tg-ext:focus-visible, .tg-sair:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tg-ext { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted);
  text-decoration: none; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--border); white-space: nowrap; }
.tg-ext:hover { color: var(--accent); border-color: var(--accent); }

/* Formulário de dados */
.tg-body { padding: 20px 28px 8px; }
.tg-field { margin-bottom: 14px; }
.tg-label { display: flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--text); margin-bottom: 6px; }
.tg-req { color: var(--danger); }
.tg-kind { margin-left: auto; font-size: var(--fs-xs); font-weight: 700; color: var(--accent); background: var(--accent-weak); border-radius: var(--r-pill); padding: 1px 8px; }
.tg-kind:empty { display: none; }
.tg-input-wrap { position: relative; display: flex; align-items: center; }
.tg-ic { position: absolute; left: 13px; color: var(--muted); font-size: 1rem; pointer-events: none; }
.tg-ddi { position: absolute; left: 38px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); pointer-events: none; }
.tg-ddi + .tg-input { padding-left: 78px; }
.tg-input { width: 100%; height: 46px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text);
  padding: 0 14px 0 40px; font-size: .95rem; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.tg-input::placeholder { color: var(--muted); opacity: .7; }
.tg-input:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.tg-input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-weak); }
.tg-input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-weak); }
.tg-input.is-valid { border-color: color-mix(in srgb, #16a34a 60%, var(--border)); }
.tg-fb { min-height: 16px; margin-top: 4px; font-size: var(--fs-xs); color: var(--danger); }
.tg-privacy { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 4px; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }
.tg-privacy a { color: var(--accent); }
.tg-alert { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--danger-weak); color: var(--danger); font-size: var(--fs-sm); }

/* Rodapé / botões */
.tg-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 28px 24px; }
.tg-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: .9rem; cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), opacity var(--t-fast); }
.tg-btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 8px 18px rgba(73, 121, 255, .28); }
.tg-btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(73, 121, 255, .36); }
.tg-btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.tg-btn-primary.is-done { background: #16a34a; box-shadow: 0 8px 18px rgba(22, 163, 74, .3); }
.tg-btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.tg-btn-ghost:hover { background: var(--surface-2); }
.tg-spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: tg-spin .7s linear infinite; }
.tg-btn.is-busy .tg-spin { display: inline-block; }
.tg-btn.is-busy .tg-btn-txt { opacity: .8; }
@keyframes tg-spin { to { transform: rotate(360deg); } }

/* Termos: quadro estilo navegador/iframe */
.tg-termos .modal-content.tg-card { max-height: calc(100vh - 2rem); display: flex; flex-direction: column; overflow-y: auto; }
.tg-doc-frame { margin: 16px 24px 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface-2);
  display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.tg-doc-bar { display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: var(--fs-xs); color: var(--muted); }
.tg-dots { display: inline-flex; gap: 6px; }
.tg-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.tg-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 10px; font-family: var(--font-mono); font-size: .7rem; }
.tg-url .bi { color: #16a34a; margin-right: 4px; }
.tg-pct { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.tg-progress { height: 3px; background: transparent; }
.tg-progress span { display: block; height: 100%; width: 0; background: var(--grad-brand); transition: width 120ms linear; }
.tg-doc { height: min(52vh, 520px); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); padding: 28px 34px; scroll-behavior: smooth; }
.tg-doc:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--accent-weak); }
.tg-doc-loading { display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; color: var(--muted); font-size: var(--fs-sm); }
.tg-doc-loading .tg-spin { display: inline-block; color: var(--accent); }
.tg-doc-note { margin: 0; padding: 8px 14px; font-size: var(--fs-xs); color: var(--muted); border-top: 1px solid var(--border); background: var(--surface-2); }
.tg-link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; }
.tg-doc::-webkit-scrollbar { width: 10px; }
.tg-doc::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; border: 3px solid var(--surface); }

/* Tipografia do documento (também usada na página pública) */
.tu { font-size: .875rem; line-height: 1.7; color: var(--text); max-width: 72ch; margin: 0 auto; }
.tu .tu-titulo { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 4px; }
.tu .tu-meta { color: var(--muted); font-size: .78rem; margin: 0 0 18px; }
.tu .tu-sub { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }
.tu .tu-atencao { border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--border)); background: var(--warning-weak); border-radius: 12px; padding: 14px 16px; }
.tu .tu-atencao p { margin: 0 0 8px; } .tu .tu-atencao p:last-child { margin: 0; }
.tu .tu-toc { columns: 2; column-gap: 24px; padding: 0; margin: 0; list-style: none; font-size: .8rem; }
.tu .tu-toc li { break-inside: avoid; margin: 0 0 4px; }
.tu .tu-toc a { color: var(--text); text-decoration: none; display: flex; gap: 8px; }
.tu .tu-toc a:hover { color: var(--accent); }
.tu .tu-toc span { color: var(--accent); font-weight: 700; min-width: 20px; font-variant-numeric: tabular-nums; }
.tu .tu-secao { scroll-margin-top: 12px; }
.tu .tu-secao h3 { font-size: .98rem; font-weight: 700; margin: 26px 0 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.tu .tu-secao h3 span { color: var(--accent); margin-right: 6px; }
.tu p { margin: 0 0 10px; text-align: justify; hyphens: auto; }
.tu .tu-cl b { font-variant-numeric: tabular-nums; color: var(--text); }

/* Aceite */
.tg-accept { padding: 16px 24px 22px; }
.tg-check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer;
  background: var(--surface); transition: border-color var(--t-fast), background var(--t-fast); }
.tg-check:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.tg-check.is-on { border-color: var(--accent); background: var(--accent-weak); }
.tg-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tg-check-box { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; border: 2px solid var(--muted); display: grid; place-items: center;
  color: #fff; font-size: .9rem; transition: all var(--t-fast); }
.tg-check-box .bi { opacity: 0; transform: scale(.5); transition: all var(--t-fast); }
.tg-check input:checked + .tg-check-box { background: var(--accent); border-color: var(--accent); }
.tg-check input:checked + .tg-check-box .bi { opacity: 1; transform: none; }
.tg-check input:focus-visible + .tg-check-box { box-shadow: 0 0 0 4px var(--accent-weak); }
.tg-check-txt { font-size: var(--fs-sm); line-height: 1.55; color: var(--text); }
.tg-accept-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.tg-aviso { margin: 0; font-size: .72rem; color: var(--muted); display: flex; align-items: center; gap: 6px; opacity: .9; }
.tg-accept-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.tg-sair { font-size: var(--fs-xs); color: var(--muted); text-decoration: none; }
.tg-sair:hover { color: var(--danger); text-decoration: underline; }

/* Recibo */
.tg-done { padding: 36px 28px 30px; text-align: center; }
.tg-done-ic { font-size: 3rem; color: #16a34a; line-height: 1; margin-bottom: 10px; animation: tg-pop .5s var(--ease); }
.tg-done h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 6px; }
.tg-done > p { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 18px; }
.tg-recibo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: left; max-width: 620px; margin: 0 auto 22px; }
.tg-recibo > div { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.tg-recibo dt { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 2px; }
.tg-recibo dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; font-size: .85rem; word-break: break-all; }
.tg-recibo .tg-recibo-hash { grid-column: 1 / -1; }
.tg-recibo .tg-recibo-hash dd { font-family: var(--font-mono); font-size: .72rem; font-weight: 500; }
@keyframes tg-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 575.98px) {
  .tg-modal .modal-dialog { margin: .5rem; }
  .tg-hero { padding: 22px 18px 14px; } .tg-hero-row { padding: 16px; flex-wrap: wrap; }
  .tg-ext span { display: none; }
  .tg-body { padding: 16px 18px 4px; } .tg-foot { padding: 14px 18px 18px; }
  .tg-foot .tg-btn { flex: 1; }
  .tg-doc-frame { margin: 12px 12px 0; } .tg-doc { padding: 18px 16px; height: 46vh; }
  .tu .tu-toc { columns: 1; } .tu p { text-align: left; }
  .tg-accept { padding: 12px 12px 16px; }
  .tg-accept-actions { width: 100%; justify-content: space-between; } .tg-accept-actions .tg-btn { flex: 1; }
  .tg-recibo { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .tg-btn, .tg-done-ic, .tg-progress span, .tg-doc { transition: none; animation: none; scroll-behavior: auto; } }
