/* ========================================================= RESET ========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========================================================= VARIÁVEIS ========================================================= */

:root {
  --bg-page: #F2F3F5;
  --bg-card: #ffffff;
  --text-primary: #1b2736;
  --text-secondary: #6f7f97;
  --text-label: #112947;
  --line-color: #dbe3ea;
  --input-border: #ccd6df;
  --input-bg: #ffffff;
  --placeholder: #8190a5;
  --button-bg: #1b2736;
  --button-bg-hover: #142033;
  --accent: #007785;

  --container-width: 920px;
  --form-width: 760px;

  --radius-card: 18px;
  --radius-input: 10px;
  --radius-button: 12px;

  --shadow-card: 0 8px 24px rgba(15, 35, 66, 0.04);
}

/* ========================================================= BASE ========================================================= */

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.45;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ========================================================= LAYOUT GERAL ========================================================= */

.layout-container {
  width: min(calc(100% - 2rem), var(--container-width));
  margin: 0 auto;
}

.layout-section-register {
  padding: 2rem 0 2.75rem;
}

.layout-register-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* ========================================================= TOPO DO FORMULÁRIO ========================================================= */

.component-section-header h1 {
  font-size: clamp(1.2rem, 2.0vw, 2.2rem);
  line-height: 1.08;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.component-section-header-left {
  text-align: center;
}

.component-tag {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.component-description {
  max-width: 680px;
  margin: 0 auto;
  font-size: clamp(1rem, 1.15vw, 1.05rem);
  line-height: 1.45;
  color: var(--text-secondary);
}

/* ========================================================= CARD DO FORMULÁRIO ========================================================= */

.component-register-card {
  width: 100%;
  max-width: var(--form-width);
  background: var(--bg-card);
  border: 1px solid #e6edf3;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.9rem 2rem 1.7rem;
}

.component-form {
  width: 100%;
}

/* ========================================================= TÍTULOS DAS SEÇÕES ========================================================= */

.component-form-title {
  position: relative;
  text-align: center;
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 1.15rem;
  padding-bottom: 0.7rem;
}

.component-form-title:not(:first-child) {
  margin-top: 1.9rem;
}

.component-form-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--line-color);
}

/* ========================================================= GRID ========================================================= */

.layout-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem 1rem;
  margin-bottom: 0.9rem;
}

/* ========================================================= CAMPOS ========================================================= */

.component-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  margin-bottom: 0.95rem;
}

.component-input-group label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-label);
  text-align: center;
}

.component-form .component-input-group label {
  text-align: left;
}

.layout-form-grid .component-input-group label {
  text-align: center;
}

.layout-form-grid .component-input-group input,
.layout-form-grid .component-input-group select {
  text-align: left;
}

.component-input-group input,
.component-input-group select,
.component-input-group textarea {
  width: 100%;
  min-height: 39px;
  height: 39px;
  padding: 0.62rem 0.82rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-input);
  background: var(--input-bg);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  font-size: 0.9rem;
}

.component-input-group textarea {
  min-height: 100px;
  height: auto;
  resize: vertical;
}

.component-input-group input::placeholder,
.component-input-group textarea::placeholder {
  color: var(--placeholder);
}

.component-input-group input:focus,
.component-input-group select:focus,
.component-input-group textarea:focus {
  border-color: #a8b8c8;
  box-shadow: 0 0 0 3px rgba(27, 42, 65, 0.06);
}

.component-input-group select {
  background-image:
    linear-gradient(45deg, transparent 50%, #41536b 50%),
    linear-gradient(135deg, #41536b 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.3rem;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

/* ========================================================= BOTÃO ========================================================= */

.button-primary {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius-button);
  background: var(--button-bg);
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 700;
  margin-top: 0.35rem;
  box-shadow: 0 8px 18px rgba(15, 35, 66, 0.12);
  transition: 0.25s ease;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.button-primary i,
.button-primary svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.button-primary:hover {
  background: var(--button-bg-hover);
  transform: translateY(-1px);
}

/* ========================================================= TERMOS DE USO ========================================================= */

.terms-check {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.9rem;
  margin: 0.25rem 0 1rem;
  border: 1px solid #d6e1e6;
  border-radius: 10px;
  background: #ffffff;
  color: #6f7f97;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.terms-check input {
  display: none;
}

.terms-check-icon {
  width: 17px;
  height: 17px;
  min-width: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #007785;
  color: #ffffff;
}

.terms-check-icon i,
.terms-check-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.terms-link {
  border: none;
  background: transparent;
  color: #006b73;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}

.terms-link:hover {
  text-decoration: underline;
}

/* ========================================================= MODAL TERMOS DE USO ========================================================= */

body.modal-open {
  overflow: hidden;
}

.terms-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.78);
}

.terms-modal-overlay.is-active {
  display: flex;
}

.terms-modal {
  position: relative;
  width: min(100%, 670px);
  max-height: 86vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.terms-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #9fc7c4;
  border-radius: 50%;
  background: #ffffff;
  color: #007785;
  cursor: pointer;
  transition: 0.2s ease;
}

.terms-modal-close:hover {
  background: #f2fbfb;
  transform: scale(1.04);
}

.terms-modal-close i,
.terms-modal-close svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}

.terms-modal-content {
  max-height: 86vh;
  overflow-y: auto;
  padding: 1.6rem 1.6rem 1.8rem;
  color: #1b2736;
}

.terms-modal-content h2 {
  font-size: 1.55rem;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: #0f2238;
}

.terms-modal-updated {
  font-size: 0.9rem;
  color: #60728a;
  margin-bottom: 1.2rem;
}

.terms-modal-content h3 {
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 800;
  margin: 1.25rem 0 0.35rem;
  color: #0f2238;
}

.terms-modal-content p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #5f7088;
}

.terms-modal-content::-webkit-scrollbar {
  width: 9px;
}

.terms-modal-content::-webkit-scrollbar-track {
  background: #eef3f5;
}

.terms-modal-content::-webkit-scrollbar-thumb {
  background: #9b9b9b;
  border-radius: 20px;
}

/* ========================================================= AJUSTES FINAIS ========================================================= */

.component-form > .component-input-group {
  width: 100%;
}

.component-form > .component-input-group label {
  text-align: center;
}

.component-form > .component-input-group label,
.component-form > .component-input-group input,
.component-form > .component-input-group select {
  text-align: left;
}

/* ========================================================= RESPONSIVO ========================================================= */

@media (max-width: 991px) {
  .layout-section-register {
    padding: 1.6rem 0 2.4rem;
  }

  .layout-register-container {
    gap: 1.3rem;
  }

  .component-section-header h1 {
    font-size: clamp(1.95rem, 5vw, 2.8rem);
  }

  .component-register-card {
    max-width: 100%;
    padding: 1.5rem 1.3rem;
  }
}

@media (max-width: 767px) {
  .layout-container {
    width: min(calc(100% - 1rem), 920px);
  }

  .layout-section-register {
    padding: 1rem 0 1.8rem;
  }

  .layout-register-container {
    gap: 1rem;
  }

  .component-section-header {
    max-width: 100%;
  }

  .component-tag {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
  }

  .component-section-header h1 {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
    margin-bottom: 0.55rem;
  }

  .component-description {
    font-size: 0.92rem;
    line-height: 1.4;
  }

  .component-register-card {
    padding: 1rem 0.9rem;
    border-radius: 15px;
  }

  .layout-form-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
  }

  .component-form-title {
    font-size: 1.15rem;
    margin-bottom: 0.95rem;
    padding-bottom: 0.6rem;
  }

  .component-form-title:not(:first-child) {
    margin-top: 1.4rem;
  }

  .component-input-group {
    margin-bottom: 0.8rem;
  }

  .component-input-group label,
  .layout-form-grid .component-input-group label {
    text-align: left;
    font-size: 0.9rem;
  }

  .component-input-group input,
  .component-input-group select,
  .component-input-group textarea {
    min-height: 42px;
    height: 42px;
    padding: 0.72rem 0.8rem;
    font-size: 0.92rem;
  }

  .component-input-group textarea {
    min-height: 96px;
    height: auto;
  }

  .button-primary {
    min-height: 45px;
    font-size: 0.94rem;
  }

  .terms-check {
    align-items: flex-start;
    font-size: 0.84rem;
    line-height: 1.4;
  }

  .terms-modal-overlay {
    padding: 0.8rem;
  }

  .terms-modal {
    width: 100%;
    max-height: 88vh;
  }

  .terms-modal-content {
    max-height: 88vh;
    padding: 1.3rem 1.1rem 1.5rem;
  }

  .terms-modal-content h2 {
    font-size: 1.35rem;
  }

  .terms-modal-content h3 {
    font-size: 0.95rem;
  }

  .terms-modal-content p {
    font-size: 0.86rem;
  }
}

@media (max-width: 420px) {
  .component-section-header h1 {
    font-size: 1.55rem;
  }

  .component-description {
    font-size: 0.88rem;
  }

  .component-form-title {
    font-size: 1.08rem;
  }

  .component-input-group input,
  .component-input-group select,
  .component-input-group textarea {
    font-size: 0.9rem;
  }
}
.terms-check {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.terms-check input#acceptTerms {
  display: inline-block !important;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: static !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  margin: 0 !important;
}