/* ---------- Estrutura da página de entrada ---------- */
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
}

/* ---------- Painel de marca (vermelho) ---------- */
.auth-marca {
  position: relative;
  color: #fff;
  background:
    radial-gradient(900px 500px at 110% -10%, rgba(255, 255, 255, 0.14), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(0, 0, 0, 0.25), transparent 60%),
    linear-gradient(160deg, var(--vermelho) 0%, var(--vermelho-escuro) 60%, var(--vermelho-profundo) 100%);
  padding: calc(22px + env(safe-area-inset-top)) 20px 26px;
  overflow: hidden;
}
.auth-marca::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.04), 0 0 0 80px rgba(255, 255, 255, 0.03);
  pointer-events: none;
}
.auth-marca-interior { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 26px; height: 100%; }

.marca { display: flex; align-items: center; gap: 12px; }
.marca-icone {
  width: 46px; height: 46px; border-radius: 12px;
  background: #fff; color: var(--vermelho);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  position: relative;
}
.marca-icone::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px;
  height: 3px; border-radius: 2px; background: var(--dourado);
}
.marca-texto { display: flex; flex-direction: column; line-height: 1.05; }
.marca-texto strong { font-size: 22px; font-weight: 800; letter-spacing: 0.02em; }
.marca-texto span { font-size: 11px; font-weight: 700; letter-spacing: 0.34em; opacity: 0.9; }

.auth-marca-texto h1 { font-size: 28px; line-height: 1.15; margin-bottom: 10px; max-width: 460px; }
.auth-marca-texto p { margin: 0; opacity: 0.88; max-width: 440px; }

.auth-vantagens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-vantagens li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.auth-vantagens li > span {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* No telemóvel: cabeçalho compacto, sem a lista de vantagens */
.auth-marca-texto, .auth-vantagens { display: none; }

/* ---------- Painel do formulário ---------- */
.auth-painel {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
  margin-top: -14px;
  position: relative;
  z-index: 2;
}
.auth-caixa {
  width: 100%;
  max-width: 440px;
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: 20px;
  box-shadow: var(--sombra-forte);
  padding: 24px 20px;
}
.auth-cabecalho { margin-bottom: 18px; }
.auth-cabecalho h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.auth-cabecalho p { margin: 0; font-size: 14px; }

/* ---------- Abas (Entrar / Criar conta) ---------- */
.abas {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin-bottom: 20px;
  background: #f0f0f3; border-radius: 12px;
}
.aba {
  min-height: 42px; border: 0; border-radius: 9px;
  background: transparent; color: var(--texto-suave);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.aba:hover { color: var(--texto); }
.aba.ativa { background: var(--branco); color: var(--vermelho); box-shadow: 0 1px 4px rgba(20, 20, 30, 0.12); }

/* ---------- Avisos ---------- */
.aviso {
  padding: 12px 14px; margin-bottom: 16px;
  border-radius: var(--raio-pequeno);
  font-size: 14px; font-weight: 500; line-height: 1.4;
}
.aviso-erro { background: #fdecec; color: #a11b1b; border: 1px solid #f6caca; }

.auth-rodape { text-align: center; margin: 16px 0 0; }

/* ---------- Computador ---------- */
@media (min-width: 900px) {
  .auth { grid-template-columns: 1.05fr 1fr; }

  .auth-marca { padding: 48px 56px; display: flex; }
  .auth-marca-interior { justify-content: space-between; gap: 40px; }
  .auth-marca-texto, .auth-vantagens { display: block; }
  .auth-vantagens { display: flex; }
  .auth-marca-texto h1 { font-size: 38px; }
  .auth-marca-texto p { font-size: 16px; }

  .auth-painel { align-items: center; margin-top: 0; padding: 40px 32px; background: var(--fundo); }
  .auth-caixa { box-shadow: var(--sombra); padding: 34px 32px; }
}

/* ---------- Telemóvel: mostrar título e vantagens ---------- */
@media (max-width: 899px) {
  .auth-marca { padding-bottom: 40px; }
  .auth-marca-interior { gap: 16px; }
  .auth-marca-texto { display: block; }
  .auth-marca-texto h1 { font-size: 22px; line-height: 1.2; margin: 0; }
  .auth-marca-texto p { display: none; }
  .auth-vantagens { display: flex; gap: 8px; }
  .auth-vantagens li { gap: 10px; font-size: 13px; font-weight: 500; opacity: 0.95; }
  .auth-vantagens li > span { width: 26px; height: 26px; border-radius: 8px; }
  .auth-vantagens .icone { width: 15px; height: 15px; }
}