/* ============================================================
   Vesta Academy — Auth Pages (login, registro, recuperar senha)
   ============================================================ */

/* Reset da página de auth */
.vesta-auth-page {
  margin: 0;
  padding: 0;
  background: #f5f6f7;
  font-family: 'Metrisch', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Layout split */
.vesta-auth-wrap {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ── Coluna Imagem ── */
.vesta-auth-image {
  flex: 0 0 44%;
  position: relative;
  overflow: hidden;
  background: #0d2b2e;
}

.vesta-auth-image img:not(.vesta-auth-logo img) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: .92;
}

/* Overlay escuro sutil */
.vesta-auth-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(13,43,46,.45) 0%, rgba(0,0,0,.18) 100%);
  pointer-events: none;
}

/* Logo sobre a imagem */
.vesta-auth-logo {
  position: absolute;
  top: 32px;
  left: 36px;
  z-index: 2;
  display: block;
}

.vesta-auth-logo img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* ── Coluna Formulário ── */
.vesta-auth-form-col {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: #fff;
}

.vesta-auth-form-inner {
  width: 100%;
  max-width: 440px;
}

/* Título */
.vesta-auth-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-slate-grey, #003a40);
  margin: 0 0 32px;
  line-height: 1.2;
}

.vesta-auth-subtitle {
  font-size: .95rem;
  color: #6b7280;
  margin: -20px 0 28px;
  line-height: 1.5;
}

/* Mensagem de feedback */
.vesta-auth-msg {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.4;
}

.vesta-auth-msg.is-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.vesta-auth-msg.is-success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

/* Campo */
.vesta-field-group {
  margin-bottom: 20px;
}

.vesta-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .84rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  cursor: default;
}

.vesta-field-label svg {
  color: #9ca3af;
  flex-shrink: 0;
}

.vesta-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: .95rem;
  color: #111827;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
}

.vesta-input:focus {
  border-color: var(--dark-slate-grey, #003a40);
  box-shadow: 0 0 0 3px rgba(0, 58, 64, .1);
}

.vesta-input.is-invalid {
  border-color: #ef4444;
}

/* Campo com ícone toggle de senha */
.vesta-input-wrap {
  position: relative;
}

.vesta-input-wrap .vesta-input {
  padding-right: 46px;
}

.vesta-toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #9ca3af;
  display: flex;
  align-items: center;
  transition: color .2s;
}

.vesta-toggle-pw:hover {
  color: #374151;
}

/* Link "Esqueci minha senha" */
.vesta-auth-link-sm {
  display: block;
  margin-top: 6px;
  font-size: .82rem;
  color: var(--dark-slate-grey, #003a40);
  text-decoration: none;
  font-weight: 500;
  transition: opacity .2s;
}

.vesta-auth-link-sm:hover {
  opacity: .7;
}

/* Botão principal */
.vesta-btn-primary {
  width: 100%;
  padding: 14px 24px;
  background: var(--dark-slate-grey, #003a40);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .2s, transform .1s;
  margin-top: 8px;
}

.vesta-btn-primary:hover {
  background: #004d55;
}

.vesta-btn-primary:active {
  transform: scale(.99);
}

.vesta-btn-primary:disabled {
  opacity: .65;
  cursor: not-allowed;
}

/* Spinner */
@keyframes vesta-spin {
  to { transform: rotate(360deg); }
}

.vesta-btn-primary .spin {
  animation: vesta-spin .7s linear infinite;
}

/* Divisor social */
.vesta-social-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
}

.vesta-social-divider::before,
.vesta-social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.vesta-social-divider span {
  font-size: .8rem;
  color: #9ca3af;
  white-space: nowrap;
}

/* Botões sociais */
.vesta-social-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.vesta-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: .9rem;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}

.vesta-social-btn:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* Link de troca (Não tem conta? / Você tem conta?) */
.vesta-auth-switch {
  text-align: center;
  font-size: .88rem;
  color: #6b7280;
  margin: 0;
}

.vesta-auth-link {
  color: var(--dark-slate-grey, #003a40);
  font-weight: 700;
  text-decoration: none;
}

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

/* ── Responsivo ── */
@media (max-width: 768px) {
  .vesta-auth-image {
    display: none;
  }

  .vesta-auth-form-col {
    padding: 40px 20px;
  }

  .vesta-auth-title {
    font-size: 1.6rem;
  }
}
