:root {
  --brand: #0b66c3;
  --brand-dark: #094f97;
  --bg: #f2f6fb;
  --surface: #ffffff;
  --text: #16202a;
  --muted: #667085;
  --danger: #b42318;
  --stroke: rgba(15, 23, 42, 0.1);
  --shadow: 0 24px 70px rgba(9, 79, 151, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(11, 102, 195, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 102, 195, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
}

body.modal-ativa {
  overflow: hidden;
}

.topo {
  padding: 24px 18px 90px;
  background: var(--brand);
  color: #fff;
}

.topo__conteudo {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.topo__titulo {
  flex: 1;
  text-align: center;
  padding-right: 48px;
}

.topo__titulo p {
  margin: 0 0 5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}

.topo__titulo h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 40px);
}

.btn-voltar {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  font-size: 24px;
}

.pagina {
  width: min(1100px, calc(100% - 36px));
  flex: 1;
  margin: -54px auto 0;
  position: relative;
}

.apresentacao {
  min-height: 390px;
  padding: clamp(28px, 6vw, 64px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 35px;
  border: 1px solid var(--stroke);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

.etiqueta,
.modal__mini {
  display: block;
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.apresentacao h2 {
  max-width: 650px;
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
}

.apresentacao p {
  max-width: 620px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.apresentacao__icone {
  width: min(250px, 100%);
  aspect-ratio: 1;
  margin: auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #eaf4ff, #cde5ff);
  color: var(--brand);
  font-size: clamp(40px, 7vw, 70px);
  font-weight: bold;
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.55);
}

.rodape {
  padding: 28px 18px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.btn {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primario {
  background: var(--brand);
  color: #fff;
}

.btn--primario:hover {
  background: var(--brand-dark);
}

.btn--secundario {
  border: 1px solid rgba(11, 102, 195, 0.16);
  background: #eef5fd;
  color: var(--brand);
}

.btn--texto {
  background: transparent;
  color: var(--brand);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  padding: 20px;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal--aberta {
  display: flex;
}

.modal__fundo {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 32, 0.64);
  backdrop-filter: blur(6px);
}

.modal__caixa {
  width: min(480px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  position: relative;
  z-index: 1;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal__caixa--cadastro {
  width: min(720px, 100%);
}

.modal__cabecalho {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal__cabecalho h2 {
  margin: 0;
  font-size: 25px;
}

.modal__icone {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(11, 102, 195, 0.11);
  color: var(--brand);
  font-size: 18px;
  font-weight: bold;
}

.formulario,
.campo {
  display: grid;
  gap: 8px;
}

.formulario {
  gap: 18px;
}

.formulario__grade {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.campo label {
  font-size: 14px;
  font-weight: bold;
}

.campo input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 13px;
  outline: none;
  background: #fff;
  color: var(--text);
  font-size: 15px;
}

.campo input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(11, 102, 195, 0.1);
}

.campo-senha {
  position: relative;
}

.campo-senha input {
  padding-right: 78px;
}

.btn-senha {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: bold;
  cursor: pointer;
}

.modal__acoes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal__acoes .btn--texto {
  grid-column: 1 / -1;
}

.modal__acoes--direita {
  display: flex;
  justify-content: flex-end;
}

.mensagem-formulario {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 14px;
  text-align: center;
}

.modal-resultado {
  z-index: 30;
}

.modal__caixa--resultado {
  width: min(420px, 100%);
  text-align: center;
}

.resultado__icone {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 34px;
  font-weight: bold;
}

.modal__caixa--resultado h2 {
  margin: 0 0 10px;
}

.resultado__mensagem {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

.modal__caixa--resultado .btn {
  width: 100%;
}

.modal-resultado--sucesso .resultado__icone {
  background: #dcfae6;
  color: #067647;
}

.modal-resultado--alerta .resultado__icone {
  background: #fff4cc;
  color: #b54708;
}

.modal-resultado--erro .resultado__icone {
  background: #fee4e2;
  color: var(--danger);
}

@media (max-width: 700px) {
  .apresentacao {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .apresentacao p {
    margin-right: auto;
    margin-left: auto;
  }

  .apresentacao__icone {
    width: 170px;
    grid-row: 1;
  }

  .formulario__grade {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .modal {
    padding: 12px;
  }

  .modal__caixa {
    max-height: calc(100vh - 24px);
    padding: 22px 18px;
    border-radius: 20px;
  }

  .modal__acoes {
    grid-template-columns: 1fr;
  }

  .modal__acoes .btn--texto {
    grid-column: auto;
  }

  .modal__acoes--direita {
    display: grid;
  }
}
