/* CurrículoZap — editor */
.ed-body { background: var(--creme); padding-bottom: 96px; }

.ed-top { background: #fff; border-bottom: 1px solid var(--linha); position: sticky; top: 0; z-index: 30; padding-bottom: .85rem; }
.ed-top-in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.ed-save { font-size: .85rem; font-weight: 600; color: var(--suave); }
.ed-save.ok { color: #16A34A; }
.ed-save.erro { color: #DC2626; }
/* o atributo hidden precisa vencer qualquer display do CSS (modais, campos) */
[hidden] { display: none !important; }

.ed-progress { height: 8px; border-radius: 99px; background: var(--linha); overflow: hidden; }
.ed-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--azul), #4F7DF3); border-radius: 99px; transition: width .35s ease; }
.ed-progress-txt { font-size: .82rem; color: var(--suave); margin-top: .45rem; }

.ed-main { padding: 1.75rem 0 2rem; }
.ed-step h2 { text-align: left; font-size: clamp(1.45rem, 5vw, 1.95rem); }
.ed-help-top { color: var(--suave); margin: .55rem 0 1.6rem; }

/* campos */
.ed-field { display: block; margin-bottom: 1.15rem; }
.ed-field > span { display: block; font-weight: 700; font-size: .93rem; margin-bottom: .42rem; }
.ed-field input, .ed-field select, .ed-field textarea {
  width: 100%; min-height: 48px; padding: .72rem .95rem;
  border: 1.5px solid var(--linha); border-radius: 12px;
  font: inherit; font-size: 16px; background: #fff; color: var(--texto);
}
.ed-field textarea { min-height: 110px; resize: vertical; }
.ed-field input:focus, .ed-field select:focus, .ed-field textarea:focus {
  outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(29, 78, 216, .15);
}
.ed-field small { display: block; color: var(--suave); font-size: .82rem; margin-top: .38rem; }
.ed-err { display: none; color: #DC2626; font-size: .84rem; font-style: normal; font-weight: 600; margin-top: .35rem; }
.ed-field.tem-erro input, .ed-field.tem-erro select, .ed-field.tem-erro textarea { border-color: #DC2626; }
.ed-field.tem-erro .ed-err { display: block; }
.ed-row { display: grid; gap: 0 1.15rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .ed-row { grid-template-columns: 1fr 1fr; } }

.ed-check { display: flex; align-items: center; gap: .65rem; margin: .85rem 0 1.15rem; font-weight: 600; font-size: .95rem; cursor: pointer; }
.ed-check input { width: 22px; height: 22px; accent-color: var(--azul); }

/* cartões de lista */
.ed-card { background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); padding: 1.15rem; margin-bottom: 1.15rem; }
.ed-card-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: .95rem; }
.ed-card-tools { display: flex; gap: .45rem; }
.ed-mini {
  min-width: 36px; min-height: 36px; border-radius: 9px; border: 1.5px solid var(--linha);
  background: #fff; cursor: pointer; font-size: .95rem; color: var(--texto);
}
.ed-mini:hover { border-color: var(--azul); color: var(--azul); }
.ed-mini-x:hover { border-color: #DC2626; color: #DC2626; }

.ed-add {
  width: 100%; min-height: 48px; border: 2px dashed var(--azul); color: var(--azul);
  background: transparent; border-radius: 12px; font-weight: 700; cursor: pointer; margin-bottom: 1.15rem;
}
.ed-add:hover { background: rgba(29, 78, 216, .06); }
.ed-add-sm { min-height: 40px; font-size: .9rem; margin-top: .65rem; }
.ed-add-inline { display: flex; gap: .5rem; align-items: center; margin-bottom: .55rem; }
.ed-add-inline input { flex: 1; min-height: 48px; padding: .65rem .9rem; border: 1.5px solid var(--linha); border-radius: 12px; font: inherit; font-size: 16px; }
.ed-idioma input { flex: 2; } .ed-idioma select { flex: 1.2; min-height: 48px; border: 1.5px solid var(--linha); border-radius: 12px; font: inherit; font-size: 15px; padding: 0 .6rem; }

/* chips */
.ed-chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.15rem; }
.ed-chip {
  border: 1.5px solid var(--linha); background: #fff; border-radius: 999px;
  padding: .55rem 1.05rem; font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
}
.ed-chip.ativo { background: var(--azul); border-color: var(--azul); color: #fff; }
.ed-chip b { color: var(--azul); }
.ed-chip.ativo b { color: #fff; }
.ed-sugestoes { margin-top: 1.35rem; }
.ed-sug-title { font-weight: 700; font-size: .93rem; margin-bottom: .7rem; }

/* etapa 8 */
.ed-templates { display: grid; gap: .8rem; grid-template-columns: 1fr; margin-bottom: 1.35rem; }
@media (min-width: 640px) { .ed-templates { grid-template-columns: repeat(3, 1fr); } }
.ed-tpl {
  position: relative; text-align: left; background: #fff; border: 2px solid var(--linha);
  border-radius: var(--raio); padding: 1.15rem 1.15rem 1.05rem; cursor: pointer; font: inherit;
}
.ed-tpl strong { display: block; font-size: 1.08rem; margin: .35rem 0 .25rem; }
.ed-tpl small { color: var(--suave); }
.ed-tpl.ativo { border-color: var(--azul); box-shadow: var(--sombra); }
.ed-tpl:disabled { opacity: .55; cursor: not-allowed; }
.ed-tpl-badge { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: .25rem .65rem; border-radius: 999px; }
.ed-tpl-badge.free { background: #DCFCE7; color: #15803D; }
.ed-tpl-badge.premium { background: #FEE2E2; color: #B91C1C; }

.ed-preview-box { background: #EDEEF2; border-radius: var(--raio); padding: 1.15rem; margin-bottom: 1.25rem; }
.cv-doc-wrap { background: #fff; box-shadow: var(--sombra); border-radius: 6px; overflow: hidden; }
.ed-preview-empty { color: var(--suave); padding: 2.5rem 1.5rem; text-align: center; }

.ed-saidas { display: grid; gap: .75rem; grid-template-columns: 1fr; }
.ed-nota { color: var(--suave); font-size: .86rem; margin-top: 1rem; }

/* rodapé fixo */
.ed-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--linha);
  padding: .85rem 0 calc(.85rem + env(safe-area-inset-bottom));
}
.ed-foot-in { display: flex; gap: .85rem; }
.ed-foot-in .btn { flex: 1; }

/* bloco de foto */
.ed-foto { display: flex; gap: 1rem; align-items: center; margin: .5rem 0; }
.ed-foto-box {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  background: var(--bg2); border: 1.5px solid var(--line);
  display: grid; place-items: center; font-size: 1.8rem;
}
.ed-foto-box img { width: 100%; height: 100%; object-fit: cover; }
.ed-foto-controles { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.ed-foto-controles label { font-size: .82rem; color: var(--muted); }
#fotoZoom { width: 140px; vertical-align: middle; }

/* marca d'água da prévia premium (spec: some só depois do pagamento) */
.cv-preview-wrap { position: relative; }
.cv-marca {
  position: absolute; inset: 0; overflow: hidden;
  display: grid; place-items: center; pointer-events: none;
}
.cv-marca span {
  transform: rotate(-24deg); white-space: nowrap;
  font-size: 1.6rem; font-weight: 800; color: rgba(17, 24, 39, .14);
  letter-spacing: .02em; text-transform: uppercase;
  border: 3px solid rgba(17, 24, 39, .14); border-radius: 12px; padding: .4rem 1.1rem;
}

/* modal de compartilhamento */
.ed-modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(17, 24, 39, .55); display: grid; place-items: center;
  padding: 1.25rem;
}
.ed-modal-box {
  background: #fff; border-radius: var(--raio); padding: 1.75rem 1.5rem;
  width: min(440px, 100%); display: grid; gap: .85rem; text-align: center;
}
.ed-modal-box h3 { font-size: 1.35rem; }
.ed-modal-box p { color: var(--suave); font-size: .95rem; }
.ed-qr { display: grid; place-items: center; padding: .5rem 0; }
.ed-qr svg { width: 200px; height: 200px; }

/* ---------- documento do currículo (preview + PDF) ---------- */
.cv-doc {
  font-family: 'Inter', system-ui, sans-serif; color: #111;
  padding: 2.25rem 2.4rem; font-size: 12.5px; line-height: 1.55;
}
.cv-hd h1 { font-size: 22px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem; }
.cv-hd-contato { color: #333; font-size: 11.5px; margin-bottom: .35rem; }
.cv-sec { margin-top: 1.05rem; }
.cv-sec h2 {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: #111;
  border-bottom: 1.5px solid #111; padding-bottom: .22rem; margin-bottom: .55rem;
}
.cv-destaque { font-weight: 700; }
.cv-item { margin-bottom: .7rem; }
.cv-item-hd { font-size: 12px; }
.cv-linha { width: 100%; border-collapse: collapse; }
.cv-linha td { vertical-align: top; font-size: 12px; }
.cv-periodo { text-align: right; white-space: nowrap; color: #555; font-size: 11px; padding-left: 10px; }
.cv-lista { margin: .35rem 0 0 1.1rem; }
.cv-lista li { margin-bottom: .18rem; }
.cv-doc p { margin: .22rem 0; }

/* ---------- impressão (PDF provisório da fase 2) ---------- */
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .ed-top, .ed-foot, .ed-templates, .ed-saidas, .ed-nota, .ed-help-top, .ed-step > h2,
  .top, .foot { display: none !important; }
  .ed-main, .wrap { width: 100%; margin: 0; padding: 0; }
  .ed-preview-box { background: #fff; padding: 0; border-radius: 0; }
  .cv-doc-wrap { box-shadow: none; border-radius: 0; }
  .cv-doc { padding: 14mm 15mm; font-size: 11.5px; }
  .cv-item, .cv-sec { break-inside: avoid; }
}
