/* Rico Mobile · linguagem visual compartilhada com o CRM (etapa 2).
   Carregado após o CSS legado para preservar os fluxos e contratos do formulário. */
:root {
  --bg: #F3F0E7;
  --surface: #FDFBF5;
  --surface-2: #EAE5D8;
  --black2: #FDFBF5;
  --black3: #F3F0E7;
  --border: #D7D6C9;
  --yellow: #D6AD3E;
  --yellow-dim: rgba(214, 173, 62, .14);
  --text: #252B22;
  --text-muted: #636B5A;
  --gray: #636B5A;
  --dim: #636B5A;
  --success: #346745;
  --danger: #A44335;
  --warning: #8B6410;
  --rico-ink: #252B22;
  --rico-muted: #636B5A;
  --rico-accent-text: #7C5B08;
  --rico-shadow: 0 18px 50px rgba(68, 61, 32, .08);
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
body::before { display: none; }
* { min-width: 0; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(214, 173, 62, .62);
  outline-offset: 2px;
}

nav {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: max(12px, env(safe-area-inset-top)) max(24px, calc((100vw - 1000px) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: none;
  box-shadow: none;
}
nav img.logo { width: 68px; height: auto; object-fit: contain; }
.badge-tipo {
  position: static;
  transform: none;
  padding: 7px 12px;
  background: var(--yellow-dim);
  border: 1px solid rgba(124, 91, 8, .2);
  border-radius: 100px;
  color: var(--rico-accent-text);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
}

.container {
  width: min(100%, 760px);
  max-width: 760px;
  padding: clamp(28px, 5vw, 56px) 24px calc(52px + env(safe-area-inset-bottom));
}
.page-header { text-align: left; margin-bottom: 28px; }
.page-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--rico-accent-text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}
.page-tag::before { content: ""; width: 16px; height: 3px; border-radius: 3px; background: var(--yellow); }
.page-title {
  margin-bottom: 10px;
  color: var(--rico-ink);
  font-family: inherit;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 760;
  line-height: 1.07;
  letter-spacing: -.055em;
  text-transform: none;
}
.page-subtitle { max-width: 55ch; color: var(--rico-muted); font-size: 16px; line-height: 1.5; font-weight: 400; }

.card {
  overflow: visible;
  margin-bottom: 18px;
  padding: clamp(21px, 4vw, 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--rico-shadow);
}
.card::before { display: none; }
.card-title {
  margin-bottom: 20px;
  color: var(--rico-ink);
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-transform: none;
  line-height: 1.25;
}
.form-group { margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }
.form-label, .form-group > label {
  margin-bottom: 7px;
  color: var(--rico-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.form-input {
  min-height: 52px;
  padding: 12px 15px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--rico-ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 450;
}
.form-input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-dim); }
.form-input::placeholder { color: #8B9085; }
textarea.form-input { min-height: 104px; }
select.form-input { background-color: var(--bg); background-image: none; }
.tipo-pessoa-toggle { gap: 8px; margin-bottom: 20px; }
.tipo-pessoa-btn, .wpp-btn {
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--rico-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.tipo-pessoa-btn.ativo {
  background: var(--yellow-dim);
  border-color: var(--yellow);
  color: var(--rico-accent-text);
}
.doc-status, .wpp-status { font-size: 13px; }
.wpp-confirm {
  padding: 14px;
  background: var(--yellow-dim);
  border: 1px solid rgba(124, 91, 8, .2);
  border-radius: 14px;
}
.wpp-confirm-txt { color: var(--rico-ink); }
.wpp-confirm-num { color: var(--rico-accent-text); }
.wpp-confirm-acoes { flex-wrap: wrap; }

.item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.item-btn {
  min-height: 62px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--rico-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.25;
}
.item-btn:hover, .modelo-btn:hover { border-color: var(--yellow); }
.item-btn.selecionado, .modelo-btn.selecionado {
  border-color: var(--yellow);
  background: var(--yellow-dim);
  color: var(--rico-accent-text);
  box-shadow: inset 0 0 0 1px var(--yellow);
}
.item-btn:disabled, .item-btn.indisponivel { opacity: 1; background: #F5F4EF; border-style: dashed; color: var(--rico-muted); cursor: not-allowed; }
.item-btn .item-indisp { color: var(--rico-muted); font-size: 11px; line-height: 1.3; }
.modelo-grid { gap: 10px; }
.modelo-btn {
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 15px;
}
.modelo-btn img { height: 120px; background: var(--surface-2); }
.modelo-btn .modelo-nome { padding: 10px; color: var(--rico-ink); font-family: inherit; font-size: 13px; font-weight: 650; }
.modelo-btn.selecionado .modelo-nome { color: var(--rico-accent-text); }
.modelo-status { color: var(--rico-muted); }

.termo-toggle {
  min-height: 52px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 13px;
}
.termo-toggle:hover { border-color: var(--yellow); }
.termo-toggle-label {
  color: var(--rico-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.termo-toggle-icon { color: var(--rico-muted); }
.termo-toggle.aberto { border: 1px solid var(--yellow); border-radius: 13px 13px 0 0; }
body:has(#form-section) .termo-toggle:not(.aberto),
body:has(#form-section) .termo-box.aberto { margin-bottom: 20px; }
.termo-box {
  max-height: 350px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--yellow);
  border-top: 0;
  border-radius: 0 0 13px 13px;
  color: var(--rico-ink);
  font-size: 14px;
  line-height: 1.7;
}
.termo-box p { margin-bottom: 12px; }
.destaque, .aviso-intermediacao, .frase-video {
  padding: 14px 16px;
  background: var(--yellow-dim);
  border: 1px solid rgba(124, 91, 8, .18);
  border-radius: 13px;
  color: var(--rico-ink);
  line-height: 1.55;
}
.aviso-intermediacao strong { color: var(--rico-accent-text); }
.checkbox-wrap {
  align-items: flex-start;
  padding: 15px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 13px;
}
.checkbox-wrap input[type="checkbox"] { accent-color: var(--yellow); width: 20px; height: 20px; min-width: 20px; }
.checkbox-label { color: var(--rico-muted); font-size: 14px; }
.checkbox-label strong { color: var(--rico-ink); }
.msg-erro { background: rgba(164, 67, 53, .08); border: 1px solid rgba(164, 67, 53, .3); border-radius: 12px; color: var(--danger); }

.btn, .btn-wpp {
  min-height: 52px;
  padding: 13px 20px;
  border: 0;
  border-radius: 15px;
  clip-path: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}
.btn { background: var(--yellow); color: var(--rico-ink); }
.btn:hover:not(:disabled) { background: #C8A034; box-shadow: 0 8px 18px rgba(124, 91, 8, .14); }
.btn:disabled { opacity: .45; }
.btn-wpp { background: var(--success); color: #fff; }
.btn-wpp:hover { background: #285437; box-shadow: none; }
.btns-finais { gap: 10px; }

.sucesso-icon { text-align: left; margin-bottom: 22px; }
.sucesso-icon .check { color: var(--success); font-family: inherit; font-size: clamp(30px, 6vw, 42px); font-weight: 750; line-height: 1.1; letter-spacing: -.04em; text-transform: none; }
.sucesso-icon .sub { color: var(--rico-muted); }
.codigo-box { padding: 22px; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; }
.codigo-box::before { display: none; }
.codigo-label { color: var(--rico-muted); font-size: 12px; }
.codigo-valor { color: var(--rico-accent-text); font-size: clamp(24px, 5vw, 32px); }

/* Formulários de comprador e vendedor: composição centralizada em todas as etapas. */
body:has(#form-section) .container { width: min(100%, 640px); max-width: 640px; padding-top: max(78px, calc(env(safe-area-inset-top) + 28px)); text-align: center; }
body:has(#form-section) .form-logo { display: block; width: calc(68px * 1.3); height: auto; margin: 0 auto 42px; object-fit: contain; }
body:has(#form-section) .page-header { text-align: center; }
body:has(#form-section) .page-subtitle { margin-inline: auto; }
body:has(#form-section) .card-title { text-align: center; }
.card-subtitle {
  margin: -12px 0 20px;
  color: var(--rico-accent-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}
body:has(#form-section) .form-label,
body:has(#form-section) .form-group > label { text-align: center; }
body:has(#form-section) .form-input,
body:has(#form-section) select.form-input { text-align: center; text-align-last: center; }
body:has(#form-section) select.form-input.form-select { padding-inline: 40px; text-align: center; text-align-last: center; }
body:has(#form-section) .doc-status,
body:has(#form-section) .wpp-status,
body:has(#form-section) .wpp-confirm-txt,
body:has(#form-section) .modelo-status,
body:has(#form-section) .msg-erro { text-align: center; }
body:has(#form-section) .wpp-confirm-acoes { justify-content: center; }
body:has(#form-section) .termo-toggle { position: relative; justify-content: center; padding-inline: 36px; text-align: center; }
body:has(#form-section) .termo-toggle-icon { position: absolute; right: 16px; }
body:has(#form-section) .termo-box { text-align: left; }
body:has(#form-section) .checkbox-wrap { flex-direction: column; align-items: center; text-align: center; }
body:has(#form-section) .checkbox-wrap input[type="checkbox"] { margin-top: 0; }
body:has(#form-section) .sucesso-icon { text-align: center; }
.copy-avaliacao { display: none; }
html.avaliacao-direta #card-escolha-item,
html.avaliacao-selecionada .copy-comprador { display: none; }
html.avaliacao-selecionada .copy-avaliacao { display: inline; }

/* Escolha inicial de perfil. */
body:has(.opcoes) { justify-content: flex-start; }
body:has(.opcoes) .container { width: min(100%, 560px); max-width: 560px; padding-top: max(clamp(78px, 10vh, 112px), calc(env(safe-area-inset-top) + 28px)); text-align: center; }
body:has(.opcoes) .landing-logo { display: block; width: 102px; height: auto; margin: 0 auto 42px; object-fit: contain; }
body:has(.opcoes) .page-title { font-size: clamp(36px, 6vw, 56px); }
body:has(.opcoes) .page-subtitle { margin: 0 auto 32px; }
.opcoes { grid-template-columns: 1fr; width: min(100%, 480px); gap: 12px; margin-inline: auto; }
.opcao-btn, .opcao-avaliacao {
  min-height: 120px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  color: var(--rico-ink);
  box-shadow: var(--rico-shadow);
  text-align: center;
  align-items: center;
}
.opcao-btn::before, .opcao-avaliacao::before { display: none; }
.opcao-btn:hover, .opcao-avaliacao:hover { border-color: var(--yellow); background: var(--surface); box-shadow: 0 18px 50px rgba(68, 61, 32, .12); }
.opcao-label { color: var(--rico-ink); font-family: inherit; font-size: 23px; font-weight: 750; line-height: 1.15; letter-spacing: -.035em; text-transform: none; }
.opcao-desc { color: var(--rico-muted); font-size: 14px; }
.opcoes .opcao-avaliacao { grid-column: auto; min-height: 120px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.opcao-avaliacao .opcao-label { font-size: 20px !important; }

@media (max-width: 640px) {
  nav { min-height: 75px; padding: max(10px, env(safe-area-inset-top)) 20px 12px; }
  nav img.logo { width: 58px; }
  .badge-tipo { display: inline-flex; font-size: 10px; }
  .container { padding: 30px 16px calc(40px + env(safe-area-inset-bottom)); }
  .page-header { margin-bottom: 23px; }
  .page-title { font-size: 33px; }
  .card { padding: 20px; border-radius: 20px; }
  .card-title { font-size: 17px; }
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-btn { min-height: 56px; }
  #item-grid-main .item-btn:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc((100% - 9px) / 2); justify-self: center; }
  .btns-finais { grid-template-columns: 1fr; }
  .opcoes { grid-template-columns: 1fr; }
  .opcao-btn, .opcoes .opcao-avaliacao { min-height: 110px; }
  body:has(.opcoes) .container { padding-top: max(58px, calc(env(safe-area-inset-top) + 28px)); }
  body:has(.opcoes) .landing-logo { width: 87px; margin-bottom: 38px; }
  body:has(#form-section) .container { padding-top: max(58px, calc(env(safe-area-inset-top) + 28px)); }
  body:has(#form-section) .form-logo { width: calc(58px * 1.3); margin-bottom: 38px; }
  html.avaliacao-selecionada body.sucesso-ativo:has(#form-section) .container { padding-top: max(26px, calc(env(safe-area-inset-top) + 10px)); }
  html.avaliacao-selecionada body.sucesso-ativo:has(#form-section) .form-logo { margin-bottom: 22px; }
  html.avaliacao-selecionada body.sucesso-ativo .sucesso-icon { margin-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
