/* =====================================================================
   Sistema de Territórios PG — telas de acesso (tpg_login.css)
   Login, redefinir senha, nova senha e criar conta: MESMO layout (Skill, seção 7).
   Cores jw.org; estrutura do padrão SGAI.
   ===================================================================== */
html.tpg-login, html.tpg-login body { height: 100%; }
html.tpg-login body { margin: 0; font-family: 'Noto Sans', Arial, sans-serif; background: linear-gradient(180deg, #eef1f6 0%, #e8ecf3 100%); color: #292929; }
html.tpg-login .main { background: none !important; height: auto !important; min-height: 100vh; overflow: visible !important; }
html.tpg-login .wrapper { margin-left: 56vw; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
html.tpg-login main.content { width: 100%; display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px !important; }
html.tpg-login .container-fluid { max-width: 536px; padding: 0; }

/* sem "piscar": o cartão original só aparece depois de redesenhado (fallback em 3s) */
html.tpg-login #adianti_div_content { visibility: hidden; animation: tpgMostrar 0s linear 3s forwards; }
html.tpg-login.tpg-lg-pronto #adianti_div_content { visibility: visible; animation: none; }
@keyframes tpgMostrar { to { visibility: visible; } }

/* ---------- painel institucional ---------- */
.tpg-lg-painel { position: fixed; inset: 0 auto 0 0; width: 56vw; color: #fff; overflow: hidden;
  background:
    linear-gradient(100deg, rgba(20,28,44,.90) 0%, rgba(32,52,92,.78) 50%, rgba(52,89,150,.55) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 46px),
    #26395c; }
.tpg-lg-painel::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.08); box-shadow: 0 0 0 40px rgba(255,255,255,.03), 0 0 0 90px rgba(255,255,255,.02); }
.tpg-lg-painel-in { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 56px 7vw; gap: 18px; z-index: 1; }
.tpg-lg-marca { display: flex; align-items: center; gap: 18px; }
.tpg-lg-logo { width: 96px; height: 96px; border-radius: 50%; background: #4a6da7; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.3); border: 3px solid rgba(255,255,255,.35); }
.tpg-lg-logo svg { width: 52px; height: 52px; }
.tpg-lg-nome { font-size: 2.4rem; font-weight: 700; line-height: 1.05; }
.tpg-lg-sis { font-size: .85rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: #c2d4f1; }
.tpg-lg-rotulo { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: #c2d4f1; margin-top: 18px; }
.tpg-lg-rotulo span { width: 8px; height: 8px; border-radius: 50%; background: #9db8e6; }
.tpg-lg-frase { font-size: clamp(2.2rem, 3.6vw, 3.4rem); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; margin: 0; }
.tpg-lg-texto { max-width: 520px; font-size: 1.02rem; color: rgba(255,255,255,.86); margin: 0; }
.tpg-lg-lista { list-style: none; padding: 0 0 0 16px; margin: 6px 0 0; border-left: 2px solid #7f9fd2; display: grid; gap: 6px; color: rgba(255,255,255,.88); font-size: .95rem; }
.tpg-lg-rodape { margin-top: auto; font-size: .8rem; color: rgba(255,255,255,.62); }

/* ---------- cartão ---------- */
html.tpg-login .modal-sheet { position: static !important; padding: 0 !important; }
html.tpg-login .modal-dialog { max-width: 536px; margin: 0; }
html.tpg-login .modal-content { border-radius: 28px !important; border: 1px solid #e3e7ee; box-shadow: 0 30px 70px rgba(26,42,74,.12), 0 2px 6px rgba(26,42,74,.05) !important; }
html.tpg-login .modal-header { display: none !important; }
html.tpg-login .modal-body { padding: 40px 40px 34px !important; }
.tpg-lg-card .tpg-lg-cel-marca { display: none; }
.tpg-lg-tile { width: 62px; height: 62px; border-radius: 16px; background: #e9eef8; border: 1px solid #d3ddef; color: #4a6da7; display: grid; place-items: center; font-size: 24px; margin-bottom: 18px; }
.tpg-lg-eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #4a6da7; }
.tpg-lg-titulo { font-size: 2.05rem; font-weight: 800; letter-spacing: -.02em; color: #1d2433; margin: 4px 0 6px; }
.tpg-lg-titulo span { color: #4a6da7; }
.tpg-lg-apoio { color: #5d6573; margin: 0 0 22px; font-size: .98rem; }
.tpg-lg-campo { margin-bottom: 16px; }
.tpg-lg-rot { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.tpg-lg-rot label { font-weight: 600; font-size: .92rem; color: #1d2433; margin: 0; }
.tpg-lg-rot a { font-weight: 600; font-size: .85rem; color: #4a6da7; text-decoration: none; cursor: pointer; }
.tpg-lg-rot a:hover { text-decoration: underline; }
.tpg-lg-input { position: relative; }
.tpg-lg-input > i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #7b8494; font-size: 17px; pointer-events: none; width: 22px; text-align: center; }
.tpg-lg-input > input.form-control { height: 64px !important; border-radius: 14px !important; border: 1px solid #cfd5df; padding: 0 52px 0 54px !important; font-size: 1.02rem; background: #fff; }
.tpg-lg-input > input.form-control:focus { border-color: #4a6da7; box-shadow: 0 0 0 4px rgba(74,109,167,.16); }
.tpg-lg-olho { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: #5d6573; }
.tpg-lg-olho:hover { background: #eef2f9; }
.tpg-lg-olho:focus-visible { outline: 3px solid rgba(74,109,167,.35); }
.tpg-lg-caps { display: none; margin-top: 6px; font-size: .82rem; font-weight: 600; color: #B45309; }
.tpg-lg-caps.on { display: block; }
.tpg-lg-btn { width: 100%; height: 66px; border: 0; border-radius: 14px; margin-top: 6px; font-size: 1.05rem; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(100deg, #2c4a7d 0%, #345996 45%, #4a6da7 100%); box-shadow: 0 12px 26px rgba(52,89,150,.28);
  display: flex; align-items: center; justify-content: center; gap: 10px; transition: box-shadow .15s, transform .12s; }
.tpg-lg-btn:hover { box-shadow: 0 14px 30px rgba(52,89,150,.36); }
.tpg-lg-btn:active { transform: translateY(1px); }
.tpg-lg-btn:focus-visible { outline: 3px solid rgba(74,109,167,.45); outline-offset: 3px; }
.tpg-lg-sec { text-align: center; margin-top: 18px; color: #5d6573; font-size: .95rem; }
.tpg-lg-sec a { color: #4a6da7; font-weight: 700; text-decoration: none; cursor: pointer; }
.tpg-lg-sec a:hover { text-decoration: underline; }
.tpg-lg-seg { display: flex; justify-content: center; gap: 8px; align-items: center; margin-top: 24px; padding-top: 18px; border-top: 1px solid #e8ecf2; color: #7b8494; font-size: .82rem; }
.tpg-lg-oculto { display: none !important; }
html.tpg-login .swal2-container { z-index: 2000 !important; }

/* ---------- responsivo ---------- */
@media (max-width: 1199px) { .tpg-lg-painel { width: 50vw; } html.tpg-login .wrapper { margin-left: 50vw; } }
@media (max-width: 991px) {
  .tpg-lg-painel { display: none; }
  html.tpg-login .wrapper { margin-left: 0; }
  html.tpg-login body { background: linear-gradient(160deg, #26395c 0 34%, #eef1f6 34% 100%); }
  .tpg-lg-card .tpg-lg-cel-marca { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
  .tpg-lg-cel-marca .tpg-lg-logo { width: 48px; height: 48px; border-width: 2px; }
  .tpg-lg-cel-marca .tpg-lg-logo svg { width: 26px; height: 26px; }
  .tpg-lg-cel-marca b { font-size: 1.1rem; color: #1d2433; display: block; }
  .tpg-lg-cel-marca small { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #4a6da7; font-weight: 700; }
}
@media (max-width: 576px) {
  html.tpg-login .modal-content { border-radius: 22px !important; }
  html.tpg-login .modal-body { padding: 26px 22px 24px !important; }
  .tpg-lg-titulo { font-size: 1.65rem; }
  .tpg-lg-input > input.form-control { height: 56px !important; }
  .tpg-lg-btn { height: 58px; }
}
@media (max-height: 800px) and (min-width: 992px) {
  .tpg-lg-logo { width: 70px; height: 70px; } .tpg-lg-logo svg { width: 38px; height: 38px; }
  .tpg-lg-painel-in { gap: 12px; padding: 36px 6vw; }
  html.tpg-login .modal-body { padding: 28px 34px 24px !important; }
  .tpg-lg-tile { width: 52px; height: 52px; margin-bottom: 12px; }
  .tpg-lg-titulo { font-size: 1.8rem; }
  .tpg-lg-input > input.form-control { height: 56px !important; }
  .tpg-lg-btn { height: 58px; }
  .tpg-lg-seg { margin-top: 16px; padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .tpg-lg-btn { transition: none; } }
/* robustez (independe da ordem de carregamento do Bootstrap) */
html.tpg-login *, html.tpg-login *::before, html.tpg-login *::after { box-sizing: border-box; }
html.tpg-login .modal-content { background: #fff; }
html.tpg-login .container-fluid { width: 100%; }
.tpg-lg-input > input.form-control { width: 100%; display: block; color: #1d2433; }
@media (max-width: 576px) { html.tpg-login main.content { padding: 16px !important; } }
/* largura da coluna do cartão (evita rolagem horizontal) */
html.tpg-login body { overflow-x: hidden; }
html.tpg-login .wrapper { width: 44vw; max-width: 44vw; }
html.tpg-login .main { width: 100% !important; min-width: 0 !important; }
@media (max-width: 1199px) { html.tpg-login .wrapper { width: 50vw; max-width: 50vw; } }
@media (max-width: 991px) { html.tpg-login .wrapper { width: 100%; max-width: 100%; } }
