:root {
  --primary: #b1975a;
  --primary-hover: #a2884f;
  --primary-disabled: #cccccc;
  --gray-dark: #3c3c3b;
  --gray-medium: #707070;
  --gray-light: #faf6ec;
  --white: #fff;
  --border-radius: 12px;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}
html {
  box-sizing: border-box;
}
html,
body {
  background: var(--white);
  font-family: 'Montserrat', Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: var(--gray-dark);
  min-height: 100vh;
}
body {
  min-height: 100vh;
  width: 100vw;
  box-sizing: border-box;
}
/* Container principal dos cadastros e home */
.container {
  max-width: 1300px;
  margin: 30px auto 30px auto;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 4px 24px #0001;
  padding: 30px 24px 40px 24px;
}
/* Header e navegação: botão à esquerda */
.header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 20px;
  padding-left: 0;
  padding-top: 0;
}
.back-link,
.inicio-link {
  display: flex;
  align-items: center;
  color: var(--primary);
  text-decoration: none;
  font-size: 1.08em;
  font-weight: 500;
  transition: color 0.13s;
}
.back-link svg,
.inicio-link svg {
  margin-right: 7px;
}
.back-link:hover,
.inicio-link:hover {
  color: var(--primary-hover);
}
.back-link:focus,
.inicio-link:focus {
  outline: 2px solid var(--primary-hover);
  outline-offset: 2px;
}
/* Títulos */
h1,
.titulo-cadastro {
  text-align: center;
  color: var(--primary);
  font-size: 2.6em;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 6px;
  letter-spacing: -1px;
}
.titulo-cadastro {
  font-size: 3em;
  margin-bottom: 18px;
}
h2.section-title {
  text-align: center;
  color: var(--primary);
  font-size: 1.35em;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 6px;
  letter-spacing: 0.1px;
  text-transform: uppercase;
}
.section-desc {
  text-align: center;
  color: var(--primary);
  font-size: 1em;
  margin-bottom: 24px;
  font-weight: 400;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
/* Home page (index.html) */
.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 80vh;
  width: 100%;
  margin-top: 0;
}
.cadastro-panel {
  margin-top: 60px;
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.boas-vindas {
  text-align: center;
  font-weight: 700;
  font-size: 1.3em;
  color: var(--gray-dark);
  margin-bottom: 10px;
  margin-top: 0;
}
.orientacao {
  text-align: center;
  color: var(--gray-dark);
  font-size: 1.2em;
  font-weight: 400;
  margin-bottom: 36px;
  margin-top: 0;
}
.botoes-cadastro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  margin-top: 10px;
  max-width: 340px;
}
.cadastro-btn {
  width: 100%;
  min-width: 180px;
  max-width: 340px;
  padding: 15px 0 11px 0;
  font-size: 1.13em;
  border-radius: 9px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  outline: none;
  text-align: center;
  border: 2px solid var(--primary);
  margin: 0;
  display: block;
  text-decoration: none;
}
.cadastro-btn.juridica {
  background: var(--primary);
  color: #fff;
}
.cadastro-btn.juridica:hover,
.cadastro-btn.juridica:focus {
  background: var(--primary-hover);
  color: #fff;
}
.cadastro-btn.fisica {
  background: var(--white);
  color: var(--primary);
}
.cadastro-btn.fisica:hover,
.cadastro-btn.fisica:focus {
  background: var(--gray-light);
  color: var(--primary);
}
/* Formulários de cadastro */
form {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 32px;
  margin: 20px 0;
}
@media (max-width: 900px) {
  .container {
    max-width: 99vw;
    padding: 9px 2vw;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px 0;
  }
}
.label-hidden {
  position: absolute !important;
  left: -9999px;
}
.input-style,
.select-style {
  width: 100%;
  font-family: inherit;
  font-size: 1.08em;
  border: 2px solid var(--primary);
  border-radius: var(--border-radius);
  background: var(--white);
  color: var(--gray-dark);
  padding: 16px 13px 12px 13px;
  margin: 0;
  box-sizing: border-box;
  transition: border 0.14s;
  outline: none;
}

.select-style {
  color: var(--primary);
}

.input-style:focus,
.select-style:focus {
  border-color: var(--primary-hover);
  outline: 2px solid var(--primary-hover);
}
.input-style[type='file'] {
  background: var(--gray-light);
  padding: 11px 13px;
  font-size: 1em;
  border: 2px solid var(--primary);
  cursor: pointer;
}
.input-file-label {
  display: flex;
  align-items: center;
  border: 2px solid var(--primary);
  border-radius: var(--border-radius);
  background: var(--white);
  padding: 12px 13px;
  font-size: 1.08em;
  color: #a99860;
  cursor: pointer;
  margin-bottom: 5px;
  transition: border 0.14s;
  height: 48px;
}
.input-file-label input[type='file'] {
  display: none;
}
.input-file-label svg {
  margin-right: 10px;
  font-size: 1.28em;
  flex-shrink: 0;
  vertical-align: middle;
  display: inline-block;
}
.file-label-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-note {
  font-size: 0.83em;
  color: var(--gray-medium);
  margin-bottom: 8px;
  margin-top: -3px;
  margin-left: 2px;
  line-height: 1.18em;
}
/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}
.checkbox-group label {
  font-size: 1.08em;
  font-weight: 400;
  margin-bottom: 0;
  color: var(--gray-dark);
  cursor: pointer;
  margin-left: 8px;
  line-height: 1.45em;
  user-select: none;
}
.checkbox-group input[type='checkbox'] {
  accent-color: var(--primary);
  width: 22px;
  height: 22px;
  margin-right: 8px;
  margin-top: 0px;
}

.submit-row {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  margin-bottom: 18px;
  width: 100%;
}
button[type='submit'],
.btn-submit {
  background: var(--primary-disabled);
  color: #fff;
  border: 2px solid var(--primary);
  border-radius: var(--border-radius);
  font-size: 1.19em;
  font-weight: 600;
  padding: 14px 0;
  min-width: 270px;
  width: 320px;
  cursor: pointer;
  transition: background 0.18s;
  opacity: 1;
  position: relative;
}
button[type='submit']:enabled,
.btn-submit:enabled {
  background: var(--primary);
}
button[type='submit']:enabled:hover,
.btn-submit:enabled:hover,
button[type='submit']:enabled:focus,
.btn-submit:enabled:focus {
  background: var(--primary-hover);
}
button[type='submit']:focus,
.btn-submit:focus {
  outline: 2px solid var(--primary-hover);
  outline-offset: 2px;
}
#upload-status {
  color: var(--primary);
  font-size: 1.04em;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 0;
}
#result {
  text-align: center;
  color: red;
  font-weight: 700;
  margin-top: 7px;
}
::placeholder {
  color: #a99860;
  opacity: 1;
  font-size: 1.07em;
}
:-ms-input-placeholder {
  color: #a99860;
}
::-ms-input-placeholder {
  color: #a99860;
}
.select-style {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--white)
    url('data:image/svg+xml;utf8,<svg fill="#B1975A" height="22" width="22" viewBox="0 0 20 20"><path d="M5.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"/></svg>')
    no-repeat right 13px center/18px 18px;
}
/* Responsivo */
@media (max-width: 900px) {
  .container {
    max-width: 99vw;
    padding: 9px 2vw;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px 0;
  }
}
@media (max-width: 730px) {
  .container {
    padding: 9px 0.5vw;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 9px 0;
  }
  .submit-row {
    margin-top: 28px;
  }
  button[type='submit'],
  .btn-submit {
    min-width: 90vw;
    width: 99vw;
  }
}
@media (max-width: 650px) {
  .main-content {
    margin-top: 10px;
  }
  .cadastro-panel {
    margin-top: 18px;
    padding: 0 2vw;
  }
  .titulo-cadastro {
    font-size: 2.1em;
  }
  .orientacao {
    font-size: 1em;
  }
  .botoes-cadastro {
    max-width: 98vw;
  }
  .cadastro-btn {
    font-size: 1em;
    min-width: 120px;
  }
  .header {
    padding: 18px 10px 0 10px;
  }
}
@media (max-width: 400px) {
  .titulo-cadastro {
    font-size: 1.25em;
  }
  .boas-vindas,
  .orientacao {
    font-size: 0.97em;
  }
  .cadastro-btn {
    font-size: 0.95em;
  }
}

@media (max-width: 600px) {
  .container {
    max-width: 100vw;
    width: 100vw;
    padding-left: 4vw;
    padding-right: 4vw;
    box-sizing: border-box;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px 0;
  }
  .input-style,
  .select-style {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-size: 1em;
  }

  button[type='submit'],
  .btn-submit {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-size: 1em;
  }
}

#required-fields-message {
  color: red;
  margin-bottom: 16px;
  display: none;
}

.error {
  border: 2px solid red;
  color: red;

  &::placeholder {
    color: red;
  }
}

.checkbox-error {
  color: red !important;
  text-decoration: underline;
  a {
    color: red;
  }
}

.loader {
  width: 36px;
  height: 36px;
  border: 5px solid #a2884f;
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.hide-element {
  display: none;
}

#freelancer-zip-loader,
#agency-zip-loader,
#master-zip-loader {
  position: absolute;
  right: 12px;
  top: 6px;
}

#freelancer-zip-not-found,
#agency-zip-not-found,
#master-zip-not-found {
  position: absolute;
  bottom: -16px;
  left: 8px;
  font-size: 12px;
  color: red;
}

#success-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 32px;
}

#success-title {
  font-size: 36px;
  color: (var(--gray-medium));
}
