/* =========================================================
   TELA DE LOGIN - SERVUS (layout 2026)
   Usada somente por view/index.tpl
   Obs.: o Bootstrap 3 define html { font-size: 10px },
   por isso as medidas aqui estão em px e não em rem.
   ========================================================= */

:root {
  --sv-tinta: #05282d;          /* texto principal (mesmo tom do logo) */
  --sv-texto: #3d5559;
  --sv-suave: #6b8185;
  --sv-borda: #d6e2e3;
  --sv-borda-hover: #b9cfd1;
  --sv-campo: #f5f9f9;
  --sv-primaria: #047f72;       /* verde-azulado do "S" do logo */
  --sv-primaria-escura: #05524f;
  --sv-primaria-clara: #04b8a6;
  --sv-foco: rgba(4, 184, 166, .22);
  --sv-fundo: #0a5359;          /* cor da onda da imagem de fundo */
  --sv-raio: 12px;
}

html,
body {
  height: 100%;
}

body.login-page {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--sv-fundo);
  color: var(--sv-tinta);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Fundo ---------- */
.login-bg {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  background: var(--sv-fundo) url("../imagens/id_visual_2026/fundo_login_web.jpg") center center / cover no-repeat;
  /* telas de alta densidade (escala 125%+, retina, 4K) recebem a versão em resolução cheia */
  background-image: -webkit-image-set(url("../imagens/id_visual_2026/fundo_login_web.jpg") 1x, url("../imagens/id_visual_2026/fundo_login_web_2x.jpg") 2x);
  background-image: image-set(url("../imagens/id_visual_2026/fundo_login_web.jpg") 1x, url("../imagens/id_visual_2026/fundo_login_web_2x.jpg") 2x);
}

.login-bg:after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background:
    radial-gradient(ellipse 55% 60% at 50% 50%, rgba(3, 38, 42, .28) 0%, rgba(3, 38, 42, 0) 70%),
    linear-gradient(180deg, rgba(3, 38, 42, .30) 0%, rgba(3, 38, 42, 0) 30%, rgba(3, 38, 42, 0) 65%, rgba(3, 38, 42, .45) 100%);
}

/* ---------- Faixa do ambiente de desenvolvimento ---------- */
.dev-faixa {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 8px 12px;
  text-align: center;
  background: repeating-linear-gradient(-45deg, #f0ad00, #f0ad00 18px, #333 18px, #333 36px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
  font-family: Arial, sans-serif;
  letter-spacing: 1px;
}

.dev-faixa span {
  display: inline-block;
  padding: 3px 16px;
  border-radius: 2px;
  background: #f0ad00;
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dev-selo {
  display: table;
  margin: 10px auto 0;
  padding: 3px 11px;
  border: 1px solid #f0c24b;
  border-radius: 999px;
  background: #fff4d6;
  color: #7a5200;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dev-selo i {
  margin-right: 4px;
}

/* ---------- Área central e cartão ---------- */
.login-wrap {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 24px;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  padding: 38px 36px 30px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow:
    0 32px 64px -16px rgba(2, 30, 33, .6),
    0 0 0 1px rgba(255, 255, 255, .55) inset;
  animation: sv-entrada .6s cubic-bezier(.2, .8, .2, 1) both;
}

.login-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sv-primaria-escura), var(--sv-primaria-clara) 50%, var(--sv-primaria-escura));
}

/* logo do Servus + brasão da Arquidiocese, lado a lado */
.login-marcas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.login-logo {
  display: block;
  flex: 0 1 auto;           /* em tela estreita o logo do Servus encolhe primeiro */
  width: 200px;
  min-width: 0;
  height: auto;
}

.login-marcas-divisor {
  flex: none;
  width: 1px;
  height: 46px;
  background: var(--sv-borda);
}

.login-logo-arqui {
  display: block;
  flex: none;
  width: auto;
  height: 76px;
}

.login-titulo {
  margin: 26px 0 4px;
  color: var(--sv-tinta);
  font-family: 'Montserrat', 'Inter', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-align: center;
}

.login-sub {
  margin: 0 0 24px;
  color: var(--sv-suave);
  font-size: 14px;
  text-align: center;
}

/* ---------- Campos ---------- */
.campo {
  margin-bottom: 16px;
}

.campo label {
  display: block;
  margin-bottom: 6px;
  color: var(--sv-texto);
  font-size: 13px;
  font-weight: 600;
}

.campo-input {
  position: relative;
}

.campo-icone {
  position: absolute;
  top: 50%;
  left: 15px;
  color: #8aa0a3;
  font-size: 14px;
  pointer-events: none;
  transform: translateY(-50%);
  transition: color .15s;
}

.campo-input input {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  border: 1.5px solid var(--sv-borda);
  border-radius: var(--sv-raio);
  outline: none;
  background: var(--sv-campo);
  color: var(--sv-tinta);
  font-size: 15px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.campo-input--acao input {
  padding-right: 48px;
}

.campo-input input::placeholder {
  color: #9fb1b3;
  opacity: 1;
}

.campo-input input:hover {
  border-color: var(--sv-borda-hover);
}

.campo-input input:focus {
  border-color: var(--sv-primaria);
  background: #fff;
  box-shadow: 0 0 0 4px var(--sv-foco);
}

.campo-input:focus-within .campo-icone {
  color: var(--sv-primaria);
}

/* Autopreenchimento do navegador sem o fundo amarelo/azul */
.campo-input input:-webkit-autofill,
.campo-input input:-webkit-autofill:hover {
  -webkit-text-fill-color: var(--sv-tinta);
  box-shadow: 0 0 0 1000px var(--sv-campo) inset;
}

.campo-input input:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px #fff inset, 0 0 0 4px var(--sv-foco);
}

.campo-input input.is-invalido {
  border-color: #e06b61;
}

.campo-input input.is-invalido:focus {
  box-shadow: 0 0 0 4px rgba(224, 107, 97, .2);
}

.campo-olho {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #7d9497;
  font-size: 15px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color .15s, color .15s;
}

.campo-olho:hover {
  background: rgba(4, 127, 114, .08);
  color: var(--sv-primaria);
}

.campo-olho:focus {
  outline: none;
}

.campo-olho:focus-visible {
  outline: 2px solid var(--sv-primaria);
  outline-offset: 1px;
}

.campo-extra {
  display: flex;
  align-items: center;
  min-height: 20px;
  margin-top: 10px;
}

.campo-caps {
  display: none;
  color: #a15c00;
  font-size: 12px;
  font-weight: 600;
}

.campo-caps.is-visivel {
  display: inline-block;
}

.campo-caps i {
  margin-right: 4px;
}

.campo-ajuda {
  margin: 6px 0 0;
  color: var(--sv-suave);
  font-size: 12px;
}

/* ajuda que só aparece quando tem mensagem (ex.: erro no usuário) */
.campo-ajuda:empty {
  display: none;
}

.campo-ajuda.is-erro {
  color: #c0392b;
  font-weight: 600;
}

.link-senha {
  margin-left: auto;
  color: var(--sv-primaria);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.link-senha:hover,
.link-senha:focus {
  color: var(--sv-primaria-escura);
  text-decoration: underline;
}

/* ---------- Botões ---------- */
.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  margin-top: 22px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--sv-raio);
  background: linear-gradient(135deg, #04897b 0%, var(--sv-primaria-escura) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 10px 20px -8px rgba(4, 127, 114, .75);
  transition: transform .15s, box-shadow .15s, filter .15s;
}

.btn-login:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -10px rgba(4, 127, 114, .85);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:focus {
  outline: none;
}

.btn-login:focus-visible {
  outline: 3px solid rgba(4, 184, 166, .55);
  outline-offset: 2px;
}

.btn-seta {
  transition: transform .15s;
}

.btn-login:hover .btn-seta {
  transform: translateX(3px);
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sv-giro .7s linear infinite;
}

.btn-login.is-carregando {
  cursor: progress;
  filter: none;
  transform: none;
  opacity: .92;
}

.btn-login.is-carregando .btn-spinner {
  display: inline-block;
}

.btn-login.is-carregando .btn-seta {
  display: none;
}

.btn-sec {
  height: 48px;
  padding: 0 20px;
  border: 1.5px solid var(--sv-borda);
  border-radius: var(--sv-raio);
  background: #fff;
  color: var(--sv-texto);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}

.btn-sec:hover {
  border-color: var(--sv-borda-hover);
  background: var(--sv-campo);
}

/* ---------- Avisos (substituem o SweetAlert) ---------- */
.login-alerta {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 20px;
  padding: 12px 12px 12px 14px;
  border: 1px solid;
  border-radius: var(--sv-raio);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  animation: sv-alerta .4s cubic-bezier(.2, .8, .2, 1) both;
}

.login-alerta strong {
  display: block;
  margin-bottom: 1px;
  font-size: 13.5px;
}

.login-alerta-icone {
  margin-top: 2px;
  font-size: 16px;
}

.login-alerta-fechar {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin: -3px -3px 0 auto;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  opacity: .55;
  cursor: pointer;
}

.login-alerta-fechar:hover {
  background: rgba(0, 0, 0, .06);
  opacity: .9;
}

.login-alerta--erro {
  border-color: #f5c2c0;
  background: #fdecec;
  color: #8f1d17;
}

.login-alerta--erro .login-alerta-icone {
  color: #d64037;
}

.login-alerta--aviso {
  border-color: #f3d189;
  background: #fff6e0;
  color: #6e4700;
}

.login-alerta--aviso .login-alerta-icone {
  color: #d98e04;
}

.login-alerta--sucesso {
  border-color: #a9dfcd;
  background: #e6f6f1;
  color: #0d5c45;
}

.login-alerta--sucesso .login-alerta-icone {
  color: #10a377;
}

/* ---------- Rodapé ---------- */
.login-rodape {
  position: relative;
  z-index: 1;
  padding: 0 16px 22px;
  color: rgba(255, 255, 255, .85);
  font-size: 12px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

/* ---------- Modal de recuperação de senha ---------- */
.login-modal {
  text-align: center;
}

/* centraliza o modal na vertical (Bootstrap 3 não tem modal-dialog-centered) */
.login-modal:before {
  content: '';
  display: inline-block;
  height: 100%;
  margin-right: -4px;
  vertical-align: middle;
}

.login-modal .modal-dialog {
  display: inline-block;
  width: 440px;
  max-width: calc(100% - 28px);
  margin: 16px 0;
  text-align: left;
  vertical-align: middle;
}

.login-modal.fade .modal-dialog {
  transform: translateY(18px) scale(.97);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}

.login-modal.in .modal-dialog {
  transform: none;
}

.login-modal .modal-content {
  position: relative;
  padding: 32px 30px 26px;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 32px 70px -16px rgba(2, 30, 33, .65);
  color: var(--sv-tinta);
}

.modal-backdrop {
  background: #03262a;
}

.modal-backdrop.in {
  opacity: .6;
}

.login-modal-fechar {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f0f5f5;
  color: #5d7477;
  font-size: 15px;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}

.login-modal-fechar:hover {
  background: #e2ecec;
  color: var(--sv-tinta);
}

.login-modal-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e3f6f2, #c6ebe4);
  color: var(--sv-primaria);
  font-size: 22px;
}

.login-modal h2 {
  margin: 0 0 6px;
  color: var(--sv-tinta);
  font-family: 'Montserrat', 'Inter', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.login-modal-intro {
  margin: 0 0 20px;
  color: var(--sv-texto);
  font-size: 14px;
  line-height: 1.55;
}

.login-callout {
  display: flex;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 11px 13px;
  border: 1px solid #f3d189;
  border-radius: var(--sv-raio);
  background: #fff6e0;
  color: #6e4700;
  font-size: 12.5px;
  line-height: 1.45;
}

.login-callout i {
  margin-top: 2px;
  color: #d98e04;
}

.login-modal-acoes {
  display: flex;
  gap: 10px;
}

.login-modal-acoes .btn-login {
  flex: 1 1 auto;
  width: auto;
  height: 48px;
  margin-top: 0;
}

/* ---------- Animações ---------- */
@keyframes sv-entrada {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

@keyframes sv-alerta {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

@keyframes sv-giro {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .login-card,
  .login-alerta,
  .btn-spinner {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .login-modal.fade .modal-dialog,
  .btn-login {
    transition: none;
  }
}

/* ---------- Telas menores ---------- */
/* notebooks 1366x768: sobram ~650px de altura útil no navegador */
@media (max-height: 720px) {
  .login-wrap {
    padding: 16px 16px 12px;
  }

  .login-card {
    padding: 24px 36px 22px;
  }

  .login-logo {
    width: 170px;
  }

  .login-marcas-divisor {
    height: 40px;
  }

  .login-logo-arqui {
    height: 66px;
  }

  .dev-selo {
    margin-top: 8px;
  }

  .login-titulo {
    margin-top: 14px;
    font-size: 20px;
  }

  .login-sub {
    margin-bottom: 16px;
  }

  /* com aviso na tela, o aviso ocupa o lugar do subtítulo */
  .login-card:has(.login-alerta) .login-titulo {
    margin-bottom: 14px;
  }

  .login-card:has(.login-alerta) .login-sub {
    display: none;
  }

  .login-alerta {
    margin-bottom: 14px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .campo {
    margin-bottom: 12px;
  }

  .campo-input input {
    height: 44px;
  }

  .campo-extra {
    margin-top: 6px;
  }

  .btn-login {
    height: 46px;
    margin-top: 16px;
  }

  .login-rodape {
    padding-bottom: 12px;
  }
}

@media (max-width: 575px) {
  .dev-faixa {
    letter-spacing: .5px;
  }

  .dev-faixa span {
    padding: 2px 10px;
    font-size: 10px;
  }

  /* deixa o texto acima do selo do reCAPTCHA (canto inferior direito) */
  .login-rodape {
    padding-bottom: 76px;
  }

  /* no celular o cartão cobre quase todo o fundo: usa sempre a versão leve */
  .login-bg {
    background-image: url("../imagens/id_visual_2026/fundo_login_web.jpg");
    background-position: 20% center;
  }

  .login-bg:after {
    background: linear-gradient(180deg, rgba(3, 38, 42, .35) 0%, rgba(3, 38, 42, .15) 40%, rgba(3, 38, 42, .55) 100%);
  }

  .login-wrap {
    padding: 24px 14px 20px;
  }

  .login-card {
    padding: 30px 22px 24px;
    border-radius: 20px;
  }

  .login-marcas {
    gap: 12px;
  }

  .login-logo {
    width: 170px;
  }

  .login-marcas-divisor {
    height: 40px;
  }

  .login-logo-arqui {
    height: 66px;
  }

  .login-titulo {
    font-size: 20px;
  }

  .login-modal .modal-content {
    padding: 28px 22px 22px;
  }

  .login-modal-acoes {
    flex-direction: column-reverse;
  }

  .login-modal-acoes .btn-login,
  .btn-sec {
    width: 100%;
  }
}
