/* ==========================================================================
   bioma — pasta digital
   Tokens e regras conforme DESIGN_SYSTEM_RULES.md (§3, §4, §8)
   ========================================================================== */

:root {
  /* núcleo oficial */
  --bioma-green: #4C5939;
  --bioma-sand:  #DEC19F;
  --bioma-leaf:  #7B9351;

  /* escala UI */
  --green-900: #2F3A22;
  --green-700: #3E4A2E;
  --green-300: #75815C;
  --green-100: #E4E7DC;
  --leaf-300:  #A8BC85;
  --sand-700:  #C2A37D;
  --sand-200:  #EFE3CF;
  --sand-100:  #F7F0E4;

  /* semânticos */
  --bg-page: var(--sand-100);
  --bg-surface-dark: var(--bioma-green);
  --text-primary: var(--bioma-green);
  --text-on-dark: var(--bioma-sand);
  --accent-decorative: var(--bioma-leaf); /* nunca texto */
  --error: #8C3B2E; /* uso funcional de formulário, fora de peças de marca */

  /* tipografia */
  --font-display: "Fraunces", "Canela", "Silk Serif", serif; /* lowercase only */
  --font-sans: "Poppins", "Century Gothic", sans-serif;
  --tracking-eyebrow: 0.16em;

  /* forma e movimento */
  --radius-card: 16px;
  --radius-field: 10px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(76, 89, 57, 0.05), 0 6px 24px rgba(76, 89, 57, 0.05);
  --ease-breeze: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-slow: 550ms;
  --t-med: 380ms;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Elementos com [hidden] somem SEMPRE, mesmo quando uma classe define display
   (ex.: .fieldset { display: grid } anularia o hidden sem esta regra). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

/* ---------- utilitários de marca ---------- */

.eyebrow {
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  opacity: 0.65;
}

em { font-style: normal; color: inherit; }

/* ==========================================================================
   Header — Modo Mata
   ========================================================================== */

.topbar {
  background: var(--bg-surface-dark);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar__brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  text-decoration: none;
}

.topbar__endorse {
  color: var(--text-on-dark);
  font-size: 12.5px;
  font-weight: 400;
  opacity: 0.9;
}
.topbar__endorse b { font-weight: 600; }
.topbar__endorse::before {
  content: "_";
  color: var(--accent-decorative);
  font-weight: 600;
}

.topbar__logo { height: 24px; width: auto; display: block; transform: translateY(3px); }

.topbar__nav { display: flex; gap: 8px; }

.navpill {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-on-dark);
  background: transparent;
  border: 1px solid rgba(222, 193, 159, 0.35);
  border-radius: var(--radius-pill);
  padding: 7px 18px;
  cursor: pointer;
  transition: background var(--t-med) var(--ease-breeze), color var(--t-med) var(--ease-breeze), border-color var(--t-med) var(--ease-breeze);
}

.navpill.is-active,
.navpill:hover {
  background: var(--bioma-sand);
  color: var(--bioma-green);
  border-color: var(--bioma-sand);
}

/* ==========================================================================
   Views
   ========================================================================== */

.view { display: none; }
.view.is-visible { display: block; animation: viewIn var(--t-slow) var(--ease-breeze); }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  max-width: 1040px;
  margin: 0 auto;
  padding: 52px 24px 36px;
  text-align: center;
}

.hero__lines {
  position: absolute;
  top: -16px;
  left: -60px;
  width: 320px;
  color: var(--sand-700);
  opacity: 0.3;
  pointer-events: none;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  margin: 10px 0 14px;
}

.hero__lead {
  max-width: 540px;
  margin: 0 auto;
  font-size: 15.5px;
  opacity: 0.9;
}
.hero__lead strong { font-weight: 500; }

/* ==========================================================================
   Stepper
   ========================================================================== */

.stepper {
  max-width: 680px;
  margin: 0 auto 30px;
  padding: 0 24px;
}

.stepper ol {
  list-style: none;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stepper__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  opacity: 0.4;
  transition: opacity var(--t-med) var(--ease-breeze);
}

.stepper__item.is-current,
.stepper__item.is-done { opacity: 1; }

.stepper__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--green-300);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  transition: background var(--t-med) var(--ease-breeze), color var(--t-med) var(--ease-breeze), border-color var(--t-med) var(--ease-breeze);
}

.stepper__item.is-current .stepper__dot {
  background: var(--bioma-green);
  border-color: var(--bioma-green);
  color: var(--bioma-sand);
}

.stepper__item.is-done .stepper__dot {
  background: var(--green-100);
  border-color: var(--green-100);
}

.stepper__label { font-size: 12px; }

.stepper__bar {
  height: 2px;
  border-radius: 2px;
  background: var(--green-100);
  overflow: hidden;
}

.stepper__progress {
  display: block;
  height: 100%;
  background: var(--accent-decorative);
  border-radius: 2px;
  transition: width var(--t-slow) var(--ease-breeze);
}

/* ==========================================================================
   Formulário
   ========================================================================== */

.ficha {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 88px;
}

.step { display: none; }
.step.is-active { display: block; animation: viewIn var(--t-slow) var(--ease-breeze); }

.card {
  background: #FFFFFF;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px 32px 34px;
  margin-bottom: 20px;
}

.card__head { margin-bottom: 24px; }

.card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 4.5vw, 33px);
  line-height: 1.12;
  text-transform: lowercase;
  margin-top: 6px;
}

.card__hint {
  margin-top: 10px;
  font-size: 14px;
  max-width: 500px;
  opacity: 0.75;
}

/* ---------- segmented PF/PJ ---------- */

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--green-100);
  background: var(--sand-100);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
  margin-bottom: 26px;
  max-width: 380px;
}

.segmented__opt { position: relative; }
.segmented__opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }

.segmented__opt span {
  display: block;
  text-align: center;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: var(--radius-pill);
  color: var(--bioma-green);
  transition: background var(--t-med) var(--ease-breeze), color var(--t-med) var(--ease-breeze);
}

.segmented__opt input:checked + span {
  background: var(--bioma-green);
  color: var(--bioma-sand);
}

/* ---------- campos ---------- */

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

.fieldset--nested { margin-top: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }

.field label,
.field__legend {
  font-size: 13.5px;
  font-weight: 500;
}

.field label em { color: var(--sand-700); font-weight: 600; }

.field input,
.field textarea {
  font-family: var(--font-sans);
  font-size: 16px; /* ≥16px impede o zoom automático do iOS ao focar */
  font-weight: 300;
  color: var(--text-primary);
  background: #FFFFFF;
  border: 1px solid var(--green-100);
  border-radius: var(--radius-field);
  padding: 12px 15px;
  outline: none;
  width: 100%;
  transition: border-color var(--t-med) var(--ease-breeze), box-shadow var(--t-med) var(--ease-breeze);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--green-300); opacity: 0.55; }

.field input:focus,
.field textarea:focus {
  border-color: var(--green-300);
  box-shadow: 0 0 0 3px rgba(123, 147, 81, 0.12);
}

.field.is-invalid input { border-color: var(--error); }

.field__error {
  display: none;
  font-size: 12.5px;
  color: var(--error);
}

.field.is-invalid .field__error { display: block; }

/* ---------- chips ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }

.chip span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 8px 18px;
  border: 1px solid var(--green-100);
  background: #FFFFFF;
  border-radius: var(--radius-pill);
  font-size: 14px;
  line-height: 1.35;
  transition: background var(--t-med) var(--ease-breeze), color var(--t-med) var(--ease-breeze), border-color var(--t-med) var(--ease-breeze);
}

.chip:hover span { border-color: var(--green-300); }

.chip span small {
  font-size: 11.5px;
  opacity: 0.6;
}

.chip input:checked + span {
  background: var(--bioma-green);
  border-color: var(--bioma-green);
  color: var(--bioma-sand);
}

.chips--big .chip span { padding: 12px 24px; }

/* ---------- notices ---------- */

.notice {
  border-radius: var(--radius-field);
  padding: 12px 16px;
  font-size: 13.5px;
  margin: 16px 0 4px;
}
.notice strong { font-weight: 500; }

.notice--sand { background: var(--sand-200); }

/* ---------- documentos ---------- */

.docs__group {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  margin: 20px 0 8px;
  color: var(--green-300);
}

.doc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--green-100);
  border-radius: var(--radius-field);
  padding: 11px 14px;
  margin-bottom: 8px;
  transition: border-color var(--t-med) var(--ease-breeze), background var(--t-med) var(--ease-breeze);
}

.doc.has-files { border-color: var(--leaf-300); background: #FDFBF6; }

.doc__name { font-size: 14.5px; font-weight: 400; display: block; }
.doc__name small { display: block; font-size: 12px; opacity: 0.55; font-weight: 300; }
.doc__name em { color: var(--error); font-style: normal; font-weight: 600; margin-left: 1px; }
.doc.is-invalid { border-color: var(--error); background: #FDF3F2; }

.doc__actions { display: flex; gap: 6px; }

.doc__btn {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--bioma-green);
  background: var(--sand-100);
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  cursor: pointer;
  transition: background var(--t-med) var(--ease-breeze), color var(--t-med) var(--ease-breeze);
}

.doc__btn:hover { background: var(--bioma-green); color: var(--bioma-sand); }

.doc__files {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ---------- Acesso VIP (Pix Dia D) ---------- */

.prioridade {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}

.prioridade__qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--sand-100);
  border: 1px solid var(--green-100);
  border-radius: var(--radius-field);
  padding: 14px;
}

.prioridade__code { width: 100%; max-width: 180px; }
.prioridade__code svg { display: block; width: 100%; height: auto; border-radius: 6px; }
.prioridade__qrimg { display: block; width: 100%; height: auto; border-radius: 6px; background: #fff; }
.prioridade__code--vazio { display: none; }

.prioridade__valor { font-size: 13.5px; }
.prioridade__valor strong { font-weight: 600; }

.prioridade__pendente {
  font-size: 12.5px;
  text-align: center;
  opacity: 0.65;
  max-width: 200px;
}

.prioridade__confirma { display: flex; flex-direction: column; gap: 12px; }

.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14.5px;
}

.check input {
  width: 19px;
  height: 19px;
  margin-top: 1px;
  flex: none;
  accent-color: var(--bioma-green);
  cursor: pointer;
}

@media (max-width: 640px) {
  .prioridade { grid-template-columns: 1fr; }
  .prioridade__qr { max-width: 260px; margin: 0 auto; width: 100%; }
}

.filechip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sand-100);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.filechip__thumb {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: var(--sand-200);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--bioma-green);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  overflow: hidden;
}

.filechip__thumb--pdf { background: var(--green-100); }
.filechip__thumb--ph::after { content: "···"; opacity: 0.5; }

.filechip__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.filechip__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.filechip__bar {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: var(--sand-200);
  overflow: hidden;
}

.filechip__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: var(--accent-decorative);
  transition: width 200ms var(--ease-breeze);
}

.filechip__status { font-size: 12px; opacity: 0.65; line-height: 1.3; }
.filechip.is-ok .filechip__status { color: var(--green-700); opacity: 1; }
.filechip.is-error .filechip__status { color: var(--error); opacity: 1; }

.filechip__view,
.filechip__retry {
  flex: none;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--bioma-green);
  background: #FFFFFF;
  border: 1px solid var(--green-100);
  border-radius: var(--radius-pill);
  padding: 5px 13px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-med) var(--ease-breeze);
}

.filechip__view:hover,
.filechip__retry:hover { background: var(--green-100); }

.filechip__retry { color: var(--error); border-color: rgba(140, 59, 46, 0.3); }

.filechip__remove {
  flex: none;
  border: none;
  background: none;
  color: var(--bioma-green);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  opacity: 0.6;
}
.filechip__remove:hover { opacity: 1; }

.docs__tip {
  font-size: 13px;
  opacity: 0.65;
  margin-top: 18px;
}

/* ---------- resumo ---------- */

.resumo { display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }

.resumo__sec {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--green-300);
  margin: 14px 0 4px;
}

.resumo__row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
  border-bottom: 1px solid var(--green-100);
  font-size: 14.5px;
}

.resumo__row dt { font-weight: 300; opacity: 0.7; }
.resumo__row dd { font-weight: 500; text-align: right; }

/* ---------- botões ---------- */

.step__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  padding: 13px 30px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  transition: background var(--t-med) var(--ease-breeze), color var(--t-med) var(--ease-breeze), transform var(--t-med) var(--ease-breeze);
}

.btn:active { transform: scale(0.985); }

/* CTA primário: verde sólido, texto bege (DS §8.1) */
.btn--primary {
  background: var(--bioma-green);
  color: var(--bioma-sand);
}
.btn--primary:hover { background: var(--green-700); }

.btn--ghost {
  background: transparent;
  color: var(--bioma-green);
  border: 1px solid var(--green-300);
}
.btn--ghost:hover { background: var(--green-100); border-color: var(--green-100); }

.btn--mini { padding: 7px 15px; font-size: 13px; background: #FFFFFF; color: var(--bioma-green); border: 1px solid var(--green-100); }
.btn--mini:hover { background: var(--green-100); }
.btn--mini-solid { background: var(--bioma-green); color: var(--bioma-sand); border: none; }
.btn--mini-solid:hover { background: var(--green-700); }

.btn[disabled] { opacity: 0.55; pointer-events: none; }

.btn__spinner {
  width: 15px;
  height: 15px;
  border: 2px solid var(--bioma-sand);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- sucesso ---------- */

.step--success { text-align: center; }

.success {
  position: relative;
  padding: 56px 24px;
}

.success__badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
}

.success__badge svg { width: 30px; height: 30px; }

.success__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 54px);
  text-transform: lowercase;
  line-height: 1.05;
  margin: 10px 0 14px;
}

.success__text { max-width: 460px; margin: 0 auto 30px; font-size: 15px; }
.success__text strong { font-weight: 500; }
.success__text small { opacity: 0.7; }

.success__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Materiais
   ========================================================================== */

.materials {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 88px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 20px;
}

.mat-card {
  background: #FFFFFF;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mat-card--wide { grid-column: 1 / -1; }

.fieldset--profile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 4px;
}

.mat-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  text-transform: lowercase;
  line-height: 1.12;
}

.mat-card__desc { font-size: 14.5px; opacity: 0.8; }
.mat-card__desc--small { font-size: 13px; opacity: 0.65; }

.mat-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

.msg {
  background: var(--sand-100);
  border-radius: var(--radius-field);
  padding: 14px 16px;
}

.msg + .msg { margin-top: 10px; }

.msg__label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--green-300);
  margin-bottom: 6px;
}

.msg__text {
  font-size: 14px;
  white-space: pre-line;
  margin-bottom: 12px;
}

.msg__actions { display: flex; gap: 8px; }

.logos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.logos__item {
  border-radius: var(--radius-field);
  padding: 24px 18px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 12.5px;
  transition: transform var(--t-med) var(--ease-breeze);
}

.logos__item:hover { transform: translateY(-3px); }

.logos__item img { width: 76%; height: auto; }

.logos__item--sand { background: var(--sand-200); color: var(--bioma-green); }
.logos__item--green { background: var(--bioma-green); color: var(--bioma-sand); }

/* ==========================================================================
   Footer — assinatura (DS §7)
   ========================================================================== */

.footer {
  background: var(--bg-surface-dark);
  color: var(--text-on-dark);
  text-align: center;
  padding: 48px 24px 36px;
}

.footer__logo { height: 30px; width: auto; margin-bottom: 12px; }

.footer__tagline {
  font-family: var(--font-display);
  font-size: 17px;
  text-transform: lowercase;
  margin-bottom: 18px;
}

.footer__legal {
  font-size: 12px;
  opacity: 0.55;
}

/* ==========================================================================
   Modal da câmera (desktop)
   ========================================================================== */

.cam {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(47, 58, 34, 0.88);
  display: grid;
  place-items: center;
  padding: 20px;
}

.cam__box {
  background: var(--sand-100);
  border-radius: var(--radius-card);
  padding: 20px;
  max-width: min(860px, 94vw);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cam__titulo { font-size: 14px; text-align: center; }

.cam video {
  width: 100%;
  max-height: 62vh;
  border-radius: var(--radius-field);
  background: #1d2415;
  object-fit: contain;
}

.cam__actions { display: flex; justify-content: center; gap: 12px; }

/* ==========================================================================
   Lote pretendido — card na ficha
   ========================================================================== */

.mapa-abrir {
  position: relative;
  display: block;
  width: 100%;
  border: none;
  border-radius: var(--radius-field);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--sand-200);
}

.mapa-abrir img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform var(--t-slow) var(--ease-breeze);
}

.mapa-abrir:hover img { transform: scale(1.02); }

.mapa-abrir__cta {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  background: var(--bioma-green);
  color: var(--bioma-sand);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(47, 58, 34, 0.35);
}

.lote-sel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  background: var(--sand-100);
  border: 1px solid var(--leaf-300);
  border-radius: var(--radius-field);
  padding: 12px 14px;
}

.lote-sel__badge {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bioma-green);
  color: var(--bioma-sand);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 19px;
}

.lote-sel__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lote-sel__info strong { font-weight: 500; font-size: 15px; }
.lote-sel__info span { font-size: 13px; opacity: 0.75; }
.lote-sel__acoes { display: flex; gap: 6px; }

/* ==========================================================================
   Modal do mapa
   ========================================================================== */

.mapa {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--sand-100);
  display: flex;
  flex-direction: column;
}

.mapa__top {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--bioma-green);
  color: var(--text-on-dark);
}

.mapa__title { display: flex; flex-direction: column; gap: 1px; }
.mapa__title .eyebrow { opacity: 0.7; }
.mapa__title strong { font-weight: 500; font-size: 14.5px; }

.mapa__fechar {
  border: none;
  background: rgba(222, 193, 159, 0.15);
  color: var(--bioma-sand);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.mapa__viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background: #FDFBF6;
}

.mapa__viewport.is-dragging { cursor: grabbing; }

.mapa__world {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  --z: 1;
}

.mapa__world img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* camada dos marcadores cobre exatamente a imagem — top/left em % dependem disso */
#mapa-marcadores {
  position: absolute;
  inset: 0;
}

.lote-marker {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  /* --mscale (definido no applyView) adapta o diâmetro à largura visual do
     mapa: vira pontinho no overview do celular e volta a 30px com zoom */
  transform: translate(-50%, -50%) scale(calc(var(--mscale, 1) / var(--z)));
  transform-origin: center;
  box-shadow: 0 1px 5px rgba(47, 58, 34, 0.35);
  transition: box-shadow var(--t-med) var(--ease-breeze);
  padding: 0;
}

.lote-marker--disponivel { background: var(--bioma-leaf); color: #FFFFFF; }
.lote-marker--reservado { background: #D9A441; color: #FFFFFF; }
.lote-marker--vendido { background: #C0392B; color: #FFFFFF; cursor: not-allowed; opacity: 0.88; }
.lote-marker--desconhecido { background: var(--green-300); color: #FFFFFF; }

.lote-marker.is-selected {
  background: var(--green-900);
  color: var(--bioma-sand);
  box-shadow: 0 0 0 4px rgba(123, 147, 81, 0.55), 0 2px 8px rgba(47, 58, 34, 0.4);
}

.lote-marker:not(.lote-marker--vendido):hover { box-shadow: 0 0 0 4px rgba(123, 147, 81, 0.4); }

.mapa__zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mapa__zoom button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--bioma-green);
  color: var(--bioma-sand);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(47, 58, 34, 0.3);
}

.mapa__card {
  position: absolute;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  z-index: 5;
  background: #FFFFFF;
  border-radius: var(--radius-card);
  box-shadow: 0 8px 32px rgba(47, 58, 34, 0.25);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 18px;
  max-width: min(92vw, 560px);
  animation: viewIn var(--t-med) var(--ease-breeze);
}

.mapa__card-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.mapa__card-top { display: flex; align-items: center; gap: 10px; }
.mapa__card-top strong { font-family: var(--font-display); font-size: 22px; font-weight: 400; text-transform: lowercase; line-height: 1; }

.mapa__card-specs { display: flex; gap: 20px; margin: 0; }
.mapa__card-specs dt {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-300);
  margin-bottom: 2px;
  white-space: nowrap;
}
.mapa__card-specs dd { margin: 0; font-size: 14.5px; font-weight: 500; white-space: nowrap; }

.mapa__card-nota { font-size: 12px; opacity: 0.65; }

/* status como selo, com tom funcional por situação */
.mapa__card-status {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.mapa__card-status--disponivel { color: var(--green-700); background: #E7EDDB; }
.mapa__card-status--reservado { color: #8A6420; background: #F5E8CB; }
.mapa__card-status--vendido { color: #A92F22; background: #F7DFDB; }
.mapa__card-status--desconhecido { color: var(--green-700); background: var(--green-100); }

.mapa__card .btn { white-space: nowrap; }

.mapa__legend {
  flex: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 11px 18px;
  background: #FFFFFF;
  border-top: 1px solid var(--green-100);
  font-size: 12.5px;
}

.legenda { display: inline-flex; align-items: center; gap: 6px; }
.legenda__dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.legenda__dot--disponivel { background: var(--bioma-leaf); }
.legenda__dot--reservado { background: #D9A441; }
.legenda__dot--vendido { background: #C0392B; }

.mapa__hint { margin-left: auto; opacity: 0.55; }

@media (max-width: 640px) {
  .mapa__card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    bottom: 78px;
    width: 92vw;
  }
  .mapa__hint { display: none; }
  .lote-sel { flex-wrap: wrap; }
  .lote-sel__acoes { width: 100%; }
  .lote-sel__acoes .btn { flex: 1; }
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--green-900);
  color: var(--bioma-sand);
  font-size: 14px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease-breeze), transform var(--t-med) var(--ease-breeze);
  z-index: 100;
  max-width: min(90vw, 480px);
  text-align: center;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Responsivo
   ========================================================================== */

@media (max-width: 640px) {
  .topbar__inner { padding: 11px 16px; }
  .topbar__endorse { display: none; }
  .hero { padding: 38px 20px 28px; }
  .card { padding: 24px 18px 26px; }
  .fieldset { grid-template-columns: 1fr; }
  .ficha, .stepper { padding-left: 16px; padding-right: 16px; }
  .stepper__label { display: none; }
  .step__actions .btn { flex: 1; }
  .doc { flex-direction: column; align-items: stretch; }
  .doc__actions { justify-content: stretch; }
  .doc__btn { flex: 1; }
  .logos { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
