/* ===== Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  background: linear-gradient(to bottom, #2FD6CB 7%, #4A67DF 57%);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* ===== Container ===== */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* ===== Card Branco ===== */
.login-card {
  background: #E9F0EF;
  width: 600px;
  height: 600px;
  border-radius: 30px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.logo {
  align-self: center;
  margin-bottom: 1rem;
  height: 40px;
}

.welcome {
  font-size: 45px;
  font-weight: 700;
  margin-bottom: 2rem;
  margin-right: 10rem;
}

.welcome .highlight {
  text-decoration: underline wavy #2FD6CB;
  text-underline-offset: 12%;
  text-decoration-thickness: 11%;
}

/* ===== Textfields Material Design ===== */
.input-contain{
    position: relative;
    margin-bottom: 2rem; /* Adiciona espaçamento */
    width: 495px; /* Largura do seu design */
    margin-bottom: 1rem;
}

/* Input field */
input{
    height: 5rem;
    width: 100%; /* Usa largura total do container */
    border: 2px solid black;
    border-radius: 1rem;
    padding: 0 1.2rem; /* Espaçamento interno */
    font-size: 1.4rem;
    background-color: #E9F0EF;
}

input:focus{
    outline: none;
    border-color: #4A67DF; /* Cor do tutorial */
}

/* Texto placeholder animado */
.placeholder-text{
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border: 3px solid transparent;
    background-color: transparent;
    pointer-events: none; /* Permite clicar no input */
    display: flex;
    align-items: center;
    padding: 0 1.2rem; /* Mesmo padding do input */
    font-size: 1.4rem;
}

.text{
    font-size: 1.4rem;
    padding: 0 0.5rem;
    background-color: #E9F0EF;
    color: black;
    transform: translate(0);
    transition: transform 0.15s ease-out, 
                font-size 0.15s ease-out, 
                background-color 0.2s ease-out, 
                color 0.15s ease-out;
}

/* Efeito quando o input está em foco OU tem valor */
input:focus + .placeholder-text .text,
:not(input[value=""]) + .placeholder-text .text {
    background-color: #E9F0EF;
    font-size: 1.1rem;
    color: black;
    transform: translate(0, -170%);
}

/* Cor específica para o estado de foco */
input:focus + .placeholder-text .text {
    border-color: #4A67DF;
    color: #4A67DF;
}

/* ===== Checkbox ===== */
.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 495px;
  margin: 1rem 0;
}
.remember {
  display: flex;
  align-items: center;
}
.remember input[type="checkbox"] {
  accent-color: #4A67DF; /* usa cor oficial */
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
}

.remember span {
  font-size: 16px;
  font-weight: 400;
}
.forgot {
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: #000;
  transition: color 0.3s ease;
}

.forgot:hover {
  color: #4A67DF;
}


/* ===== Botão ===== */
.enter-btn {
  width: 136px;
  height: 96px;
  font-size: 20px;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
  background: #4A67DF;
  color: #E9F0EF;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  margin-left: 11rem;
  margin-top: 0rem;
}

.enter-btn:hover {
  background: #3c56b6;
  transform: scale(1.02);
}

.enter-btn:active {
  transform: scale(0.97);
}

.enter-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.enter-btn:disabled:hover {
  background: #4A67DF;
  transform: none;
}

/* ===== Cadastro ===== */
.signup {
  font-size: 16px;
  font-weight: 500;
  margin-top: 1rem;
}

.link {
  color: #4A67DF;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

/* ===== Modal de Registro ===== */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.login-modal .modal-card {
  position: relative;
  width: 600px;
  height: auto;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #333;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: #4A67DF;
}

.login-modal .welcome {
  margin-right: 0;
  margin-top: 10px;
}

.login-modal input {
  height: 4rem;
  font-size: 1.2rem;
}

.login-modal .input-contain {
  width: 100%;
  margin-bottom: 1.5rem;
}

.login-modal .placeholder-text {
  font-size: 1.2rem;
}

.login-modal .text {
  font-size: 1.2rem;
}

.login-modal .enter-btn {
  margin-top: 20px;
  margin-bottom: 20px;
}

/* ===== Rodapé ===== */
.terms {
  margin-top: 2rem;
  font-size: 14px;
  font-weight: 500;
  color: #E9F0EF;
  text-align: center;
  width: 80%;
}

.terms .underline {
  font-weight: 700;
  text-decoration: underline;
  color: #E9F0EF;
}

/* ===== VALIDAÇÃO E MENSAGENS ===== */
.input-contain.error input {
  border-color: #ef4444 !important;
  background-color: #fef2f2;
}

.input-contain.error input:focus {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
  display: block;
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  padding: 0 1.2rem;
  animation: slideDown 0.2s ease-out;
}

.form-error-message {
  display: block;
  background-color: #fee2e2;
  color: #dc2626;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #dc2626;
  font-size: 0.95rem;
  font-weight: 500;
  animation: slideDown 0.3s ease-out;
}

.form-success-message {
  display: block;
  background-color: #d1fae5;
  color: #065f46;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #10b981;
  font-size: 0.95rem;
  font-weight: 500;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== DARK MODE PARA FORMULÁRIOS ===== */
body.dark-mode .input-contain {
  color: #fff;
}

body.dark-mode input {
  background-color: #1a202c;
  color: #fff;
  border-color: #4b5563;
}

body.dark-mode input:focus {
  border-color: #4A67DF;
  background-color: #1a202c;
}

body.dark-mode .text {
  background-color: #1a202c;
  color: #e2e8f0;
}

body.dark-mode input:focus + .placeholder-text .text,
body.dark-mode :not(input[value=""]) + .placeholder-text .text {
  background-color: #1a202c;
  color: #e2e8f0;
}

body.dark-mode .form-error-message {
  background-color: #7f1d1d;
  color: #fca5a5;
  border-left-color: #fca5a5;
}

body.dark-mode .form-success-message {
  background-color: #064e3b;
  color: #a7f3d0;
  border-left-color: #a7f3d0;
}