@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800&display=swap');

:root {
  --pv-orange: #feb52a;
  --pv-gold: #e8a317;
  --pv-gold-dark: #cf8d0c;
  --pv-magenta: #d4146a;
  --pv-ink: #1c1c1c;
  --pv-muted: #8d8d8d;
  --pv-line: #e4e4e4;
  --pv-card: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--pv-orange);
}

.portal-body {
  min-height: 100dvh;
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  color: var(--pv-ink);
  background: transparent;
}

.portal-body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background-color: var(--pv-orange);
  background-image: url('../img/fundo-login.jpg');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

.portal-shell {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
}

.portal-card {
  width: 100%;
  max-width: 420px;
  min-width: 0;
  background: var(--pv-card);
  border-radius: 22px;
  padding: 28px 22px 22px;
  box-shadow: 0 16px 40px rgba(90, 40, 0, 0.16);
}

.portal-logo {
  display: block;
  width: min(250px, 86%);
  height: auto;
  margin: 2px auto 0;
}

.portal-title {
  margin: 18px 0 8px;
  text-align: center;
  font-size: 1.65rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--pv-ink);
}

.portal-lead {
  margin: 0 0 22px;
  text-align: center;
  color: var(--pv-muted);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.portal-field {
  margin-bottom: 14px;
}

.portal-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--pv-ink);
}

.portal-field input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--pv-line);
  border-radius: 8px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--pv-ink);
  background: #fff;
  outline: none;
}

.portal-field input::placeholder {
  color: #b5b5b5;
  font-weight: 600;
}

.portal-field input:focus {
  border-color: #f0b43a;
  box-shadow: 0 0 0 3px rgba(232, 163, 23, 0.2);
}

.portal-erro {
  margin: -6px 0 12px;
  color: var(--pv-magenta);
  font-size: 0.82rem;
  font-weight: 700;
}

.portal-opcoes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 4px 0 18px;
}

.portal-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #8a8a8a;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.portal-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--pv-magenta);
  flex: 0 0 auto;
}

.portal-link {
  color: var(--pv-magenta);
  font-weight: 800;
  font-size: 0.84rem;
  text-decoration: none;
}

.portal-opcoes .portal-link {
  margin-left: auto;
}

.portal-link:hover {
  color: #b10e58;
  text-decoration: underline;
}

.portal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--pv-gold);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.portal-btn:hover,
.portal-btn:focus {
  background: var(--pv-gold-dark);
  color: #fff;
}

.portal-rodape {
  margin: 18px 0 4px;
  text-align: center;
  color: #9a9a9a;
  font-size: 0.95rem;
  font-weight: 700;
}

.portal-rodape .portal-link {
  font-size: inherit;
}

.portal-voltar {
  display: block;
  margin-top: 16px;
  text-align: center;
}

.portal-btn-texto {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pv-magenta);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.portal-btn-texto:hover,
.portal-btn-texto:focus {
  color: #b10e58;
  text-decoration: underline;
}

@media (max-width: 360px) {
  .portal-opcoes {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-card {
    padding: 24px 16px 18px;
  }

  .portal-title {
    font-size: 1.45rem;
  }
}

@media (min-width: 768px) {
  .portal-body::before {
    background-position: center center;
    background-size: auto min(100dvh, 980px);
  }

  .portal-shell {
    padding: 40px 24px;
  }

  .portal-card {
    max-width: 440px;
    padding: 36px 32px 28px;
    border-radius: 26px;
  }

  .portal-logo {
    width: 270px;
  }
}

@media (max-height: 740px) {
  .portal-shell {
    align-items: flex-start;
  }
}

.portal-shell-topo {
  align-items: flex-start;
  padding-top: 18px;
}

.portal-card-cadastro .portal-logo {
  width: min(186px, 64%);
}

.portal-cabeca {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin: 12px 0 16px;
}

.portal-cabeca h1 {
  margin: 0;
  text-align: center;
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 800;
}

.portal-seta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pv-ink);
  cursor: pointer;
  text-decoration: none;
}

.portal-passo {
  display: none;
}

.portal-passo.ativo {
  display: block;
}

.portal-nota {
  margin: 0 0 14px;
  text-align: left;
  color: #6d6d6d;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
}

.portal-field select,
.portal-field textarea {
  width: 100%;
  border: 1px solid var(--pv-line);
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--pv-ink);
  background: #fff;
  outline: none;
}

.portal-field select {
  height: 48px;
  padding: 0 36px 0 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5 10 12.5 15 7.5' fill='none' stroke='%238a8a8a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.portal-field textarea {
  min-height: 148px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.4;
}

.portal-field select:focus,
.portal-field textarea:focus {
  border-color: #f0b43a;
  box-shadow: 0 0 0 3px rgba(232, 163, 23, 0.2);
}

.portal-field select:has(option[value='']:checked) {
  color: #b5b5b5;
}

.portal-fone {
  display: flex;
  gap: 8px;
}

.portal-fone select {
  width: 86px;
  flex: 0 0 86px;
  padding-left: 10px;
  padding-right: 26px;
  background-position: right 6px center;
  font-weight: 800;
}

.portal-fone input {
  min-width: 0;
  flex: 1 1 auto;
}

.portal-card-cadastro .portal-field label {
  line-height: 1.3;
}

.portal-escolha {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
  color: #3f3f3f;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}

.portal-escolha input {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  border: 2px solid #e6a21a;
  background: #fff;
  flex: 0 0 auto;
}

.portal-escolha input[type='checkbox'] {
  border-radius: 6px;
}

.portal-escolha input[type='radio'] {
  border-radius: 50%;
}

.portal-escolha input[type='checkbox']:checked {
  border-color: #e8a317;
  background-color: #e8a317;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.2 6.4 11.4 12.8 4.6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
}

.portal-escolha input[type='radio']:checked {
  border-color: #e8a317;
  background: radial-gradient(circle, #e8a317 0 6px, #fff 7px);
}

.portal-escolha-fixa {
  pointer-events: none;
}

.portal-aceite {
  align-items: flex-start;
  margin: 2px 0 16px;
  color: #6a6a6a;
  font-size: 0.92rem;
  line-height: 1.35;
}

.portal-aceite input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.portal-passo .portal-btn {
  margin-top: 8px;
}

.portal-sucesso {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
  background: rgba(48, 28, 18, 0.46);
}

.portal-sucesso-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  padding: 22px 20px 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.portal-sucesso-topo {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.portal-sucesso-topo h1 {
  flex: 1;
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 800;
}

.portal-sucesso-fim {
  white-space: nowrap;
}

.portal-sucesso-fechar {
  color: #9a9a9a;
  font-size: 1.7rem;
  line-height: 0.8;
  text-decoration: none;
  font-weight: 400;
}

.portal-sucesso-card p {
  margin: 0 0 14px;
  color: #6d7280;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.4;
}

.portal-sucesso-card strong {
  color: #3a4150;
  font-weight: 800;
}

.portal-sucesso-card .portal-btn {
  margin-top: 6px;
  letter-spacing: 0.04em;
}

.portal-body.portal-fundo-escuro::before {
  background-color: #2c2116;
  background-image: linear-gradient(rgba(34, 24, 14, 0.84), rgba(34, 24, 14, 0.84)), url('../img/fundo-login.jpg');
}

.portal-sucesso.portal-sucesso-limpo {
  background: transparent;
}

@media (min-width: 768px) {
  .portal-shell-topo {
    padding-top: 40px;
  }
}
