/* ===== RESET E BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #0f0f0f;
  color: #ffffff;
  overflow-x: hidden;
}

/* ===== LAYOUT PRINCIPAL ===== */
.login-main {
  min-height: 100vh;
  display: flex;
}

.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100vh;
}

/* ===== SEÇÃO VISUAL (ESQUERDA) ===== */
.visual-section {
  background: #09101c;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

.visual-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('https://images.unsplash.com/photo-1506905925346-14bda5d7aa97?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80')
    no-repeat center center;
  background-size: cover;
  opacity: 0.2;
}

.visual-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(9, 16, 28, 0.8) 0%,
    rgba(9, 16, 28, 0.6) 100%
  );
  z-index: 1;
}

.visual-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 500px;
  width: 100%;
}

/* Logo */
.logo-container {
  margin-bottom: 3rem;
}

.visual-section .logo {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* Botão voltar */
.back-button {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  z-index: 10;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Botão voltar para mobile */
.back-button-mobile {
  display: none;
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  z-index: 10;
}

.back-button-mobile:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Logo para mobile */
.logo-mobile {
  display: none;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.logo-mobile-img {
  height: 50px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* Texto visual */
.visual-text {
  margin-bottom: 3rem;
}

.visual-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    rgba(255, 255, 255, 0.8) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.visual-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

/* Carrossel de frases */
.phrases-carousel {
  margin-top: 2rem;
  position: relative;
}

.phrases-container {
  position: relative;
  height: 80px;
  overflow: hidden;
}

.phrase {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
  text-align: center;
}

.phrase.active {
  opacity: 1;
  transform: translateY(0);
}

.phrase-text {
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  font-weight: 400;
  margin: 0;
  padding: 0 1rem;
}

/* Indicadores do carrossel */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-indicator.active {
  background: #ffffff;
  width: 24px;
  border-radius: 4px;
}

.carousel-indicator:hover {
  background: rgba(255, 255, 255, 0.6);
}

/* ===== SEÇÃO DO FORMULÁRIO (DIREITA) ===== */
.form-section {
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.form-container {
  width: 100%;
  max-width: 400px;
}

/* Tabs */
.form-tabs {
  display: flex;
  background: #e5e5e5;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 2rem;
}

.form-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: #666666;
  padding: 12px 20px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-tab.active {
  background: #7021f3;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(112, 33, 243, 0.3);
}

.form-tab:hover:not(.active) {
  color: #000000;
}

/* Formulários */
.auth-form {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.auth-form.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cabeçalho do formulário */
.form-header {
  margin-bottom: 2rem;
}

.form-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #000000;
  margin-bottom: 0.5rem;
}

.form-subtitle {
  font-size: 0.95rem;
  color: #666666;
  font-weight: 400;
}

.switch-link {
  color: #7021f3;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.switch-link:hover {
  color: #5a1bc7;
  text-decoration: underline;
}

/* Grupos de formulário */
.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Inputs */
.form-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e5e5e5;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #000000;
  background: #ffffff;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #7021f3;
  box-shadow: 0 0 0 3px rgba(112, 33, 243, 0.1);
}

.form-input::placeholder {
  color: #999999;
}

/* Container de senha */
.password-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-toggle {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: #999999;
  cursor: pointer;
  font-size: 0.9rem;
  z-index: 2;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: #7021f3;
}

/* Opções do formulário */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Checkbox */
.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #666666;
}

.checkbox-container input[type='checkbox'] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e5e5;
  border-radius: 4px;
  margin-right: 8px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.checkbox-container input[type='checkbox']:checked + .checkmark {
  background: #7021f3;
  border-color: #7021f3;
}

.checkbox-container input[type='checkbox']:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.forgot-password {
  color: #7021f3;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: #5a1bc7;
  text-decoration: underline;
}

/* Botão principal */
.auth-button {
  width: 100%;
  background: #7021f3;
  color: #ffffff;
  border: none;
  padding: 16px 24px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.auth-button:hover {
  background: #5a1bc7;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(112, 33, 243, 0.3);
}

.auth-button:active {
  transform: translateY(0);
}

/* Divisor */
.divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #333333;
}

.divider span {
  background: #1a1a1a;
  color: #666666;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

/* Links de termos */
.terms-link {
  color: #7021f3;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.terms-link:hover {
  color: #5a1bc7;
  text-decoration: underline;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
  .login-container {
    grid-template-columns: 1fr;
  }

  .visual-section {
    display: none;
  }

  .back-button {
    display: none;
  }

  .back-button-mobile {
    display: flex;
  }

  .logo-mobile {
    display: block;
  }

  .form-section {
    background: #09101c;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-direction: column;
  }

  .form-container {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .visual-section {
    display: none;
  }

  .back-button {
    display: none;
  }

  .back-button-mobile {
    display: flex;
  }

  .logo-mobile {
    display: block;
  }

  .form-section {
    background: #09101c;
    padding: 1.5rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-direction: column;
  }

  .form-container {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .visual-section {
    display: none;
  }

  .back-button {
    display: none;
  }

  .back-button-mobile {
    display: flex;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .logo-mobile {
    display: block;
    margin-bottom: 1.5rem;
  }

  .logo-mobile-img {
    height: 40px;
  }

  .form-section {
    background: #09101c;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-direction: column;
  }

  .form-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    width: 100%;
  }

  .form-title {
    font-size: 1.5rem;
  }

  .form-input {
    padding: 14px 16px;
  }

  .auth-button {
    padding: 14px 20px;
  }
}
