/* ARQUIVO rmagestor\login\css\login.css*/


@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap");

/* Estilos gerais */
body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

body * {
  box-sizing: border-box;
}

/* Fundo e layout principal da página de login */
.main-login {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #1672d8, #a0c1f7);
  overflow-y: auto;
}

.right-login {
  width: 50vw;
  max-width: 700px;
  display: flex;
  flex-direction: column; /* Em coluna: logo acima, login abaixo */
  justify-content: center;
  align-items: center;
}

/* Card do logo */
.card-logo {
  width: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-color: #1975da; /* Fundo azul */
  color: #fff; /* Cor do texto em branco */
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: -10px 10px 20px -5px rgba(0, 0, 0, 0.3),
    /* Sombra no lado esquerdo */ 10px 10px 20px -5px rgba(0, 0, 0, 0.3); /* Sombra no lado direito */
}

.logo-image {
  max-width: 80%; /* Garante que a imagem se ajuste ao contêiner */
  height: auto; /* Mantém a proporção original */
  border-radius: 10px; /* Arredonda levemente os cantos da imagem */
}

.pagina-cadastro .card-login {
    justify-content: flex-start !important;
}

/* Card de login */
.card-login {
  width: 100%;
  display: flex;
  text-align: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
  background-color: #fff;
  border-radius: 0 0 20px 20px;
  max-height: calc(90vh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  clip-path: inset(0 round 0 0 20px 20px);
  scrollbar-gutter: stable;
  box-shadow: none;
}

.card-login-shadow {
  width: 80%;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.5),
    -10px 10px 20px -5px rgba(0, 0, 0, 0.3),
    10px 10px 20px -5px rgba(0, 0, 0, 0.3);
}

/* Scroll personalizado para o card */
.card-login::-webkit-scrollbar {
  width: 6px;
}

.card-login::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.card-login::-webkit-scrollbar-thumb {
  background: #1672d8;
  border-radius: 10px;
}

.card-login::-webkit-scrollbar-thumb:hover {
  background: #135ba1;
}
/* Título da página */
.card-login > h2 {
  color: #1975da;
  font-weight: 800;
  font-size: 2rem; /* Define um tamanho maior para a fonte */
  margin: 0 0 20px 0;
}

/* Campo de texto - MANTIDO PARA COMPATIBILIDADE */
.textfield {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 20px;
}

/* =========================
   Floating Label System
============================ */
.form-group.floating-label {
  position: relative;
  margin-bottom: 20px;
}

.form-group.floating-label input {
  width: 100%;
  height: 42px;
  padding: 10px 12px 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
  background-color: #fff;
  box-sizing: border-box;
}

.form-group.floating-label label {
  position: absolute;
  left: 12px;
  top: 12px;
  font-size: 14px;
  color: #6c757d;
  transition: all 0.3s ease;
  pointer-events: none;
  background-color: transparent;
  z-index: 1;
  font-weight: 400;
}

/* Estado ativo - Label flutua para cima */
.form-group.floating-label input:focus + label,
.form-group.floating-label.has-value label {
  top: -9px;
  left: 8px;
  font-size: 12px;
  color: #1975da;
  background-color: #ffffff;
  padding: 0 4px;
  font-weight: 500;
}

/* Estados de foco */
.form-group.floating-label input:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Animação invisível para detectar autocomplete */
@keyframes onAutoFillStart {
    from { opacity: 0.99; }
    to { opacity: 1; }
}

@keyframes onAutoFillCancel {
    from { opacity: 0.99; }
    to { opacity: 1; }
}

.form-group.floating-label input:-webkit-autofill {
    animation-name: onAutoFillStart;
    animation-duration: 0.001s;
}

.form-group.floating-label input:not(:-webkit-autofill) {
    animation-name: onAutoFillCancel;
    animation-duration: 0.001s;
}

/* Remover cor de fundo do autocomplete do navegador */
.form-group.floating-label input:-webkit-autofill,
.form-group.floating-label input:-webkit-autofill:hover,
.form-group.floating-label input:-webkit-autofill:focus,
.form-group.floating-label input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px white inset !important;
  box-shadow: 0 0 0 30px white inset !important;
  -webkit-text-fill-color: #000 !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Para campos readonly (código de indicação bloqueado) com autocomplete */
.form-group.floating-label input[readonly]:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #f0f9ff inset !important;
  box-shadow: 0 0 0 30px #f0f9ff inset !important;
}

/* Password wrapper com floating label */
.form-group.floating-label .password-wrapper {
  position: relative;
  width: 100%;
}

.form-group.floating-label .password-wrapper input {
  width: 100%;
  padding-right: 45px;
}

.textfield input {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  font-size: 1rem;
  box-sizing: border-box; /* input nao passar do div pai */
  transition: all 0.3s ease;
}

.textfield label {
  margin-bottom: 10px;
  color: #000000;
  font-size: 12pt;
}

/* Estilo do campo quando focado */
.textfield input:focus {
  border-color: #1975da;
  outline: none;
  box-shadow: 0 0 5px rgba(25, 117, 218, 0.5);
}

/* Botão de login */
.login-btn {
  width: 100%;
  padding: 15px;
  background-color: #1975da;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease; /* Adiciona transição para o transform */
  box-shadow: 0px 10px 10px -12px rgba(0, 0, 0, 0.5);
}

.mensagens-icon {
  color: #dc3545;
}

.login-btn:hover {
  background-color: #145da0;
}

.login-btn:active {
  transform: scale(0.98); /* Simula o efeito de pressionado */
  box-shadow: 0px 5px 10px -8px rgba(0, 0, 0, 0.5); /* Reduz a sombra ao clicar */
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 25px;
  transform: translateY(-50%);
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  background-color: rgba(25, 117, 218, 0.1);
}

.toggle-password i {
  font-size: 1.2rem;
  color: #1975da;
  transition: color 0.2s ease;
}

/* Estilo para o overlay de carregamento */
/* Estilo para o overlay de carregamento */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1672d8, #a0c1f7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Certifique-se de que o overlay fique acima de todos os outros elementos */
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* Estilos para o Spinner */
.spinner {
  border: 8px solid rgba(255, 255, 255, 0.3);
  border-top: 8px solid #ffffff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

/* Animação do Spinner */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Classe para ocultar o overlay (fade-out) */
#loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none; /* Desativa a interação enquanto o overlay desaparece */
}

/* Wrapper para o campo de e-mail e a checkbox */
.email-wrapper {
  position: relative;
  width: 100%; /* O input ocupa 100% da largura disponível */
}

/* Ajuste para o input de e-mail */
.email-wrapper input[type="email"] {
  width: 100%;
  padding-right: 120px; /* Espaço suficiente para a checkbox */
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  font-size: 1rem;
  box-sizing: border-box;
  background-color: #f9f9f9;
  color: #333;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Estilo do input ao ser focado */
.email-wrapper input[type="email"]:focus {
  border-color: #1975da;
  box-shadow: 0 0 5px rgba(25, 117, 218, 0.5);
  outline: none;
}

/* Posicionamento da checkbox à direita */
.remember-email {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #333;
}

/* Checkbox e espaçamento entre a checkbox e o texto */
.remember-email input[type="checkbox"] {
  margin-right: 5px;
}

/* Estilo para a label da checkbox */
.remember-email label {
  font-size: 12px;
  color: #333;
}

/* Posicionamento da checkbox */
.textfield-checkbox {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.textfield-checkbox input[type="checkbox"] {
  margin-right: 5px;
}

.textfield-checkbox label {
  font-size: 14px;
  color: #333;
}

/* Modal de Sucesso */
.modal-sucesso {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Fundo escuro */
  justify-content: center;
  align-items: center;
}

/* Conteúdo do Modal de Sucesso */
.modal-content-sucesso {
  background-color: white;
  border-radius: 15px;
  width: 400px; /* Ajuste o tamanho */
  padding: 40px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.4s ease, transform 0.4s ease; /* Transição suave */
}

.modal-sucesso.show .modal-content-sucesso {
  opacity: 1;
  transform: scale(1);
  animation: bounceIn 0.6s ease forwards;
}

/* Animação bounce in */
@keyframes bounceIn {
  0% {
    transform: scale(0.5);
  }
  60% {
    transform: scale(1.1);
  }
  80% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

/* Estilo do Checkmark */
.checkmark-container {
  margin-bottom: 20px;
  display: flex;
  justify-content: center; /* Centraliza o checkmark */
}

.checkmark {
  width: 80px; /* Tamanho adequado */
  height: 80px;
  display: block;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke: #4CAF50;
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

/* Estilo do Título e Texto do Modal */
.modal-content-sucesso h3 {
  font-size: 24px;
  color: #000;
  font-weight: bold;
}

.modal-content-sucesso p {
  color: #333;
  font-size: 16px;
  margin-top: 10px;
}

/* Link para cadastro */
.cadastro-link {
  margin-top: 20px;
  text-align: center;
}

.cadastro-link p {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
}

.cadastro-link a {
  color: #1975da;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.3s ease;
}

.cadastro-link a:hover {
  color: #145da0;
  text-decoration: underline;
}

/* =========================
   Layout em 2 Colunas (Cadastro)
============================ */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    margin-bottom: 0;
}

.form-row .form-group {
    margin-bottom: 20px;
}

/* Responsividade - Mobile (até 700px) */
@media only screen and (max-width: 700px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (min-width: 701px) and (max-width: 1100px) {
    .form-row {
        gap: 12px;
    }
}

/* =========================
   Validação de Senha
============================ */

/* Requisitos da senha */
.password-requirements {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.85rem;
    color: #6c757d;
    transition: all 0.3s ease;
}

.requirement-item i {
    font-size: 8px;
    color: #dc3545;
    transition: all 0.3s ease;
}

.requirement-item.valid {
    color: #28a745;
}

.requirement-item.valid i {
    color: #28a745;
}

/* Barra de força da senha */
.password-strength-container {
    margin-bottom: 15px;
}

.password-strength-container label {
    display: block;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 6px;
    font-weight: 500;
}

.password-strength-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.password-strength-fill[data-strength="0"] {
    background: #e9ecef;
}

.password-strength-fill[data-strength="1"] {
    background: #dc3545;
}

.password-strength-fill[data-strength="2"] {
    background: #fd7e14;
}

.password-strength-fill[data-strength="3"] {
    background: #ffc107;
}

.password-strength-fill[data-strength="4"] {
    background: #28a745;
}

.password-strength-fill[data-strength="5"] {
    background: #20c997;
}

.password-strength-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
}

.password-strength-text.weak {
    color: #dc3545;
}

.password-strength-text.fair {
    color: #fd7e14;
}

.password-strength-text.good {
    color: #ffc107;
}

.password-strength-text.strong {
    color: #28a745;
}

.password-strength-text.very-strong {
    color: #20c997;
}

/* Feedback de confirmação de senha */
.password-match-feedback {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    display: none;
    transition: all 0.3s ease;
}

.password-match-feedback.match {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.password-match-feedback.no-match {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* =========================
   Tooltips para Campos Obrigatórios
============================ */
.campo-obrigatorio-tooltip {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10001;
  cursor: pointer;
}

.campo-obrigatorio-tooltip i {
  color: #3498db;
  font-size: 14px;
  transition: color 0.2s ease;
}

.campo-obrigatorio-tooltip:hover i {
  color: #2980b9;
}

.campo-obrigatorio-tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: #3498db;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 10px;
  position: absolute;
  z-index: 10002;
  bottom: 80%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-weight: normal;
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.campo-obrigatorio-tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #3498db transparent transparent transparent;
}

.tooltip-left .campo-obrigatorio-tooltip .tooltip-text {
  left: -520%;
  margin-left: 0;
  margin-right: 10px;
}

.tooltip-left .campo-obrigatorio-tooltip .tooltip-text::after {
  left: 90%;
}

/* Hover apenas em desktop */
@media (min-width: 769px) {
  .campo-obrigatorio-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    display: block;
  }
}

/* Controle de tooltip via JS apenas em mobile */
@media (max-width: 768px) {
  .campo-obrigatorio-tooltip:hover .tooltip-text,
  .campo-obrigatorio-tooltip:active .tooltip-text {
    visibility: hidden !important;
    opacity: 0 !important;
    display: none !important;
  }
  
  .campo-obrigatorio-tooltip.tooltip-visible .tooltip-text {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
  }
}

/* =========================
   Animação e Estilos de Erro
============================ */
@keyframes pulsar {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.9;
  }
}

.pulsante {
  animation: pulsar 1s infinite ease-in-out;
  box-shadow: 0 0 5px rgba(255, 48, 48, 0.5);
  border-radius: 50%;
}

.campo-obrigatorio-error {
  color: #ff3030 !important;
  font-weight: bold !important;
}

.form-group-error .campo-obrigatorio-tooltip i {
  color: #ff3030 !important;
}

.form-group-error .campo-obrigatorio-tooltip .tooltip-text {
  background-color: #ff3030 !important;
}

.form-group-error .campo-obrigatorio-tooltip .tooltip-text::after {
  border-color: #ff3030 transparent transparent transparent !important;
}

.input-obrigatorio-error {
  animation: inputErrorPulse 2s ease-in-out infinite;
}

.input-obrigatorio-error:focus {
  border-color: #ff3030 !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 48, 48, 0.35) !important;
}

@keyframes inputErrorPulse {
  0%, 100% {
    box-shadow: 0 0 0 0.2rem rgba(255, 48, 48, 0.25);
  }
  50% {
    box-shadow: 0 0 0 0.2rem rgba(255, 48, 48, 0.45);
  }
}

.form-group-error.floating-label input:focus + label.campo-obrigatorio-label,
.form-group-error.floating-label.has-value label.campo-obrigatorio-label {
  color: #ff3030 !important;
}
