/* ============================================================================
   Gerador de currículo em inglês (/curriculo-em-ingles)
   A folha (.cv-folha) é papel branco nos dois temas: é o que vai para o PDF.
   ========================================================================== */

.cv-heroi { padding: 3rem 0 1.5rem; position: relative; z-index: 1; }
.cv-heroi h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0.4rem 0 0.8rem; }
.cv-privado {
  display: inline-flex; gap: 0.5rem; align-items: center; margin-top: 1rem; padding: 0.55rem 0.9rem;
  border-radius: var(--raio-pill); font-size: 0.85rem; font-weight: 600;
  background: color-mix(in srgb, var(--pe-emerald) 12%, transparent); color: var(--pe-emerald);
}

/* ── barra de opções (celular primeiro) ── */
.cv-topo {
  position: relative; z-index: 1; display: grid; gap: 1rem;
  padding: 1rem; margin-bottom: 1rem; border-radius: var(--raio-lg);
  background: var(--superficie); border: 1px solid var(--fio-forte); box-shadow: var(--sombra-sm);
}
.cv-bloco { border: 0; padding: 0; margin: 0; min-width: 0; }
.cv-bloco > legend { padding: 0; margin-bottom: 0.45rem; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pe-label); }
/* modelo: dois cartões */
.cv-modelos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.cv-modelo { position: relative; cursor: pointer; }
.cv-modelo input { position: absolute; opacity: 0; pointer-events: none; }
.cv-modelo-corpo {
  display: grid; gap: 0.1rem; height: 100%; padding: 0.75rem 0.85rem 0.75rem 2.4rem; border-radius: var(--raio-md);
  border: 1.5px solid var(--fio-forte); background: var(--pe-paper); position: relative; transition: border-color 0.15s, background 0.15s;
}
.cv-modelo-corpo::before {
  content: ''; position: absolute; left: 0.85rem; top: 0.95rem; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--fio-forte); background: var(--superficie);
}
.cv-modelo-corpo strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; line-height: 1.2; }
.cv-modelo-corpo small { font-size: 0.74rem; line-height: 1.35; color: var(--texto-suave); }
.cv-modelo input:checked + .cv-modelo-corpo { border-color: var(--pe-navy); background: color-mix(in srgb, var(--pe-navy) 6%, var(--superficie)); }
.cv-modelo input:checked + .cv-modelo-corpo::before { border-color: var(--pe-navy); background: radial-gradient(circle, var(--pe-navy) 0 4px, var(--superficie) 4.5px); }
[data-theme="dark"] .cv-modelo input:checked + .cv-modelo-corpo { border-color: var(--pe-cyan-fill); background: color-mix(in srgb, var(--pe-cyan-fill) 10%, var(--superficie)); }
[data-theme="dark"] .cv-modelo input:checked + .cv-modelo-corpo::before { border-color: var(--pe-cyan-fill); background: radial-gradient(circle, var(--pe-cyan-fill) 0 4px, var(--superficie) 4.5px); }
.cv-modelo input:focus-visible + .cv-modelo-corpo { outline: 2px solid var(--pe-cyan-fill); outline-offset: 2px; }
/* papel e cor */
.cv-ajustes { display: grid; gap: 0.9rem; }
.cv-ajustes-linha { display: flex; flex-wrap: wrap; gap: 0.9rem 1.25rem; align-items: flex-end; }
.cv-seg { display: inline-flex; padding: 3px; border-radius: var(--raio-pill); background: var(--pe-paper); border: 1px solid var(--fio-forte); }
.cv-seg label { position: relative; cursor: pointer; }
.cv-seg input { position: absolute; opacity: 0; pointer-events: none; }
.cv-seg span { display: block; min-height: 38px; padding: 0.5rem 0.85rem; border-radius: var(--raio-pill); font-size: 0.88rem; font-weight: 600; color: var(--texto-suave); }
.cv-seg input:checked + span { background: var(--pe-navy); color: #fff; }
[data-theme="dark"] .cv-seg input:checked + span { background: var(--pe-cyan-fill); color: #071F38; }
.cv-seg input:focus-visible + span { outline: 2px solid var(--pe-cyan-fill); outline-offset: 2px; }
.cv-cores { display: flex; gap: 0.45rem; align-items: center; min-height: 44px; }
.cv-cor { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--superficie); box-shadow: 0 0 0 1px var(--fio-forte); cursor: pointer; }
.cv-cor[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--pe-gold); }
/* interruptor do nome original */
.cv-switch { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: center; cursor: pointer; padding: 0.7rem 0.8rem; border-radius: var(--raio-md); background: var(--pe-paper); border: 1px solid var(--fio); }
.cv-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cv-switch-trilho { position: relative; width: 42px; height: 24px; border-radius: 12px; background: var(--fio-forte); transition: background 0.15s; }
.cv-switch-trilho::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.15s; }
.cv-switch input:checked + .cv-switch-trilho { background: var(--pe-cyan-fill); }
.cv-switch input:checked + .cv-switch-trilho::after { transform: translateX(18px); }
.cv-switch input:focus-visible + .cv-switch-trilho { outline: 2px solid var(--pe-cyan-fill); outline-offset: 2px; }
.cv-switch-texto { display: grid; gap: 0.1rem; }
.cv-switch-texto strong { font-size: 0.9rem; font-weight: 600; }
.cv-switch-texto small { font-size: 0.76rem; color: var(--texto-suave); line-height: 1.35; }
/* arquivo: discreto, embaixo */
.cv-arquivo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--fio); }
.cv-arquivo-rotulo { font-size: 0.78rem; color: var(--texto-suave); width: 100%; }
.cv-btn-icone { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 40px; padding: 0.3rem 0; border: 0; background: none; font: inherit; font-size: 0.86rem; font-weight: 600; color: var(--pe-cyan-text); cursor: pointer; }
.cv-btn-icone:hover { text-decoration: underline; }
.cv-btn-apagar { color: var(--texto-suave); }

@media (min-width: 760px) {
  .cv-topo { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.25rem 1.75rem; padding: 1.25rem 1.4rem; }
  .cv-arquivo { grid-column: 1 / -1; }
  .cv-arquivo-rotulo { width: auto; }
}

/* começo: exemplo e compartilhar */
.cv-comeco { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: center; margin-bottom: 0.9rem; }
.cv-exemplo-aviso { position: relative; z-index: 1; margin-bottom: 0.9rem; }
.cv-aviso-ordem { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; }
.cv-medida { font-size: 0.75rem; color: var(--texto-suave); }
.cv-medida-alerta { color: var(--pe-alerta); font-weight: 500; }
.cv-topico-longo:empty { display: none; }
.cv-topico-longo { padding-left: 1.1rem; }
.cv-falta { font-size: 0.82rem; line-height: 1.4; color: var(--pe-amber-text); font-weight: 600; text-align: center; }
.cv-falta.cv-falta-ok { color: var(--pe-emerald); }
.cv-compartilhar-convite { margin-top: 1.1rem; background: none; border: 0; color: #9FD8E0; font: inherit; font-size: 0.9rem; text-decoration: underline; cursor: pointer; }

/* barra fixa do celular */
.cv-barra-movel { display: none; }
@media (max-width: 900px) {
  .cv-barra-movel {
    display: flex; flex-wrap: wrap; gap: 0.45rem 0.6rem; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom)); background: var(--superficie);
    border-top: 1px solid var(--fio-forte); box-shadow: 0 -6px 20px rgba(8, 43, 77, 0.10);
  }
  .cv-barra-movel .btn { flex: 1.3; min-height: 46px; }
  .cv-barra-ver { flex: 1; min-height: 46px; border-radius: var(--raio-sm); border: 1px solid var(--fio-forte); background: var(--superficie); font: inherit; font-weight: 600; font-size: 0.88rem; color: var(--texto); cursor: pointer; }
  body { padding-bottom: 100px; }
  .cv-falta-movel { width: 100%; font-size: 0.76rem; margin: 0; }
}

/* ── duas colunas ── */
.cv-app { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.5rem; align-items: start; }
.cv-abas { display: none; }

/* ── formulário ── */
.cv-form { display: grid; gap: 0.9rem; }
.cv-secao { background: var(--superficie); border: 1px solid var(--fio-forte); border-radius: var(--raio-lg); }
.cv-secao > summary {
  list-style: none; cursor: pointer; padding: 1rem 1.2rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
}
.cv-secao > summary::-webkit-details-marker { display: none; }
.cv-secao > summary small { font-family: var(--font-body); font-weight: 500; font-size: 0.75rem; color: var(--pe-cyan-text); }
.cv-secao-corpo { padding: 0 1.2rem 1.2rem; display: grid; gap: 0.8rem; }
.cv-campo { display: grid; gap: 0.3rem; min-width: 0; }
.cv-rotulo { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pe-label); }
.cv-dica { font-size: 0.78rem; color: var(--texto-suave); line-height: 1.45; }
.cv-sai { color: var(--pe-cyan-text); font-weight: 600; }
.cv-form input[type="text"], .cv-form input[type="email"], .cv-form input[type="tel"], .cv-form select, .cv-form textarea {
  width: 100%; min-width: 0; padding: 0.65rem 0.8rem; font: inherit; font-size: 0.92rem; color: var(--texto);
  background: var(--pe-paper); border: 1px solid var(--fio-forte); border-radius: var(--raio-sm);
}
.cv-form textarea { resize: vertical; line-height: 1.5; }
.cv-form input:focus, .cv-form select:focus, .cv-form textarea:focus { outline: none; border-color: var(--pe-cyan-fill); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pe-cyan-fill) 18%, transparent); }
.cv-linha2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; align-items: start; }
.cv-linha3 { display: grid; grid-template-columns: 1.4fr 0.6fr 1fr; gap: 0.7rem; }
.cv-data { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.cv-apagado { opacity: 0.35; pointer-events: none; }
.cv-marca { display: flex; gap: 0.45rem; align-items: center; font-size: 0.85rem; margin-top: 0.4rem; cursor: pointer; }
.cv-marca input { accent-color: var(--pe-cyan-fill); }
.cv-item { border: 1px dashed var(--fio-forte); border-radius: var(--raio-md); padding: 0.9rem; display: grid; gap: 0.7rem; }
.cv-item-curto { gap: 0.4rem; }
.cv-item-topo { display: flex; align-items: center; gap: 0.6rem; }
.cv-item-topo strong { font-size: 0.85rem; margin-right: auto; }
.cv-topicos { display: grid; gap: 0.4rem; }
.cv-topico { display: grid; grid-template-columns: auto 1fr auto; gap: 0.4rem; align-items: center; }
.cv-btn-texto { background: none; border: 0; padding: 0.2rem 0; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--pe-cyan-text); cursor: pointer; justify-self: start; text-align: left; }
.cv-btn-texto:hover { text-decoration: underline; }
.cv-x { font-size: 1.1rem; color: var(--texto-suave); padding: 0 0.3rem; }
.cv-seta { padding: 0 0.35rem; color: var(--texto-suave); }
.cv-ajudante { background: color-mix(in srgb, var(--pe-cyan-fill) 7%, transparent); border-radius: var(--raio-md); padding: 0.9rem; display: grid; gap: 0.5rem; }
.cv-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cv-chip { font: inherit; font-size: 0.8rem; padding: 0.3rem 0.7rem; border-radius: var(--raio-pill); border: 1px solid var(--fio-forte); background: var(--superficie); color: var(--texto); cursor: pointer; }
.cv-chip:hover { border-color: var(--pe-gold); }
.cv-chip-frase { font-style: italic; }
.cv-chip { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.cv-chip-pt { font-size: 0.68rem; font-style: normal; color: var(--texto-suave); }
.cv-chip[aria-pressed="true"] { background: var(--pe-navy); color: #fff; border-color: var(--pe-navy); }
[data-theme="dark"] .cv-chip[aria-pressed="true"] { background: var(--pe-cyan-fill); color: #071F38; border-color: var(--pe-cyan-fill); }
.cv-tag { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.8rem; padding: 0.25rem 0.3rem 0.25rem 0.7rem; border-radius: var(--raio-pill); background: color-mix(in srgb, var(--pe-cyan-fill) 12%, transparent); }
.cv-tag small { color: var(--pe-cyan-text); font-weight: 600; }
.cv-tag-x { border: 0; background: none; font-size: 1rem; line-height: 1; padding: 0 0.3rem; cursor: pointer; color: var(--texto-suave); }
.cv-ajuda-linha { display: flex; gap: 1rem; }
.cv-aviso { font-size: 0.82rem; line-height: 1.5; padding: 0.7rem 0.9rem; border-radius: var(--raio-sm); background: var(--pe-gold-light); color: var(--texto-leitura); }
.cv-foto-campo { display: flex; gap: 1rem; align-items: center; }
.cv-foto-mini { width: 66px; height: 88px; border-radius: 6px; overflow: hidden; flex: none; background: var(--pe-paper); border: 1px dashed var(--fio-forte); display: grid; place-items: center; font-size: 0.75rem; color: var(--texto-suave); }
.cv-foto-mini img { width: 100%; height: 100%; object-fit: cover; }
.btn.cv-btn-peq { padding: 0.5rem 0.9rem; font-size: 0.72rem; }

/* ── pré-visualização ── */
.cv-lado { position: sticky; top: 76px; display: grid; gap: 0.8rem; }
.cv-lado-topo { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cv-lado-topo span { font-size: 0.8rem; color: var(--texto-suave); }
.cv-previa { height: var(--cv-alto, 600px); max-height: calc(100vh - 210px); overflow-y: auto; overflow-x: hidden; border-radius: var(--raio-md); background: color-mix(in srgb, var(--texto) 6%, transparent); padding: 0; }
.cv-escala { transform-origin: top left; }
.cv-alerta-pt { font-size: 0.78rem; line-height: 1.45; color: var(--pe-alerta); font-weight: 500; }
.cv-aviso-pt { font-size: 0.82rem; line-height: 1.5; padding: 0.7rem 0.9rem; border-radius: var(--raio-sm); background: color-mix(in srgb, var(--pe-alerta) 10%, transparent); border: 1px solid color-mix(in srgb, var(--pe-alerta) 35%, transparent); color: var(--texto-leitura); }
.cv-aviso-pt ul { margin: 0.35rem 0 0.35rem 1.1rem; }
.cv-cep { display: flex; gap: 0.5rem; align-items: stretch; }
.cv-cep input { max-width: 160px; }
.cv-aviso-paginas { font-size: 0.82rem; padding: 0.6rem 0.8rem; border-radius: var(--raio-sm); background: color-mix(in srgb, var(--pe-alerta) 12%, transparent); color: var(--texto-leitura); }
.cv-gerar { width: 100%; }
.cv-gerar-dica { font-size: 0.78rem; color: var(--texto-suave); text-align: center; }

/* ── a folha (papel; igual nos dois temas) ── */
.cv-folha {
  --cv-cor: #0A3157;
  position: relative; background: #fff; color: #1d2430; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  padding: 53px 58px; font-family: var(--font-body); font-size: 10.5pt; line-height: 1.42;
}
.cv-papel-letter { width: 816px; min-height: 1056px; }
.cv-papel-a4 { width: 794px; min-height: 1123px; }
.cvp-topo { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; padding-bottom: 12px; border-bottom: 2px solid var(--cv-cor); }
.cv-resume .cvp-topo { flex-direction: column; align-items: center; text-align: center; }
.cvp-topo h1 { font-family: var(--font-display); font-weight: 700; font-size: 23pt; line-height: 1.1; color: var(--cv-cor); letter-spacing: -0.01em; }
.cvp-cargo { font-size: 11.5pt; font-weight: 600; color: #3a4556; margin-top: 3px; }
.cvp-contato { margin-top: 6px; font-size: 9.5pt; color: #4a5568; display: flex; flex-wrap: wrap; gap: 2px 0; }
.cv-resume .cvp-contato { justify-content: center; }
.cvp-contato span + span::before { content: '·'; margin: 0 7px; color: #9aa4b2; }
.cvp-foto { width: 90px; height: 120px; object-fit: cover; border-radius: 4px; flex: none; }
.cvp-secao { margin-top: 13px; break-inside: auto; }
.cvp-secao h2 { font-family: var(--font-body); font-size: 9.5pt; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cv-cor); border-bottom: 1px solid #d5dbe3; padding-bottom: 3px; margin-bottom: 7px; break-after: avoid; }
.cvp-item { margin-bottom: 9px; break-inside: avoid; }
.cvp-linha { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.cvp-linha strong { font-size: 10.5pt; color: #111827; }
.cvp-data { font-size: 9.5pt; color: #4a5568; white-space: nowrap; }
.cvp-orig { font-size: 9.8pt; color: #4a5568; font-weight: 400; }
.cvp-sub { font-size: 9.8pt; color: #4a5568; font-style: italic; }
.cvp-item ul { margin: 4px 0 0 16px; padding: 0; }
.cvp-item li { margin-bottom: 2px; }
.cvp-lista { list-style: none; margin: 0; padding: 0; }
.cvp-lista li { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 3px; }
.cvp-resumo { color: #2b3443; }
.cvp-habs { color: #2b3443; }
.cvp-quebra { position: absolute; left: 0; right: 0; border-top: 2px dashed #e0a43b; pointer-events: none; }
.cvp-quebra span { position: absolute; right: 8px; top: -18px; font-size: 10px; font-family: var(--font-body); color: #b0741b; background: #fff; padding: 0 4px; }

/* ── caixa do recorte da foto ── */
.cv-corte-fundo { position: fixed; inset: 0; z-index: 60; background: rgba(5, 20, 38, 0.6); display: none; align-items: center; justify-content: center; padding: 1rem; }
.cv-corte-fundo[data-aberta="1"] { display: flex; }
.cv-corte { background: var(--superficie); border-radius: var(--raio-lg); padding: 1.4rem; width: min(360px, 100%); display: grid; gap: 0.9rem; justify-items: center; }
.cv-corte h2 { font-family: var(--font-display); font-size: 1.2rem; }
.cv-corte canvas { width: 240px; height: 320px; border-radius: 6px; touch-action: none; cursor: grab; box-shadow: 0 0 0 1px var(--fio-forte); }
.cv-corte input[type="range"] { width: 100%; accent-color: var(--pe-cyan-fill); }
.cv-corte-acoes { display: flex; gap: 0.6rem; width: 100%; }
.cv-corte-acoes .btn { flex: 1; }

/* ── convite depois do PDF ── */
.cv-convite { margin-top: 1.5rem; }
.cv-convite .cv-convite-botoes { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ── guia ── */
.cv-guia h3 { font-family: var(--font-display); font-size: 1.2rem; margin: 2rem 0 0.6rem; }
.cv-guia p, .cv-guia li { color: var(--texto-leitura); line-height: 1.65; max-width: 72ch; }
.cv-guia ul { margin: 0.5rem 0 0 1.2rem; }
.cv-guia table { border-collapse: collapse; margin-top: 0.8rem; font-size: 0.92rem; background: var(--superficie); }
.cv-guia th, .cv-guia td { border: 1px solid var(--fio-forte); padding: 0.5rem 0.8rem; text-align: left; }
.cv-guia th { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pe-label); }

/* ── celular ── */
@media (max-width: 900px) {
  .cv-app { grid-template-columns: minmax(0, 1fr); }
  .cv-abas { display: none; gap: 0.4rem; position: sticky; top: 64px; z-index: 5; padding: 0.4rem; border-radius: var(--raio-pill); background: var(--superficie); border: 1px solid var(--fio-forte); box-shadow: var(--sombra-sm); }
  .cv-abas button { flex: 1; padding: 0.6rem; border: 0; border-radius: var(--raio-pill); background: none; font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--texto); cursor: pointer; }
  .cv-abas button[aria-selected="true"] { background: var(--pe-navy); color: #fff; }
  [data-theme="dark"] .cv-abas button[aria-selected="true"] { background: var(--pe-cyan-fill); color: #071F38; }
  .cv-app[data-aba="preencher"] .cv-lado { display: none; }
  .cv-app[data-aba="ver"] .cv-form { display: none; }
  .cv-lado { position: static; }
  .cv-previa { max-height: none; }
}
@media (max-width: 520px) {
  .cv-linha2, .cv-linha3 { grid-template-columns: 1fr; }
  .cv-secao-corpo { padding: 0 0.9rem 1rem; }
}

/* ── impressão: só a folha ── */
@media print {
  body { background: #fff !important; }
  body::before { display: none !important; }
  body > *:not(main) { display: none !important; }
  main > *:not(.cv-area) { display: none !important; }
  .cv-area > .container > *:not(.cv-app) { display: none !important; }
  .cv-app { display: block !important; }
  .cv-form, .cv-abas, .cv-lado-topo, .cv-aviso-paginas, .cv-aviso-pt, .cv-gerar, .cv-gerar-dica, .cv-convite { display: none !important; }
  .cv-lado { display: block !important; position: static !important; }
  .cv-previa { height: auto !important; max-height: none !important; overflow: visible !important; background: none !important; }
  .cv-escala { transform: none !important; width: auto !important; }
  .cv-folha { width: auto !important; min-height: 0 !important; padding: 0 !important; box-shadow: none !important; }
  .cvp-quebra { display: none !important; }
  .container { max-width: none !important; padding: 0 !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
