/* ==================================================================
   BARRA DE LOGIN v2 (23/11/2026): padrao do site no celular e no computador.
   Carregado pelo includes/sections/login_v2.php (?login=v1 mostra a barra antiga).
   Barra: cadeado + "Client Area" + botao; logado, inicial e nome do usuario.
   Some ao rolar para baixo e volta ao rolar para cima.
   Login: no celular, painel que sobe de baixo (alca, X, toque fora, arrastar,
   voltar do aparelho e Esc fecham); no computador, janela no centro.
   ================================================================== */

.lr2 {
  --lr2-azul: rgba(16, 51, 73, 0.95);
  --lr2-folha: #0b2a3d;
  --lr2-laranja: #E89127;
  --lr2-laranja-texto: #f3a54a;
  --lr2-ease: cubic-bezier(0.2, 0, 0, 1);
  font-family: Roboto, Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.lr2 button,
.lr2 input,
.lr2 a { font-family: inherit; -webkit-tap-highlight-color: transparent; }

/* ---------------- barra fixa ---------------- */
.lr2_barra {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;                 /* mesma camada da barra antiga do celular */
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--lr2-azul);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(0);
  transition: transform 300ms var(--lr2-ease);
}

.lr2_barra.is-oculta {
  transform: translateY(calc(100% + 2px));
  transition: transform 240ms cubic-bezier(0.3, 0, 1, 1);
}

.lr2_barra_in {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lr2_icone {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lr2-laranja-texto);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.lr2_txt {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
  text-align: left;
}

.lr2_txt strong {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lr2_txt small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lr2_botao {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--lr2-laranja);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}

.lr2_botao:hover { filter: brightness(1.06); color: #fff; text-decoration: none; }
.lr2_botao:active { transform: scale(0.97); filter: brightness(0.94); }

/* logado: inicial + nome abrem o painel; o botao leva direto para a Client Area */
.lr2_quem {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.lr2_avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 145, 39, 0.16);
  box-shadow: inset 0 0 0 1px rgba(232, 145, 39, 0.5);
  color: var(--lr2-laranja-texto);
  font-size: 16px;
  font-weight: 600;
}

.lr2_quem .lr2_txt small { font-size: 12px; }

/* "Log out" na propria barra so no computador; no celular fica dentro do painel */
.lr2_sair_barra { display: none; }

/* o botao "Privacy" do aviso de cookies acompanha a barra e some com o login aberto */
#cc-reopen { transition: bottom 300ms var(--lr2-ease), opacity 160ms ease; }
html.lr2-barra-oculta #cc-reopen { bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important; }
html.lr2-aberto #cc-reopen { opacity: 0 !important; pointer-events: none !important; }

/* ---------------- fundo e painel ---------------- */
/* acima do aviso de cookies (#cc-banner, z-index 99999): com o login aberto, o aviso fica
   atras do fundo escurecido e volta quando o painel fecha */
.lr2_veu {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(2, 16, 26, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 220ms ease;
}

.lr2_veu.is-on { opacity: 1; }

.lr2_folha {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--lr2-teclado, 0px);
  z-index: 100001;
  max-height: calc(100vh - var(--lr2-teclado, 0px) - 16px);
  max-height: calc(100dvh - var(--lr2-teclado, 0px) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 6px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: var(--lr2-folha);
  color: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  outline: none;
  text-align: left;
  transform: translateY(100%);
  transition: transform 220ms cubic-bezier(0.3, 0, 1, 1);
}

.lr2_folha.is-on {
  transform: translateY(0);
  transition: transform 340ms var(--lr2-ease);
}

.lr2_folha.is-arrastando { transition: none; }

.lr2_arrasta { touch-action: none; cursor: grab; }

.lr2_alca {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
  margin: 4px auto 14px;
}

.lr2_topo {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.lr2_topo > div { flex: 1 1 auto; min-width: 0; }

.lr2_topo h2 {
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}

.lr2_topo p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.45;
}

.lr2_fechar {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: -6px -10px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
}

.lr2_fechar::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: background-color 160ms ease, transform 160ms ease;
}

.lr2_fechar svg { position: relative; opacity: 0.92; }
.lr2_fechar:hover::before { background: rgba(255, 255, 255, 0.14); }
.lr2_fechar:active::before { background: rgba(255, 255, 255, 0.18); transform: scale(0.92); }

.lr2 :focus { outline: none; }
.lr2 :focus-visible { outline: 2px solid var(--lr2-laranja); outline-offset: 2px; }
.lr2_fechar:focus-visible { outline: none; }
.lr2_fechar:focus-visible::before { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 0 2px var(--lr2-laranja); }

/* ---------------- formulario ---------------- */
.lr2_erro {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -6px 0 16px;
  color: #ffb4a8;
  font-size: 14px;
  line-height: 1.4;
}

.lr2_erro svg { flex: 0 0 auto; margin-top: 1px; }

.lr2_campo + .lr2_campo { margin-top: 14px; }

.lr2_rotulo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 6px;
}

.lr2_rotulo label {
  display: block;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* "Forgot password?" junto da senha, onde a pessoa procura quando erra */
.lr2_esqueci {
  margin: -6px 0;
  padding: 6px 0;
  color: var(--lr2-laranja-texto);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.lr2_esqueci:hover { text-decoration: underline; color: var(--lr2-laranja-texto); }

.lr2_entrada {
  position: relative;
  display: flex;
  align-items: center;
}

.lr2_ic {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: #7d8a96;
  pointer-events: none;
}

/* 16px no texto: abaixo disso o iPhone da zoom na tela ao tocar no campo */
.lr2_entrada input {
  width: 100%;
  height: 50px;
  box-sizing: border-box;
  margin: 0;
  padding: 0 14px 0 44px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #1c1c1c;
  font-size: 16px;
  line-height: normal;
  outline: none;
  box-shadow: 0 0 0 0 rgba(232, 145, 39, 0);
  transition: box-shadow 150ms ease;
  -webkit-appearance: none;
  appearance: none;
}

#lr2_senha { padding-right: 52px; }

.lr2_entrada input:focus { box-shadow: 0 0 0 3px rgba(232, 145, 39, 0.55); }

.lr2_olho {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #6b7884;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lr2_olho_ocultar { display: none; }
.lr2_olho.is-ver .lr2_olho_ver { display: none; }
.lr2_olho.is-ver .lr2_olho_ocultar { display: block; }

.lr2_entrar,
.lr2_sair {
  width: 100%;
  min-height: 52px;
  box-sizing: border-box;
  margin: 22px 0 0;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--lr2-laranja);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease, opacity 150ms ease;
}

.lr2_entrar:hover,
.lr2_sair:hover { color: #fff; text-decoration: none; filter: brightness(1.06); }
.lr2_entrar:active,
.lr2_sair:active { transform: scale(0.98); filter: brightness(0.94); }
.lr2_entrar[disabled] { opacity: 0.7; cursor: default; }

.lr2_sair {
  margin-top: 10px;
  min-height: 48px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.lr2_contato {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.lr2_contato a {
  margin-left: 4px;
  color: var(--lr2-laranja-texto);
  font-weight: 600;
  text-decoration: none;
}

.lr2_contato a:hover { text-decoration: underline; color: var(--lr2-laranja-texto); }

html.lr2-aberto,
html.lr2-aberto body { overflow: hidden; }

/* ---------------- computador ---------------- */
@media screen and (min-width: 769px) {
  .lr2_barra {
    z-index: 998;             /* abaixo do cabecalho e do menu (999), acima do conteudo */
    padding: 12px 24px;
  }

  .lr2_barra_in {
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
    gap: 18px;
  }

  .lr2_txt {
    flex: 0 1 auto;
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
  }

  .lr2_txt strong { font-size: 16px; }

  .lr2_txt small {
    font-size: 14px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
  }

  .lr2_quem { flex: 0 1 auto; cursor: default; }
  .lr2_quem .lr2_txt { gap: 6px; }
  .lr2_quem .lr2_txt small { font-size: 14px; padding-left: 0; border-left: 0; }

  .lr2_botao { min-height: 42px; padding: 0 26px; }

  .lr2_sair_barra {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-decoration: none;
  }

  .lr2_sair_barra:hover { color: #fff; text-decoration: underline; }

  /* o login vira uma janela no centro */
  .lr2_folha {
    left: 50%;
    right: auto;
    top: 50%;
    bottom: auto;
    width: 420px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 48px);
    padding: 28px 32px;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px));
    transition: opacity 160ms ease, transform 200ms cubic-bezier(0.3, 0, 1, 1);
  }

  .lr2_folha.is-on {
    opacity: 1;
    transform: translate(-50%, -50%);
    transition: opacity 200ms ease, transform 280ms var(--lr2-ease);
  }

  .lr2_alca { display: none; }
  .lr2_arrasta { cursor: default; touch-action: auto; }
  .lr2_topo { margin-bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .lr2_barra,
  .lr2_barra.is-oculta,
  .lr2_folha,
  .lr2_folha.is-on,
  .lr2_veu,
  #cc-reopen { transition: none !important; }
}
