/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
}

/* Variáveis CSS para cores */
:root {
  --bs-primary: rgba(35, 0, 60, 1);
  --bs-secondary: rgba(145, 51, 210, 1);
}

/* Background com gradiente horizontal */
.bg-gradient-horizontal {
  background: radial-gradient(
    68.02% 71.16% at 50% 50%,
    rgba(81, 11, 118, 0.9) 0%,
    #23003c 100%
  );
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: relative; /* permite overlay absoluto */
  z-index: 0;
}

/* Overlay com o padrão de ícones — fica sobre o gradiente, abaixo do conteúdo */
.bg-gradient-horizontal::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("image/icones.png");
  background-repeat: repeat;
  background-position: center;
  opacity: 0.12; /* ajuste a opacidade conforme necessário */
  pointer-events: none;
  z-index: 0;
}

/* Container principal */
.container {
  width: 100%;
  max-width: 1200px;
  padding: 0 15px;
  position: relative; /* garante que o conteúdo fique acima do overlay */
  z-index: 1;
}

.row {
  display: flex;
  width: 100%;
  margin: 0 -15px;
}

.col-left {
  flex: 0 0 60%;
  max-width: 60%;
  padding: 0 15px;
  display: flex;
  align-items: center;
}

.col-right {
  flex: 0 0 40%;
  max-width: 40%;
  padding: 0 15px;
  display: flex;
  justify-content: center;
}

/* Card de login */
.card-primary {
  background: linear-gradient(
    180deg,
    rgba(24, 2, 46, 0.6),
    rgba(35, 0, 60, 0.6)
  );
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border: none;
  position: relative;
  overflow: hidden;
  padding: 2rem;
  margin-right: 1rem;
  min-width: 300px;
  width: 100%;
  color: white;
}

.card-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.06;
  pointer-events: none;
}

/* Cabeçalho do card */
.text-center {
  text-align: center;
  margin-bottom: 2rem;
}

.text-center h3 {
  font-size: 1.5rem;
  margin: 0 0 8px 0;
  font-weight: normal;
}

.text-center h1 {
  font-weight: 800;
  font-size: 4rem;
  margin: 0;
}

/* Formulário */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  color: rgba(255, 255, 255, 0.9);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-col {
  flex: 0 0 auto;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
}

.input-col {
  flex: 1;
}

.form-control {
  width: 100%;
  border-radius: 8px;
  border: none;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.94);
  font-size: 1rem;
  outline: none;
}

.form-control::placeholder {
  color: #9b6fe6;
}

.form-control:focus {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 0 3px rgba(145, 51, 210, 0.2);
}

/* Botão */
.btn-primary {
  width: 100%;
  background-color: #9133d2;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 2.5rem;
  box-shadow: 0 6px 12px rgba(145, 51, 210, 0.25);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.btn-primary:hover:not(:disabled) {
  background-color: #7a28b0;
  box-shadow: 0 8px 16px rgba(145, 51, 210, 0.35);
  transform: translateY(-2px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsividade */
@media (max-width: 767px) {
  .row {
    flex-direction: column;
  }

  .col-left {
    flex: 0 0 100%;
    max-width: 100%;
    display: none;
  }

  .col-right {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .card-primary {
    margin-right: 0;
  }

  .text-center h1 {
    font-size: 3rem;
  }

  .text-center h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .card-primary {
    padding: 1.5rem;
  }

  .text-center h1 {
    font-size: 2.5rem;
  }
}

/**
 * Estilos para validação de inputs - Login
 */

/* Input com erro */
.form-control.input-error {
  border: 2px solid #ff4444 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.15) !important;
}

/* Mensagem de erro */
.form-group .input-error-message {
  color: #ff4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  animation: slideDown 0.3s ease;
  padding-left: 30px;
}

.form-group .input-error-message::before {
  content: "⚠ ";
  margin-right: 0.25rem;
}

/* Animação para mensagem de erro */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Feedback visual no foco do input com erro */
.form-control.input-error:focus {
  box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.25) !important;
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 1024px) {
  .col-left {
    flex: 0 0 55%;
    max-width: 55%;
  }

  .col-right {
    flex: 0 0 45%;
    max-width: 45%;
  }

  .text-center h1 {
    font-size: 3rem;
  }

  .svg-icon {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .row {
    flex-direction: column;
  }

  .col-left,
  .col-right {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 1rem 15px;
  }

  .col-right {
    display: none;
  }

  .card-primary {
    margin: 0;
    max-width: 500px;
    margin: 0 auto;
  }

  .text-center h1 {
    font-size: 2.5rem;
  }

  .text-center h3 {
    font-size: 1.2rem;
  }

  .container {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .card-primary {
    padding: 1.5rem;
    min-width: 280px;
  }

  .text-center h1 {
    font-size: 2rem;
  }

  .text-center h3 {
    font-size: 1rem;
  }

  .form-control {
    font-size: 0.95rem;
    padding: 0.7rem;
  }

  .btn-primary {
    padding: 0.8rem;
    font-size: 0.95rem;
  }

  .footer-link {
    font-size: 0.85rem;
  }

  .icon-col {
    width: 25px;
  }

  .icon-col i {
    font-size: 1rem;
  }
}
