/* Formulário de Ofertas Raviera: identidade da Resultado */
:root {
  --indigo: #0A0635;
  --roxo: #5400D8;
  --roxo-claro: #EFE8FC;
  --lima: #E0FF05;
  --menta: #46EDD1;
  --creme: #F7F5EC;
  --branco: #FFFFFF;
  --linha: #DCD9E8;
  --suave: #625D80;
  --erro: #C2185B;
  --erro-fundo: #FDECF2;
  --raio: 14px;
  --sombra: 0 1px 2px rgba(10, 6, 53, .06), 0 6px 20px rgba(10, 6, 53, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--indigo);
  font: 400 17px/1.55 Poppins, Arial, sans-serif;
  overflow-x: hidden;
}
body.travado { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--roxo); }
button, input, select, textarea { font: inherit; color: inherit; }

/* topo */
.topo { background: var(--indigo); color: var(--branco); }
.topo-in { max-width: 820px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topo-marca img { width: 112px; height: auto; }
.topo-txt { text-align: right; display: flex; flex-direction: column; line-height: 1.2; }
.topo-cliente { font-weight: 600; font-size: 15px; }
.topo-titulo { font-size: 13px; color: var(--lima); letter-spacing: .04em; text-transform: uppercase; }

.wrap { max-width: 820px; margin: 0 auto; padding: 28px 16px 48px; }
.wrap.com-barra { padding-bottom: 32px; }

.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--roxo); }
.titulo {
  font-family: Anton, 'Arial Narrow', sans-serif; font-weight: 400; text-transform: uppercase;
  font-size: clamp(34px, 8vw, 52px); line-height: 1.02; margin: 0 0 10px; letter-spacing: .01em;
}
.titulo-m { font-size: clamp(28px, 6vw, 38px); }
.lead { margin: 0 0 22px; font-size: 18px; color: var(--suave); }
.trilha { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.trilha a { text-decoration: none; }
.trilha span { color: var(--suave); }

/* opções grandes (mês, marca) */
.opcoes { display: grid; gap: 12px; }
.opcao {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--branco); border: 2px solid transparent; border-radius: var(--raio);
  padding: 20px 22px; text-decoration: none; color: var(--indigo); box-shadow: var(--sombra);
  transition: border-color .15s, transform .15s;
}
.opcao:hover, .opcao:focus-visible { border-color: var(--roxo); transform: translateY(-1px); outline: none; }
.opcao-t { display: block; font-family: Anton, 'Arial Narrow', sans-serif; text-transform: uppercase; font-size: 28px; line-height: 1.1; }
.opcao-s { display: block; font-size: 14px; color: var(--suave); margin-top: 2px; }
.seta { font-size: 26px; color: var(--roxo); }

/* botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 2px solid transparent; border-radius: 999px; padding: 12px 22px;
  font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-p { padding: 7px 14px; font-size: 14px; }
.btn-lima { background: var(--lima); color: var(--indigo); }
.btn-lima:hover:not(:disabled) { filter: brightness(.95); }
.btn-roxo { background: var(--roxo); color: var(--branco); }
.btn-linha { background: transparent; border-color: var(--linha); color: var(--indigo); }
.btn-linha:hover { border-color: var(--roxo); }
.btn-perigo { background: var(--erro); color: var(--branco); }
.btn-perigo-txt { color: var(--erro); }
.link { background: none; border: 0; padding: 0; color: var(--roxo); font-weight: 600; text-decoration: underline; cursor: pointer; }
:focus-visible { outline: 3px solid var(--roxo); outline-offset: 2px; }

/* faixas de aviso */
.faixa { border-radius: var(--raio); padding: 14px 16px; margin: 0 0 16px; font-size: 15px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.faixa-ok { background: #E3FBF6; border: 1px solid var(--menta); }
.faixa-atencao { background: var(--lima); }
.faixa-rascunho { background: var(--roxo-claro); border: 1px dashed var(--roxo); }
.faixa-acoes { display: flex; gap: 8px; }

/* lista de ofertas */
.lista { display: grid; gap: 12px; margin-bottom: 14px; }
.vazio { color: var(--suave); background: var(--branco); border: 1px dashed var(--linha); border-radius: var(--raio); padding: 18px; margin: 0; text-align: center; }
.card {
  display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center;
  background: var(--branco); border-radius: var(--raio); padding: 14px; box-shadow: var(--sombra);
}
.card-foto { background: #F3F2F8; border-radius: 10px; aspect-ratio: 16 / 9; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.card-foto img { width: 100%; height: 100%; object-fit: contain; }
.sem-foto { font-size: 12px; color: var(--suave); }
.card-txt { min-width: 0; }
.card h3 { margin: 0 0 2px; font-size: 18px; line-height: 1.3; display: flex; gap: 8px; align-items: baseline; }
.num { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--indigo); color: var(--lima); font-size: 13px; }
.meta { margin: 0; font-size: 14px; color: var(--suave); }
.resumo { margin: 6px 0 0; font-size: 15px; font-weight: 500; }
.tag { display: inline-block; margin: 8px 0 0; padding: 3px 10px; border-radius: 8px; background: var(--lima); font-size: 13px; font-weight: 600; }
.tag-suave { background: var(--roxo-claro); color: var(--roxo); margin: 0; }
.acoes, .confirma { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.confirma span { font-weight: 600; margin-right: auto; }
.btn-add {
  display: block; text-align: center; padding: 18px; border-radius: var(--raio);
  border: 2px dashed var(--roxo); color: var(--roxo); font-weight: 700; font-size: 17px; text-decoration: none; background: transparent;
}
.btn-add:hover { background: var(--roxo-claro); }

/* barra fixa embaixo */
.barra { position: fixed; left: 0; right: 0; bottom: 0; background: var(--indigo); color: var(--branco); z-index: 10; box-shadow: 0 -4px 20px rgba(10, 6, 53, .2); }
.barra-in { max-width: 820px; margin: 0 auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.barra-txt { margin-right: auto; font-size: 15px; }
.barra-erro { margin: 0 auto 0 0; color: var(--lima); font-weight: 600; font-size: 15px; flex: 1 1 100%; }
.barra-erro:empty { display: none; }
.barra .btn-linha { color: var(--branco); border-color: rgba(255, 255, 255, .35); }

/* editor */
.editor { display: grid; gap: 14px; }
.bloco { background: var(--branco); border-radius: var(--raio); padding: 20px 18px; box-shadow: var(--sombra); }
.bloco h2 { margin: 0 0 6px; font-size: 21px; display: flex; gap: 10px; align-items: center; }
.n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--roxo); color: var(--branco); font-size: 15px; flex: none; }
.dica { margin: 0 0 14px; font-size: 15px; color: var(--suave); }
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.campos-1 { grid-template-columns: minmax(0, 260px); margin-top: 14px; }
.campo { display: block; }
.campo > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.campo em { font-style: normal; font-weight: 400; color: var(--suave); }
.campo em.obr { color: var(--roxo); }
input, select, textarea {
  width: 100%; border: 1.5px solid var(--linha); border-radius: 10px; padding: 12px 13px; background: var(--branco); font-size: 17px;
}
input:focus, select:focus, textarea:focus { border-color: var(--roxo); outline: none; box-shadow: 0 0 0 3px var(--roxo-claro); }
textarea { resize: vertical; line-height: 1.5; font-size: 15px; }
.legal-acoes { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; }

/* catálogo */
.grupo { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); margin: 18px 0 8px; }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.carro {
  display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px; cursor: pointer;
  background: var(--branco); border: 1.5px solid var(--linha); border-radius: 12px;
}
.carro:hover { border-color: var(--roxo); }
.carro-foto { background: #F3F2F8; border-radius: 8px; aspect-ratio: 16 / 9; overflow: hidden; }
.carro-foto img { width: 100%; height: 100%; object-fit: contain; }
.carro-nome { font-weight: 600; font-size: 15px; line-height: 1.3; }
.carro-cod { font-size: 12px; color: var(--suave); }
.escolhido { display: grid; grid-template-columns: 150px 1fr auto; gap: 14px; align-items: center; }
.escolhido-foto { background: #F3F2F8; border-radius: 10px; aspect-ratio: 16 / 9; overflow: hidden; }
.escolhido-foto img { width: 100%; height: 100%; object-fit: contain; }
.escolhido-txt { display: flex; flex-direction: column; min-width: 0; }
.escolhido-txt strong { font-size: 19px; line-height: 1.25; }

/* cores */
.foto-grande { margin: 0 0 14px; background: #F3F2F8; border-radius: 12px; overflow: hidden; }
.foto-grande img { width: 100%; aspect-ratio: 16 / 7; object-fit: contain; }
.foto-grande figcaption { padding: 8px 14px; font-weight: 600; background: var(--indigo); color: var(--branco); font-size: 15px; }
.cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.cor { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 2px solid var(--linha); border-radius: 10px; background: var(--branco); cursor: pointer; text-align: left; }
.cor.sel { border-color: var(--roxo); box-shadow: 0 0 0 3px var(--roxo-claro); }
.cor-foto { background: #F3F2F8; border-radius: 6px; aspect-ratio: 16 / 9; overflow: hidden; }
.cor-foto img { width: 100%; height: 100%; object-fit: contain; }
.cor-tf { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 6px; background: var(--roxo-claro); color: var(--roxo); font: 400 26px Anton, sans-serif; }
.cor-nome { font-size: 13px; font-weight: 600; line-height: 1.25; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { border: 1.5px solid var(--linha); background: var(--branco); border-radius: 999px; padding: 9px 15px; font-size: 15px; font-weight: 500; cursor: pointer; }
.chip:hover { border-color: var(--roxo); }
.chip.sel { background: var(--roxo); border-color: var(--roxo); color: var(--branco); }

/* modal de envio */
.modal { position: fixed; inset: 0; background: rgba(10, 6, 53, .6); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal-caixa { background: var(--creme); width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 24px 18px calc(18px + env(safe-area-inset-bottom)); }
.modal .barra-erro { color: var(--erro); margin: 10px 0 0; }
.mini-lista { margin: 0 0 16px; padding: 0 0 0 22px; }
.mini-lista li { margin-bottom: 8px; }
.mini-lista span { display: block; font-size: 14px; color: var(--suave); }
.modal-acoes { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* enviado */
.feito { text-align: center; padding: 30px 0; }
.feito-icone { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; background: var(--lima); display: grid; place-items: center; font-size: 40px; font-weight: 700; }
.feito-acoes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

@media (min-width: 700px) {
  .modal { align-items: center; }
  .modal-caixa { border-radius: 20px; padding: 28px; }
  .card { grid-template-columns: 170px 1fr auto; }
  .acoes, .confirma { grid-column: auto; flex-direction: column; align-items: stretch; }
  .confirma span { margin: 0; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .card { grid-template-columns: 104px 1fr; gap: 12px; }
  .card h3 { font-size: 16px; }
  .escolhido { grid-template-columns: 110px 1fr; }
  .escolhido .btn { grid-column: 1 / -1; justify-self: start; }
  .grade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cores { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .barra-in .btn { flex: 1 1 auto; }
}

/* ---------- link de marca: identidade da marca no lugar da Resultado ---------- */
.topo-logos { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topo-logos img { height: 34px; width: auto; }
.topo-div { width: 1px; align-self: stretch; background: rgba(255, 255, 255, .35); }
.topo-mes { font-size: 13px; color: rgba(255, 255, 255, .7); }
body.marca .topo { background: var(--topo); }
body.marca .topo-titulo { color: var(--branco); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 15px; }
body[data-marca="bmw"] .topo-logos img:first-child { height: 44px; }
body[data-marca="mini"] .topo-logos img { height: 30px; }
body[data-marca="motorrad"] .topo-logos img:first-child { height: 40px; }
body[data-marca="motorrad"] .topo-logos img + .topo-div + img,
body[data-marca="bmw"] .topo-logos img + .topo-div + img { height: 16px; }

body.marca { --roxo: var(--acento); --roxo-claro: color-mix(in srgb, var(--acento) 12%, white); background: #F4F4F4; }
body.marca .titulo { font-family: Poppins, Arial, sans-serif; font-weight: 700; text-transform: none; letter-spacing: -.01em; font-size: clamp(28px, 6vw, 40px); line-height: 1.15; }
body.marca .eyebrow { color: var(--suave); }
body.marca .btn-lima { background: var(--acento); color: var(--branco); }
body.marca .barra { background: var(--topo); }
body.marca .num { background: var(--topo); color: var(--branco); }
body.marca .tag { background: color-mix(in srgb, var(--acento) 12%, white); color: var(--topo); }
body.marca .faixa-atencao { background: #FFF3C4; border: 1px solid #E8C547; }
body.marca .feito-icone { background: var(--acento); color: var(--branco); }
body.marca .foto-grande figcaption { background: var(--topo); }
.faixa-copiar { background: var(--branco); border: 2px solid var(--roxo); }

.rodape { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 16px 28px; font-size: 13px; color: var(--suave); }
.rodape img { width: 76px; height: auto; }
body:has(.com-barra) .rodape { padding-bottom: 120px; }

@media (max-width: 520px) {
  .topo-logos { gap: 10px; }
  body[data-marca="bmw"] .topo-logos img:first-child { height: 36px; }
  body[data-marca="mini"] .topo-logos img { height: 22px; }
  body[data-marca="motorrad"] .topo-logos img:first-child { height: 30px; }
  body[data-marca="motorrad"] .topo-logos img + .topo-div + img,
  body[data-marca="bmw"] .topo-logos img + .topo-div + img { height: 12px; }
  .topo-titulo { font-size: 13px !important; }
}
.topo-txt { white-space: nowrap; }
@media (max-width: 520px) { body.marca .topo-titulo { display: none; } body.marca .topo-mes { font-size: 13px; color: var(--branco); font-weight: 600; } }
body.marca .barra .btn-lima { background: var(--botao-barra); color: var(--texto-botao-barra); }
@media (max-width: 520px) { body.marca .topo-txt { display: none; } }

/* ---------- portal do grupo: entrada e escolha de marca ---------- */
body.portal { --topo: #032D56; --acento: #005DA7; --roxo: #005DA7; --roxo-claro: #E3EEF8; background: #F4F4F4; }
body.portal .topo { background: var(--topo); }
body.portal .titulo { font-family: Poppins, Arial, sans-serif; font-weight: 700; text-transform: none; letter-spacing: -.01em; font-size: clamp(28px, 6vw, 40px); line-height: 1.15; }
body.portal .eyebrow { color: var(--suave); }
body.portal .topo-titulo { color: var(--branco); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 15px; }
.logo-grupo { height: 32px !important; width: auto; }
.topo-dir { display: flex; align-items: center; gap: 14px; }
.topo-troca {
  border: 1px solid rgba(255, 255, 255, .4); color: var(--branco); background: transparent; border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.topo-troca:hover { background: rgba(255, 255, 255, .12); }
@media (max-width: 520px) { body.marca .topo-txt, body.portal .topo-txt { display: none; } }

.entrar { max-width: 440px; margin: 0 auto; }
.entrar-form { display: grid; gap: 14px; margin-bottom: 12px; }
.entrar-form .barra-erro { color: var(--erro); margin: 0; }

.marcas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.marca-cartao {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: var(--topo); color: var(--branco); border-radius: var(--raio); padding: 20px; text-decoration: none;
  box-shadow: var(--sombra); transition: transform .15s;
}
a.marca-cartao:hover, a.marca-cartao:focus-visible { transform: translateY(-2px); }
.marca-logo { height: 56px; display: flex; align-items: center; margin-bottom: 6px; }
.marca-logo img { max-height: 56px; max-width: 200px; width: auto; }
.marca-nome { font-weight: 700; font-size: 19px; }
.marca-conta { display: flex; flex-direction: column; font-size: 14px; line-height: 1.35; color: rgba(255, 255, 255, .75); }
.marca-conta strong { color: var(--branco); font-size: 16px; }
.sub-grupo { font-size: 15px; font-weight: 600; color: var(--suave); margin: 30px 0 10px; }
.marca-cartao { min-height: 190px; }
.marca-breve { background: #E4E4E4; color: #8C8C8C; box-shadow: none; cursor: default; }
.marca-breve .marca-logo img { filter: grayscale(1) opacity(.45); }
.marca-breve .marca-conta { color: #9A9A9A; }
.em-breve { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.trilha-aqui { color: var(--suave); }
body.marca, body.portal { --indigo: #141414; }
@media (max-width: 520px) {
  .marcas { grid-template-columns: 1fr; }
  .marca-cartao { min-height: 0; }
  .marca-cartao { display: grid; grid-template-columns: 96px 1fr; column-gap: 14px; align-items: center; padding: 16px; }
  .marca-cartao .marca-logo { grid-row: span 3; margin: 0; height: auto; justify-content: center; }
  .marca-cartao .marca-logo img { max-width: 96px; max-height: 48px; }
}
.aviso { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: min(92vw, 520px); background: #141414; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; z-index: 30; box-shadow: var(--sombra); }
.aviso[hidden] { display: none; }
