/* style/auth.css - Login Fullscreen 50/50 Haute-Couture Minimalista & Elegante */

body.auth-page-body {
  background-color: #ffffff !important;
  min-height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: var(--font-family);
  color: #241813;
  -webkit-font-smoothing: antialiased;
}

/* ================= CONTAINER PRINCIPAL A 100% DA LARGURA ================= */
.login-master-container {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50% Banner e 50% Formulário */
  box-sizing: border-box;
  background: #ffffff;
}

/* ================= 50% ESQUERDA: BANNER COM FUNDO TERRACOTA EXATO (#b85d38) ================= */
.login-banner-card {
  width: 100%;
  min-height: 100vh;
  background-color: #b85d38; /* Cor lisa exata da imagem gerada, fusão 100% perfeita sem bordas */
  padding: 0 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.banner-content-top {
  position: relative;
  z-index: 2;
  max-width: 520px;
  padding-top: 80px; /* Texto um pouco mais abaixo com respiro editorial */
}

.banner-title {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: #ffffff;
}

.banner-title .underline-curved {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.banner-title .underline-curved svg {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 10px;
  stroke: #ffffff;
}

.banner-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 300;
  letter-spacing: 0.2px;
}

/* Imagem Grande, Imponente e Perfeitamente Fundida */
.banner-characters-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-top: 20px;
  line-height: 0;
}

.banner-characters-container img {
  width: 100%;
  max-width: 1080px; /* Imagem ampliada e marcante */
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-banner-card:hover .banner-characters-container img {
  transform: translateY(-4px) scale(1.01);
}

/* ================= 50% DIREITA: FORMULÁRIO EDITORIAL, FINO E ELEGANTE ================= */
.login-form-card {
  width: 100%;
  min-height: 100vh;
  padding: 50px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  box-sizing: border-box;
}

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

/* Header & Logótipo Maior */
.login-brand-row {
  margin-bottom: 30px;
}

.login-brand-row img {
  max-height: 60px; /* Logótipo aumentado e imponente */
  width: auto;
  object-fit: contain;
  display: block;
}

.form-welcome-heading {
  font-size: 1.85rem;
  font-weight: 700;
  color: #1f140e;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.form-welcome-sub {
  font-size: 0.875rem;
  color: #7c6d64;
  margin-bottom: 30px;
  line-height: 1.5;
  font-weight: 400;
}

/* Inputs Finos, Delicados e Elegantes (Boutique de Luxo) */
.input-clean-field {
  position: relative;
  margin-bottom: 18px;
}

.field-micro-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #6b5c54;
  margin-bottom: 6px;
}

.input-soft {
  width: 100%;
  height: 44px; /* Mais fino, elegante e proporcional */
  background-color: #ffffff;
  border: 1px solid #e0d7cf; /* Linha fina e sofisticada */
  border-radius: 8px; /* Traços refinados */
  padding: 0 14px;
  font-size: 0.9rem;
  color: #1f140e;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.input-soft:focus {
  background-color: #ffffff;
  border-color: #b85d38;
  box-shadow: 0 0 0 1.5px #b85d38;
}

.input-soft::placeholder {
  color: #a89a91;
  font-size: 0.875rem;
  font-weight: 300;
}

/* Botão Olho */
.btn-toggle-eye {
  position: absolute;
  right: 10px;
  bottom: 8px;
  background: none;
  border: none;
  color: #a89a91;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.btn-toggle-eye:hover {
  color: #b85d38;
}

.login-row-options {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
  margin-bottom: 24px;
}

.link-forgot {
  font-size: 0.8rem;
  color: #7c6d64;
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}

.link-forgot:hover {
  color: #b85d38;
}

/* Botão Principal Fino, Alfaiatado e Marcante */
.btn-login-orange {
  width: 100%;
  height: 44px; /* Fino e elegante */
  background: #b85d38;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-login-orange:hover {
  background: #9c4322;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(184, 93, 56, 0.25);
}

.btn-login-orange:active {
  transform: scale(0.99);
}

/* Divisor Delicado */
.divider-clean-row {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: #a89a91;
  font-size: 0.775rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.divider-clean-row::before,
.divider-clean-row::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #ebe4dc;
}

.divider-clean-row span {
  padding: 0 14px;
}

/* Botões de Acesso Rápido */
.social-login-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.btn-social-outline {
  height: 40px; /* Reduzido e fino */
  border: 1px solid #e0d7cf;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #4a3e36;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-social-outline:hover {
  background: #faf7f4;
  border-color: #b85d38;
  color: #b85d38;
}

.btn-social-outline svg {
  width: 16px;
  height: 16px;
}

/* Rodapé */
.login-bottom-link {
  text-align: center;
  font-size: 0.85rem;
  color: #7c6d64;
}

.login-bottom-link a {
  color: #b85d38;
  font-weight: 600;
  text-decoration: none;
}

.login-bottom-link a:hover {
  text-decoration: underline;
  color: #9c4322;
}

/* ================= STEPS DO CADASTRO (HAUTE-COUTURE & MINIMALISTA) ================= */
.step-header-nav {
  margin-bottom: 26px;
}

.step-bars-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.step-bar-item {
  flex: 1;
  height: 3px;
  background-color: #ebe4dc;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.step-bar-item.active {
  background-color: #b85d38;
}

.step-caption {
  font-size: 0.725rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #b85d38;
  display: block;
}

.form-step {
  display: none;
  animation: stepFade 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.form-step.active {
  display: block;
}

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

.step-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.btn-step-back {
  background: none;
  border: 1px solid #e0d7cf;
  border-radius: 8px;
  height: 44px;
  padding: 0 16px;
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #7c6d64;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-step-back:hover {
  background: #faf7f4;
  color: #1f140e;
  border-color: #b85d38;
}

/* ================= PÁGINAS SECUNDÁRIAS (REGISTO, OTP, RESEND) ================= */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px 20px;
  background-color: #faf8f5;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e0d7cf;
  padding: 36px 32px;
  box-shadow: 0 10px 30px rgba(36, 24, 19, 0.04);
  text-align: center;
}

.auth-header {
  margin-bottom: 24px;
}

.auth-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: #1f140e;
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: #7c6d64;
  line-height: 1.5;
}

.auth-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #f0e9e2;
  font-size: 0.875rem;
  color: #7c6d64;
}

.auth-footer a {
  color: #b85d38;
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* OTP Digits */
.otp-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 26px;
}

.otp-digit {
  width: 44px;
  height: 52px;
  border: 1px solid #dcd2c8;
  background-color: #ffffff;
  color: #1f140e;
  border-radius: 8px;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

.otp-digit:focus {
  border-color: #b85d38;
  box-shadow: 0 0 0 1.5px #b85d38;
}

/* ================= RESPONSIVIDADE (MOBILE / DISPOSITIVOS PEQUENOS) ================= */
/* Em ecrãs médios e tablets */
@media (max-width: 1024px) {
  .login-form-card {
    padding: 40px 32px;
  }
  .login-banner-card {
    padding: 0 36px;
  }
  .banner-content-top {
    padding-top: 50px;
  }
  .banner-title {
    font-size: 2.1rem;
  }
}

/* Em dispositivos móveis / ecrãs pequenos (< 900px):
   O banner lateral é completamente ocultado e o formulário fica no topo a 100% de largura */
@media (max-width: 900px) {
  .login-master-container {
    display: block !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    min-height: 100vh;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff;
  }

  /* Oculta totalmente o banner lateral */
  .login-banner-card {
    display: none !important;
  }

  /* Formulário no topo e a 100% de largura */
  .login-form-card {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh;
    padding: 36px 24px 50px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Alinhado ao topo */
    align-items: center;
    box-sizing: border-box;
    background: #ffffff;
  }

  .login-form-inner {
    width: 100% !important;
    max-width: 440px;
    margin: 0 auto;
  }
}

/* Dispositivos móveis muito pequenos (< 480px) */
@media (max-width: 480px) {
  .login-form-card {
    padding: 24px 16px 40px;
  }

  .login-brand-row {
    margin-bottom: 22px;
  }

  .login-brand-row img {
    max-height: 48px;
  }

  .form-welcome-heading {
    font-size: 1.5rem;
  }

  .form-welcome-sub {
    font-size: 0.825rem;
    margin-bottom: 20px;
  }

  .step-header-nav {
    margin-bottom: 20px;
  }

  .step-action-row {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .step-action-row .btn-step-back,
  .step-action-row .btn-login-orange {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .otp-container {
    gap: 6px;
  }

  .otp-digit {
    width: 40px;
    height: 48px;
    font-size: 1.25rem;
  }
}
