/* ════════════════════════════════════════════════════════
   Módulo CV dinámico
   ════════════════════════════════════════════════════════ */
.cv-wrap { position: relative; }

/* ── Barra superior: roles + acciones ── */
.cv-top {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  justify-content: space-between; margin-bottom: 16px;
}
.cv-roles { display: flex; gap: 6px; flex-wrap: wrap; }
.cv-role {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-soft);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.cv-role:hover { color: var(--text); }
.cv-role.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.cv-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cv-langsw { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cv-lang {
  background: var(--bg-soft); border: none; color: var(--text-soft);
  padding: 8px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.cv-lang.active { background: var(--accent); color: #fff; }
.cv-btn {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.cv-btn:hover { border-color: var(--accent); }
.cv-btn.primary { background: var(--green); border-color: var(--green); color: #fff; }

.cv-flash {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #fff; border-radius: 999px;
  padding: 8px 18px; font-size: 13px; font-weight: 600;
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 200;
}
.cv-flash.show { opacity: 1; }

/* ── Vista CV (papel) ── */
.cv-paper {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 30px; max-width: 780px; margin: 0 auto;
}
.cv-head { border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 14px; }
.cv-head h1 { margin: 0; font-size: 26px; letter-spacing: .3px; }
.cv-role-title { color: var(--accent); font-size: 15px; font-weight: 600; margin-top: 2px; }
.cv-contact { color: var(--text-soft); font-size: 12.5px; margin-top: 8px; }

.cv-block { margin-top: 18px; }
.cv-block h3 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-soft); margin: 0 0 10px; font-weight: 700;
}
.cv-perfil { margin: 0; line-height: 1.55; font-size: 14px; }

.cv-item { margin-bottom: 12px; }
.cv-item-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cv-item-h b { font-size: 14.5px; }
.cv-year { color: var(--text-soft); font-size: 12px; white-space: nowrap; }
.cv-item p { margin: 3px 0 0; color: var(--text-soft); font-size: 13px; line-height: 1.5; }

.cv-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-tool {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 10px; font-size: 12.5px;
}
.cv-empty {
  border: 1px dashed var(--border); border-radius: 12px;
  padding: 28px 20px; text-align: center; color: var(--text-soft); font-size: 14px;
}

/* ── Modo editar ── */
.cv-editor { display: flex; flex-direction: column; gap: 18px; }
.cv-esec {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
}
.cv-esec > h3 { margin: 0 0 4px; font-size: 15px; }
.cv-esec-h { display: flex; justify-content: space-between; align-items: center; }
.cv-count { color: var(--text-soft); font-weight: 400; font-size: 13px; }
.cv-hint { color: var(--text-soft); font-size: 12px; margin: 2px 0 12px; }
.cv-hint.big { font-size: 13px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 4px; }

.cv-pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }

.cv-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-soft); }
.cv-f span { font-weight: 600; }
.cv-f.sm { max-width: 140px; }
.cv-f input, .cv-f textarea {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; width: 100%;
}
.cv-f textarea { resize: vertical; line-height: 1.45; }

.cv-edit-item {
  position: relative; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 40px 12px 12px; margin-bottom: 10px; background: var(--bg-soft);
}
.cv-fields { display: flex; flex-wrap: wrap; gap: 10px; }
.cv-fields .cv-f { flex: 1 1 100%; }
.cv-fields .cv-f.sm { flex: 0 0 130px; }
.cv-fields .cv-f:has(input:not(.sm)) { min-width: 200px; }

.cv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cv-chip {
  background: transparent; border: 1px solid var(--border); color: var(--text-soft);
  border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.cv-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.cv-del {
  position: absolute; top: 10px; right: 10px;
  background: transparent; border: 1px solid var(--border); color: var(--text-soft);
  border-radius: 8px; width: 26px; height: 26px; cursor: pointer; font-size: 13px; line-height: 1;
}
.cv-del:hover { border-color: var(--red); color: var(--red); }

.cv-add {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.cv-add:hover { border-color: var(--green); color: var(--green); }
