/* ========================================================= */
/* css/login-user.css - Login Público do Solicitante         */
/* ========================================================= */

:root {
  --bg-color: #f4f7f9;
  --btn-color: #3465a4;
  --btn-hover: #0f3a55;
  --text-dark: #0f3a55;
  --text-light: #7b8a98;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--text-dark);
  background-image: url("../img/detalhe-footer.png");
  background-position: center bottom;
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-image: url("../img/detalhe-footer.png");
  background-position: center bottom;
  background-size: 100% auto;
  background-repeat: no-repeat;
  transform: scaleY(-1);
  z-index: 1;
  pointer-events: none;
}

/* Card Claro (Paciente) */
.login-glass-card {
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.7) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 24px 110px 24px 110px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.8);
  border-left: 1.5px solid rgba(255, 255, 255, 0.8);
  border-right: 1.5px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  z-index: 10;
}

.logo-container img {
  max-width: 280px;
  margin-bottom: 16px;
}

.login-glass-card h2 {
  color: var(--btn-hover);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 32px;
  line-height: 1.4;
}

/* Formulário e Botões */
.form-group {
  position: relative;
  margin-bottom: 16px;
}

.form-group input {
  width: 100%;
  height: 50px;
  border-radius: 25px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0 20px;
  font-size: 14px;
  color: var(--text-dark);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-group input::placeholder {
  color: var(--text-light);
}

.eye-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-submit {
  width: 100%;
  height: 50px;
  border-radius: 15px;
  border: none;
  background-color: var(--btn-color);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 8px 20px rgba(52, 101, 164, 0.3);
}

.btn-submit:hover {
  background-color: var(--btn-hover);
}
.btn-submit:active {
  transform: scale(0.98);
}

.footer-signature {
  position: absolute;
  bottom: 24px;
  right: 24px;
  color: var(--text-dark);
  font-size: 12px;
  opacity: 0.6;
}

/* Modal e Animações Legadas */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 58, 85, 0.6);
  backdrop-filter: blur(4px);
}
.glass-modal {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.85) 100%
  );
  margin: 15% auto;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  text-align: justify;
  line-height: 1.5;
  color: var(--text-dark);
  position: relative;
}
.close {
  color: var(--text-light);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 15px;
  right: 20px;
}
/* ========================================================= */
/*   Modais com formularios                                  */
/* ========================================================= */
.modal.modal-form.aberto {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}

.modal-form .glass-modal {
  margin: auto;
  max-width: 420px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  text-align: left;
}

.modal-form h3 {
  color: var(--btn-hover);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-right: 28px;
}

.modal-form .modal-texto {
  font-size: 13px;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.modal-form .form-group input {
  height: 50px;
}

.modal-form .modal-alerta {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: #c0392b;
  margin: 0 0 4px;
}

.modal-form .modal-alerta:empty {
  display: none;
}

.modal-form .modal-alerta.sucesso {
  color: var(--btn-hover);
}

.modal-form .modal-confirmacao {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dark);
}

.modal-form .modal-confirmacao .canal-same {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-light);
}

.modal-form .form-group input:focus,
.modal-form .btn-submit:focus-visible,
.modal-form .close:focus-visible,
.modal-form .eye-icon:focus-visible,
.link-recuperacao button:focus-visible {
  outline: 2px solid var(--btn-color);
  outline-offset: 2px;
}

/* ========================================================= */
/* Adicionadores de autocorreção                             */
/* ========================================================= */
.link-recuperacao {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
  color: var(--text-light);
  font-size: 13px;
}

.link-recuperacao button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: none;
  border: none;
  padding: 8px 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: var(--btn-color);
  cursor: pointer;
  text-decoration: underline;
}

.link-recuperacao button + button {
  border-left: 1px solid rgba(123, 138, 152, 0.35);
}

.link-recuperacao button:hover {
  color: var(--btn-hover);
}

@media (max-width: 480px) {
  .modal-form .glass-modal {
    width: 92%;
    padding: 24px 20px;
  }

  .modal-form .form-group input {
    height: 46px;
  }

  .link-recuperacao button {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade_in_1,
  .fade_in_2,
  .fade_in_3,
  .fade_in_4 {
    animation: none;
    opacity: 1;
  }

  .btn-submit {
    transition: none;
  }
}

.fade_in_1 {
  opacity: 0;
  animation: fadeIn 1s 0s forwards;
}
.fade_in_2 {
  opacity: 0;
  animation: fadeIn 1s 0.3s forwards;
}
.fade_in_3 {
  opacity: 0;
  animation: fadeIn 1s 0.6s forwards;
}
.fade_in_4 {
  opacity: 0;
  animation: fadeIn 1s 0.9s forwards;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .login-glass-card {
    width: 92%;
    padding: 32px 24px;
    border-radius: 24px 60px 24px 60px;
  }
}
